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

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Oct 26 22:07:42 CEST 2013


On Sat, Oct 26, 2013 at 08:43:10PM +0100, Djalal Harouni wrote:
> 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
Users, groups, and modes in the container don't have to be meaning
full outside of it, and the other way too. If any other users of this
function come up, let's revisit this then.

Zbyszek


More information about the systemd-devel mailing list