[Top][All Lists]

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

/bin/sh compatibility mode bug ($UID)

From: ma
Subject: /bin/sh compatibility mode bug ($UID)
Date: Sat, 23 Sep 2000 12:40:16 +0200 (CEST)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i386-suse-linux' -DCONF_VENDOR='suse' 
-DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I. -I/usr/include -I. -I./lib 
-I/usr/include -O2 -m486 -D_GNU_SOURCE -Wall -pipe
uname output: Linux emma1 2.2.17-ma1 #10 Thu Sep 14 01:05:06 CEST 2000 i586 
Machine Type: i386-suse-linux

Bash Version: 2.03
Patch Level: 0
Release Status: release

bash keeps its special read-only variables such as $UID even when run as
/bin/sh compatibility shell. This breaks existing scripts if /bin/sh is
used as a bash replacement. If bash claims to be a /bin/sh replacement,
I expect it to have the way the Single Unix Specification v2 specifies,
without breaking any script with its extensions. Bash extensions should
ONLY apply if it's run as bash, not if it's run as sh.

Note the problem is not vendor-specific, but bash specific, and it
persists in 2.04.

run pdksh, ash or tcsh, make sure, bash is /bin/sh, then do:
setenv UID 12345
printenv UID                (shows 12345)
/bin/sh -c 'printenv UID'   (shows whatever your current UID is)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]