[systemd-devel] [PATCH] sysusers: Preserve label of /etc/{passwd, group}

Colin Walters walters at verbum.org
Sun Jul 13 13:35:33 PDT 2014


On Sat, Jul 12, 2014, at 06:48 AM, Zbigniew Jędrzejewski-Szmek wrote:
> 
> please excuse my possibly ignorant questions, selinux is not my forte.
> If the files are nonexistent, will this fail? But sysusers should be
> able to create /etc from scratch.

True, fixed.

> Why cannot the same code as in write_string_file_atomic_label be used
> instead?

We're writing more than one line, and in addition we need to look up the
label for /etc/passwd even if we're operating on a chroot.
 
> BTW, you're returning -1 here, but should be -errno.

This code is gone now; new patch attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sysusers-Ensure-etc-passwd-group-are-labeled-correct.patch
Type: text/x-patch
Size: 1879 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140713/a7934507/attachment.bin>


More information about the systemd-devel mailing list