Make lukemftpd properly set login class and cpumask.
This commit is contained in:
parent
20fc1d133e
commit
9b60524d55
@ -1263,8 +1263,9 @@ end_login(void)
|
||||
curclass.type = CLASS_REAL;
|
||||
(void) seteuid((uid_t)0);
|
||||
#ifdef LOGIN_CAP
|
||||
setusercontext(NULL, getpwuid(0), 0,
|
||||
LOGIN_SETPRIORITY|LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC);
|
||||
setusercontext(NULL, getpwuid(0), 0, LOGIN_SETALL & ~(LOGIN_SETLOGIN |
|
||||
LOGIN_SETUSER | LOGIN_SETGROUP | LOGIN_SETPATH |
|
||||
LOGIN_SETENV));
|
||||
#endif
|
||||
#ifdef USE_PAM
|
||||
if (pamh) {
|
||||
@ -1427,9 +1428,8 @@ pass(const char *passwd)
|
||||
#endif
|
||||
}
|
||||
setsid();
|
||||
setusercontext(lc, pw, 0,
|
||||
LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY|
|
||||
LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC);
|
||||
setusercontext(lc, pw, 0, LOGIN_SETALL &
|
||||
~(LOGIN_SETUSER | LOGIN_SETPATH | LOGIN_SETENV));
|
||||
#else
|
||||
(void) initgroups(pw->pw_name, pw->pw_gid);
|
||||
/* cache groups for cmds.c::matchgroup() */
|
||||
|
Loading…
x
Reference in New Issue
Block a user