summaryrefslogtreecommitdiffstats
path: root/contrib/lukemftpd
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2011-06-30 20:58:38 +0000
committertrasz <trasz@FreeBSD.org>2011-06-30 20:58:38 +0000
commit9b60524d55a04a52c6db239367fdfd7e6752c415 (patch)
treedbdeb1121d7a44597afa69527971fc276e84b514 /contrib/lukemftpd
parent20fc1d133e0d855522bbedc6a2a00ae2b519100b (diff)
downloadFreeBSD-src-9b60524d55a04a52c6db239367fdfd7e6752c415.zip
FreeBSD-src-9b60524d55a04a52c6db239367fdfd7e6752c415.tar.gz
Make lukemftpd properly set login class and cpumask.
Diffstat (limited to 'contrib/lukemftpd')
-rw-r--r--contrib/lukemftpd/src/ftpd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/lukemftpd/src/ftpd.c b/contrib/lukemftpd/src/ftpd.c
index afdd517..8b06649 100644
--- a/contrib/lukemftpd/src/ftpd.c
+++ b/contrib/lukemftpd/src/ftpd.c
@@ -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() */
OpenPOWER on IntegriCloud