[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xenstore: create pidfile in init-xenstore-domain
On Wed, 2013-04-24 at 14:05 +0100, Daniel De Graaf wrote: > On 04/24/2013 07:24 AM, Ian Campbell wrote: > > On Mon, 2013-04-22 at 18:06 +0100, Daniel De Graaf wrote: > > > >> @@ -90,5 +91,12 @@ int main(int argc, char** argv) > >> xs_write(xsh, XBT_NULL, "/tool/xenstored/domid", buf, rv); > >> xs_daemon_close(xsh); > >> > >> + fd = creat("/var/run/xenstored.pid", 0666); > > > > This is world writeable which doesn't seem like a good idea. > > > > Most of the pidfiles on my system seem to use 0644. > > > > Ian. > > > > The mode specified here is ANDed with your ~umask, which is usually > something like 0022. If you prefer an explicit 0644, that's easy to > change. I've no idea what umask typically looks like when running an initscript from /sbin/init though. But on Debian: $ grep umask /etc/init.d/rc* /etc/init.d/rc:umask 022 OK, I think I'm sold on 0666, thanks! > I also noticed that the file contents are missing a trailing > newline after submission. Shall I just add \n as I commit? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |