Whoops; missed updating a setfile() call.
authorguenther <guenther@openbsd.org>
Thu, 7 May 2015 17:32:20 +0000 (17:32 +0000)
committerguenther <guenther@openbsd.org>
Thu, 7 May 2015 17:32:20 +0000 (17:32 +0000)
problem reported dcoppa; ok millert@

bin/cp/cp.c

index 0b4f436..cf8e001 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cp.c,v 1.37 2015/01/16 06:39:31 deraadt Exp $ */
+/*     $OpenBSD: cp.c,v 1.38 2015/05/07 17:32:20 guenther Exp $        */
 /*     $NetBSD: cp.c,v 1.14 1995/09/07 06:14:51 jtc Exp $      */
 
 /*
@@ -360,7 +360,7 @@ copy(char *argv[], enum op type, int fts_options)
                                 * unmodified by the umask; arguably wrong,
                                 * but it's been that way forever.
                                 */
-                               if (pflag && setfile(curr->fts_statp, 0))
+                               if (pflag && setfile(curr->fts_statp, -1))
                                        rval = 1;
                                else if (fts_dne(curr))
                                        (void)chmod(to.p_path,