Subject: bin/20652: typo in mkpath() in bin/mkdir
To: None <gnats-bugs@gnats.netbsd.org>
From: Anthony Mallet <anthony.mallet@useless-ficus.net>
List: netbsd-bugs
Date: 03/11/2003 00:01:32
>Number: 20652
>Category: bin
>Synopsis: typo in mkpath() in bin/mkdir
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 10 15:02:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Anthony Mallet
>Release: NetBSD 1.6O
>Organization:
>Environment:
System: NetBSD ficus 1.6O NetBSD 1.6O (FICUS) #1: Sun Feb 23 21:22:57 CET 2003 troot@ficus:/home/build/netbsd-obj-current/sys/arch/i386/compile/FICUS i386
Architecture: i386
Machine: i386
>Description:
There's a typo in the test that triggers the final chmod() in mkpath()
>How-To-Repeat:
>Fix:
--- mkdir.c~ 2003-03-10 23:51:19.000000000 +0100
+++ mkdir.c 2003-03-10 23:52:08.000000000 +0100
@@ -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;
>Release-Note:
>Audit-Trail:
>Unformatted: