bin/56914: ftpd ignores default umask settings
Barry Pederson
bp at barryp.org
Thu Sep 30 09:00:55 PDT 2004
The following reply was made to PR bin/56914; it has been noted by GNATS.
From: Barry Pederson <bp at barryp.org>
To: freebsd-gnats-submit at 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);
More information about the freebsd-bugs
mailing list