version 1.63, 2010/12/10 19:55:37 |
version 1.64, 2010/12/13 14:46:19 |
|
|
*/ |
*/ |
if (getsid(0) != getpid()) |
if (getsid(0) != getpid()) |
flags &= ~LOGIN_SETLOGIN; |
flags &= ~LOGIN_SETLOGIN; |
} else |
} else { |
flags = (asthem ? (LOGIN_SETPRIORITY | LOGIN_SETUMASK) : 0) | |
flags = LOGIN_SETRESOURCES|LOGIN_SETGROUP|LOGIN_SETUSER; |
LOGIN_SETRESOURCES | LOGIN_SETGROUP | LOGIN_SETUSER; |
if (asthem) |
|
flags |= LOGIN_SETENV|LOGIN_SETPRIORITY|LOGIN_SETUMASK; |
|
} |
if (setusercontext(lc, pwd, pwd->pw_uid, flags) != 0) |
if (setusercontext(lc, pwd, pwd->pw_uid, flags) != 0) |
auth_err(as, 1, "unable to set user context"); |
auth_err(as, 1, "unable to set user context"); |
if (pwd->pw_uid && auth_approval(as, lc, pwd->pw_name, "su") <= 0) |
if (pwd->pw_uid && auth_approval(as, lc, pwd->pw_name, "su") <= 0) |