diff options
author | trasz <trasz@FreeBSD.org> | 2011-06-22 19:14:49 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2011-06-22 19:14:49 +0000 |
commit | 4bd1849e7f983e321378d18d4bad3f0b4660590a (patch) | |
tree | 5f4a731d57f655ff4c76a14ac3ab952221502449 /libexec/ftpd/ftpd.c | |
parent | 3fa22c485f3792c67488fb38ae72a90e05bb7a25 (diff) | |
download | FreeBSD-src-4bd1849e7f983e321378d18d4bad3f0b4660590a.zip FreeBSD-src-4bd1849e7f983e321378d18d4bad3f0b4660590a.tar.gz |
Add LOGIN_SETCPUMASK and LOGIN_SETLOGINCLASS to the setusercontext(3)
calls in ftpd(8).
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r-- | libexec/ftpd/ftpd.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 21c218e..5894f3c 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1191,9 +1191,9 @@ end_login(void) ftpd_logwtmp(wtmpid, NULL, NULL); pw = NULL; #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) { @@ -1465,9 +1465,8 @@ skip: return; } } - 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 setlogin(pw->pw_name); (void) initgroups(pw->pw_name, pw->pw_gid); |