]> git.ipfire.org Git - thirdparty/bash.git/blame - NOTES
Imported from ../bash-2.01.1.tar.gz.
[thirdparty/bash.git] / NOTES
CommitLineData
d166f048
JA
1Platform-Specific Configuration and Operation Notes
2===================================================
ccc6cda3
JA
3
41. configure --without-gnu-malloc on:
5
6 alpha running OSF/1
7 alpha running Linux
8
9 next running NeXT/OS
10
11 all machines running SunOS YP code: SunOS4, SunOS5, HP/UX
12
d166f048 13 linux (optional, but don't do it if you're using Doug Lea's malloc)
ccc6cda3
JA
14
15 QNX 4.2
16 other OSF/1 machines (KSR/1, HP, IBM AIX/ESA)
17 AIX
18 sparc SVR4, SVR4.2 (ICL reference port)
19 DG/UX
20 Cray
21
22 NetBSD/sparc (malloc needs 8-byte alignment; GNU malloc has 4-byte)
23
24 BSD/OS 2.1 if you want to use loadable builtins
25
26 If you are using GNU libc, especially on a linux system
27
28(Configuring --without-gnu-malloc will still result in lib/malloc/libmalloc.a
29being built and linked against, but there is only a stub file in the archive.)
30
312. configure using shlicc on BSD/OS 2.1 to use loadable builtins
32
333. Bash cannot be built in a directory separate from the source directory
34 using configure --srcdir=... unless the version of `make' you're using
d166f048
JA
35 does $VPATH handling right. The script support/mkclone can be used to
36 create a `build tree' using symlinks to get around this.
37
384. I've had reports that username completion (as well as tilde expansion
39 and \u prompt expansion) does not work on IRIX 5.3 when linking with
40 -lnsl. This is only a problem when you're running NIS, since
41 apparently -lnsl supports only /etc/passwd and not the NIS functions
42 for retrieving usernames and passwords. Editing the Makefile after
43 configure runs and removing the `-lnsl' from the assignment to `LIBS'
44 fixes the problem.
45
465. There is a problem with Red Hat Linux's `makewhatis' script.
47 Running `makewhatis' with bash-2.0 results in error messages
48 like this:
49
50 /usr/sbin/makewhatis: cd: manpath: No such file or directory
51 /usr/sbin/makewhatis: manpath/whatis: No such file or directory
52 chmod: manpath/whatis: No such file or directory
53 /usr/sbin/makewhatis: cd: catpath: No such file or directory
54 /usr/sbin/makewhatis: catpath/whatis: No such file or directory
55 chmod: catpath/whatis: No such file or directory
56
57 The problem is with `makewhatis'. Red Hat (and possibly other
58 Linux distributors) uses a construct like this in the code:
59
60 eval path=$"$pages"path
61
62 to do indirect variable expansion. This `happened to work' in
63 bash-1.14 and previous versions, but that was more an accident
64 of implementation than anything else -- it was never supported
65 and certainly is not portable.
66
67 Bash-2.0 has a new feature that gives a new meaning to $"...".
68 This is explained more completely in item 1 in the COMPAT file.
69
70 The three lines in the `makewhatis' script that need to be changed
71 look like this:
72
73 eval $topath=$"$topath":$name
74 [...]
75 eval path=$"$pages"path
76 [...]
77 eval path=$"$pages"path
78
79 The portable way to write this code is
80
81 eval $topath="\$$topath":$name
82 eval path="\$$pages"path
83 eval path="\$$pages"path
84
85 You could also experiment with another new bash feature: ${!var}.
86 This does indirect variable expansion, making the use of eval
87 unnecessary.
88
896. There is a problem with syslogd on many Linux distributions (Red Hat
90 and Slackware are two that I have received reports about). syslogd
91 sends a SIGINT to its parent process, which is waiting for the daemon
92 to finish its initialization. The parent process then dies due to
93 the SIGINT, and bash reports it, causing unexpected console output
94 while the system is booting that looks something like
95
96 starting daemons: syslogd/etc/rc.d/rc.M: line 29: 38 Interrupt ${NET}/syslogd
97
98 Bash-2.0 reports events such as processes dying in scripts due to
99 signals when the standard output is a tty. Bash-1.14.x and previous
100 versions did not report such events.
101
102 This should probably be reported as a bug to whatever Linux distributor
103 people see the problem on. In my opinion, syslogd should be changed to
104 use some other method of communication, or the wrapper function (which
105 appeared to be `daemon' when I looked at it some time ago) or script
106 (which appeared to be `syslog') should catch SIGINT, since it's an
107 expected event, and exit cleanly.
108
1097. Several people have reported that `dip' (a program for SLIP/PPP
110 on Linux) does not work with bash-2.0 installed as /bin/sh.
111
112 I don't run any Linux boxes myself, and do not have the dip
113 code handy to look at, but the `problem' with bash-2.0, as
114 it has been related to me, is that bash requires the `-p'
115 option to be supplied at invocation if it is to run setuid
116 or setgid.
117
118 This means, among other things, that setuid or setgid programs
119 which call system(3) (a horrendously bad practice in any case)
120 relinquish their setuid/setgid status in the child that's forked
121 to execute /bin/sh.
122
123 The following is an *unofficial* patch to bash-2.0 that causes it
124 to not require `-p' to run setuid or setgid if invoked as `sh'.
125 It has been reported to work on Linux. It will make your system
126 vulnerable to bogus system(3) calls in setuid executables.
127
128--- ../bash-2.0.orig/shell.c Wed Dec 18 14:16:30 1996
129+++ shell.c Fri Mar 7 13:12:03 1997
130@@ -347,7 +347,7 @@
131 if (posixly_correct)
132 posix_initialize (posixly_correct);
133
134- if (running_setuid && privileged_mode == 0)
135+ if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
136 disable_priv_mode ();
137
138 /* Need to get the argument to a -c option processed in the
139