Date: Thu, 30 Sep 2004 16:00:54 GMT From: Barry Pederson <bp@barryp.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/56914: ftpd ignores default umask settings Message-ID: <200409301600.i8UG0sdL076917@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/56914; it has been noted by GNATS. From: Barry Pederson <bp@barryp.org> To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/56914: ftpd ignores default umask settings Date: Thu, 30 Sep 2004 11:00:35 -0500 I've been burned by this too, but here's a pretty simple patch that stops the login class umasks from overriding what's on the commandline: --- libexec/ftpd/ftpd.c.original Fri Feb 14 06:42:42 2003 +++ libexec/ftpd/ftpd.c Thu Sep 30 10:48:22 2004 @@ -1187,7 +1187,7 @@ pw = NULL; #ifdef LOGIN_CAP setusercontext(NULL, getpwuid(0), (uid_t)0, - LOGIN_SETPRIORITY|LOGIN_SETRESOURCES|LOGIN_SETUMASK); + LOGIN_SETPRIORITY|LOGIN_SETRESOURCES); #endif logged_in = 0; guest = 0; @@ -1428,7 +1428,7 @@ } setusercontext(lc, pw, (uid_t)0, LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY| - LOGIN_SETRESOURCES|LOGIN_SETUMASK); + LOGIN_SETRESOURCES); #else setlogin(pw->pw_name); (void) initgroups(pw->pw_name, pw->pw_gid);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409301600.i8UG0sdL076917>