[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
umask = fails
From: |
llattanzi+bash |
Subject: |
umask = fails |
Date: |
Thu, 15 Jul 2004 16:17:20 -0700 (PDT) |
Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: darwin8.0
Compiler: gcc
Compilation CFLAGS: -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp
-arch i386 -arch ppc -pipe -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc'
-DCONF_OSTYPE='darwin8.0' -DCONF_MACHTYPE='powerpc-apple-darwin8.0'
-DCONF_VENDOR='apple' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I.
-I/SourceCache/bash/bash-32/bash
-I/SourceCache/bash/bash-32/bash/include
-I/SourceCache/bash/bash-32/bash/lib -arch i386 -arch ppc -g -Os -pipe
-no-cpp-precomp -arch i386 -arch ppc -pipe
uname output: Darwin stderr.apple.com 8.0.0b1 Darwin Kernel Version
8.0.0b1: Mon Jul 12 21:41:56 PDT 2004;
root:xnu/xnu-638.1.obj~4/RELEASE_PPC Power Macintosh powerpc
Machine Type: powerpc-apple-darwin8.0
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
umask = is not treated like umask a=
Repeat-By:
$ umask 0222
$ umask =
$ umask
0222
# You should see 0777. Compare against "chmod = testfile" with
a 0 umask.
Fix:
Index: bash/bash/builtins/umask.def
diff -u bash/bash/builtins/umask.def:1.2
bash/bash/builtins/umask.def:1.2.14.1
--- bash/bash/builtins/umask.def:1.2 Thu Jul 1 10:42:57 2004
+++ bash/bash/builtins/umask.def Thu Jul 15 16:09:42 2004
@@ -260,8 +260,10 @@
bits &= ~perm;
break;
case '=':
- bits &= ~who;
- bits |= perm;
+ if (who == 0) /* = without prefix means the same as a= */
+ who |= S_IRWXU | S_IRWXG | S_IRWXO;
+ bits &= ~who;
+ bits |= perm;
break;
/* No other values are possible. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- umask = fails,
llattanzi+bash <=