diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-11-26 19:52:57 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-11-26 19:52:57 +0000 |
commit | 98a755df2dc775a1657cf6b664c78cb510db4deb (patch) | |
tree | 7ead525558d31ab6f8e145c37d1dc08a56a1e4be | |
parent | 4fc95fdfe94f9ac107251da4af4924ba34d8f68e (diff) |
setusercontext should not set umask as this interferes with the
umask specified for ftpd on the command line. Closed PR #1530
-rw-r--r-- | libexec/ftpd/ftpd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index e400e08901e..1748e86b5bd 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.81 2000/11/23 16:50:51 itojun Exp $ */ +/* $OpenBSD: ftpd.c,v 1.82 2000/11/26 19:52:56 millert Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -839,7 +839,7 @@ end_login() } pw = NULL; setusercontext(NULL, getpwuid(0), (uid_t)0, - LOGIN_SETPRIORITY|LOGIN_SETRESOURCES|LOGIN_SETUMASK); + LOGIN_SETPRIORITY|LOGIN_SETRESOURCES); logged_in = 0; guest = 0; dochroot = 0; @@ -922,9 +922,9 @@ skip: reply(550, "Can't set gid."); return; } - (void) umask(defumask); /* may be overridden by login.conf */ + (void) umask(defumask); setusercontext(lc, pw, (uid_t)0, - LOGIN_SETGROUP|LOGIN_SETPRIORITY|LOGIN_SETRESOURCES|LOGIN_SETUMASK); + LOGIN_SETGROUP|LOGIN_SETPRIORITY|LOGIN_SETRESOURCES); /* open wtmp before chroot */ ftpdlogwtmp(ttyline, pw->pw_name, remotehost); |