On Mon, Mar 02, 2009 at 03:25:19PM +0100, Denys Vlasenko wrote:
> On Monday 02 March 2009 07:03:53 am Hamish Moffatt wrote:
> > I'd like /var/log/messages to be readable by non-root users. syslogd.c
> > uses device_open to open the file though and it has the permissions
> > hardcoded to 0600.
> > 
> > I can't really see why it uses device_open... nor a good solution.
> 
> I propose this patch.

>   reopen:
> -             G.logFD = device_open(G.logFilePath, O_WRONLY | O_CREAT
> -                                     | O_NOCTTY | O_APPEND | O_NONBLOCK);
> +             G.logFD = open(G.logFilePath, O_WRONLY | O_CREAT
> +                                     | O_NOCTTY | O_APPEND | O_NONBLOCK,
> +                                     0666);

0666 is too generous I think - but it works ok. 0644 or 0664 would be
better.

thanks
Hamish
-- 
Hamish Moffatt VK3SB <ham...@debian.org> <ham...@cloud.net.au>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to