[PATCH] make pidfile permissions 644, not 666

Ian Wienand ianw at vmware.com
Fri Apr 29 22:30:44 UTC 2011


Hi,

666 seems too permissive for default pidfile permissions.

-i


Signed-off-by: Ian Wienand <ianw at vmware.com>

---
 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;
 
-- 
tg: (0f02b6a..) vmware/pidfile-permissions (depends on: vmkernel-main)


More information about the busybox mailing list