Ping: [PATCH] make pidfile permissions 644, not 666

Ian Wienand ianw at vmware.com
Wed Aug 24 22:29:03 UTC 2011


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<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;
>



More information about the busybox mailing list