mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
In main.c: 158: if(sh.ppid==1) 159: sh.login_sh++; If that was ever valid, it certainly is not now. As far as I know, there is no currently existing system where PID 1 (init or systemd or whatever) is the parent shell of the login shell, even straight after bootup; login shells are invoked via a program like login(1). Plus, there is no guarantee the init process actually has PID 1. This invalidates all use of login_sh that couldn't be replaced by checks for the login_shell option, so this commit does just that. src/cmd/ksh93/include/shell.h: - Remove login_sh flag. src/cmd/ksh93/sh/init.c: - If a login shell was detected, just set the login_shell option. - Remove obsolete check for #! setuid scripts. This was meant to guard against a symlink called '-i' to a setuid script with a hashbang path, which used to give users a root shell. All modern Unixes ignore the setuid bit when they detect a hashbang path. src/cmd/ksh93/SHOPT.sh: - By default, let's require the -p/--privileged invocation option for the setuid/setgid bit on the shell binary to be respected, for all user IDs (>= 0). This is what bash and mksh do, and it seems sensible. (See init.c 1475-1483) |
||
|---|---|---|
| .. | ||
| completion.c | ||
| edit.c | ||
| emacs.c | ||
| hexpand.c | ||
| history.c | ||
| vi.c | ||