allow creation of devices or fifo without -p (as it is already allowed with -p)
authorsemarie <semarie@openbsd.org>
Thu, 23 Jun 2016 06:37:36 +0000 (06:37 +0000)
committersemarie <semarie@openbsd.org>
Thu, 23 Jun 2016 06:37:36 +0000 (06:37 +0000)
diff from trondd at kagu-tsuchi com, enhanced by me for reordering promises

ok deraadt@

bin/pax/pax.c

index 6d70b7a..1b17b8c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pax.c,v 1.44 2015/12/16 01:39:11 tb Exp $     */
+/*     $OpenBSD: pax.c,v 1.45 2016/06/23 06:37:36 semarie Exp $        */
 /*     $NetBSD: pax.c,v 1.5 1996/03/26 23:54:20 mrg Exp $      */
 
 /*-
@@ -261,13 +261,13 @@ main(int argc, char **argv)
         * so can't pledge at all then.
         */
        if (pmode == 0 || (act != EXTRACT && act != COPY)) {
-               if (pledge("stdio rpath wpath cpath dpath fattr getpw ioctl proc exec",
+               if (pledge("stdio rpath wpath cpath fattr dpath getpw ioctl proc exec",
                    NULL) == -1)
                        err(1, "pledge");
 
                /* Copy mode, or no gzip -- don't need to fork/exec. */
                if (gzip_program == NULL || act == COPY) {
-                       if (pledge("stdio rpath wpath fattr cpath getpw ioctl",
+                       if (pledge("stdio rpath wpath cpath fattr dpath getpw ioctl",
                            NULL) == -1)
                                err(1, "pledge");
                }