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

2013-10-27 Thread Lennart Poettering
On Sat, 26.10.13 21:17, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) 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

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

2013-10-26 Thread Zbigniew Jędrzejewski-Szmek
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.

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

2013-10-26 Thread Djalal Harouni
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

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

2013-10-26 Thread Zbigniew Jędrzejewski-Szmek
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

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

2013-10-25 Thread Djalal Harouni
Instead of hard-coding the permission mode, stat() the source file and use its mode to create the destination file. Signed-off-by: Djalal Harouni tix...@opendz.org --- src/shared/util.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/util.c b/src/shared/util.c