[systemd-devel] [PATCH] nspawn: use the mode_t of the source file for copy_file()

Djalal Harouni tixxdz at opendz.org
Sat Oct 26 21:43:10 CEST 2013


On Sat, Oct 26, 2013 at 09:17:10PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
> On Sat, Oct 26, 2013 at 12:59:40AM +0100, Djalal Harouni wrote:
> > Instead of hard-coding the permission mode, stat() the source file and
> > use its mode to create the destination file.
> Hi,
> 
> Is this patch trying to fix something specific? copy_file is only used
> to copy resolv.conf into the container. It's unlikely that the mode
> from host is relevant in the container.
Not precisely, was experimenting with systemd containers and noticed this,
so why not write a quick patch!

Yes now it's only for resolv.conf but I guess for any future additions
it will make sense, not to mention the different use cases of
systemd-nspawn

> > Signed-off-by: Djalal Harouni <tixxdz at opendz.org>
> No need to add that in systemd.
Ok

Thanks

-- 
Djalal Harouni
http://opendz.org


More information about the systemd-devel mailing list