diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2000-11-30 23:14:55 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2000-11-30 23:14:55 +0000 |
| commit | e292984cd37eeee8be53bf0e93da7b7cd3ce52f9 (patch) | |
| tree | b4b7692766ed431f32d28437dcb36f6a6fa724e2 | |
| parent | 88cd46c4d3ead494ee3b80c28669dad65f1c7e51 (diff) | |
Notes
| -rw-r--r-- | usr.bin/su/su.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 1745067126ed..3edacb419975 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -335,8 +335,16 @@ main(argc, argv) (void)setpriority(PRIO_PROCESS, 0, prio); #ifdef LOGIN_CAP - /* Set everything now except the environment & umask */ - setwhat = LOGIN_SETUSER|LOGIN_SETGROUP|LOGIN_SETRESOURCES|LOGIN_SETPRIORITY; + /* + * Set all user context except for: + * Environmental variables + * Umask + * Login records (wtmp, etc) + * Path + */ + setwhat = LOGIN_SETALL & ~(LOGIN_SETENV | LOGIN_SETUMASK | + LOGIN_SETLOGIN | LOGIN_SETPATH); + /* * Don't touch resource/priority settings if -m has been * used or -l and -c hasn't, and we're not su'ing to root. |
