[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xenstore: create pidfile in init-xenstore-domain

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

+       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.


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 also noticed that the file contents are missing a trailing
newline after submission.

Daniel De Graaf
National Security Agency

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.