Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/mkdir Fix typo in mkpath()'s test before chmod().



details:   https://anonhg.NetBSD.org/src/rev/21e70fe7a7db
branches:  trunk
changeset: 544085:21e70fe7a7db
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Mar 10 23:33:10 2003 +0000

description:
Fix typo in mkpath()'s test before chmod().
Noted in [bin/20652] by Anthony Mallet.

diffstat:

 bin/mkdir/mkdir.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4371902ceb4b -r 21e70fe7a7db bin/mkdir/mkdir.c
--- a/bin/mkdir/mkdir.c Mon Mar 10 22:47:44 2003 +0000
+++ b/bin/mkdir/mkdir.c Mon Mar 10 23:33:10 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkdir.c,v 1.28 2003/03/05 03:58:44 lukem Exp $ */
+/* $NetBSD: mkdir.c,v 1.29 2003/03/10 23:33:10 lukem Exp $ */
 
 /*
  * Copyright (c) 1983, 1992, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)mkdir.c    8.2 (Berkeley) 1/25/94";
 #else
-__RCSID("$NetBSD: mkdir.c,v 1.28 2003/03/05 03:58:44 lukem Exp $");
+__RCSID("$NetBSD: mkdir.c,v 1.29 2003/03/10 23:33:10 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -191,7 +191,7 @@
                         * including the sticky, setuid, setgid bits you lose
                         * them. So chmod().
                         */
-                       if ((mode & ~(S_IRWXU|S_IRWXG|S_IRWXU)) != 0 &&
+                       if ((mode & ~(S_IRWXU|S_IRWXG|S_IRWXO)) != 0 &&
                            chmod(path, mode) == -1) {
                                warn("%s", path);
                                return -1;



Home | Main Index | Thread Index | Old Index