Aren't most uses of 0666 implicitly assuming some umask activity? I know that the common umask of 022 will turn this into 0644, which is usually what you want.
However, we have a system where U=G almost always in order to have the desired functionality, and there the default umask is 02, resulting in 0664, which is what is necessary there. The point is that the 0666 is not to be assumed to be the final value. Also the point is that to use this proposed new code in our system we would have had to find it, and change it to something else in the source, rather than relying on umask. (Which is what umask is for.) Seems like a bad patch to me. -- Jim -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ian Wienand Sent: Wednesday, August 24, 2011 3:29 PM To: [email protected] Subject: Ping: [PATCH] make pidfile permissions 644, not 666 ping on this ... I still think there's no valid reason to create a pidfile with 666 permissions. -i On 04/29/2011 03:30 PM, Ian Wienand wrote: > Hi, > > 666 seems too permissive for default pidfile permissions. > > -i > > > Signed-off-by: Ian Wienand<[email protected]> > > --- > libbb/pidfile.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/libbb/pidfile.c b/libbb/pidfile.c > index a48dfc3..ef58159 100644 > --- a/libbb/pidfile.c > +++ b/libbb/pidfile.c > @@ -23,7 +23,7 @@ void FAST_FUNC write_pidfile(const char *path) > if (!path) > return; > /* we will overwrite stale pidfile */ > - pid_fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0666); > + pid_fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0644); > if (pid_fd< 0) > return; > _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
