[systemd-devel] [PATCH] tmpfiles: copy - stop if chown/chmod fails

Lennart Poettering lennart at poettering.net
Thu Jun 19 15:24:02 PDT 2014


On Thu, 19.06.14 22:48, Thomas H.P. Andersen (phomes at gmail.com) wrote:

> From: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
> 
> after 19f3934057d20c63f4c95791312038a41b4666d0 the errors from chown/chmod
> will be cleared before being read. Presumably to clear the possible EEXIST
> from copying to an existing directory.
> Note: with this patch we stop immediately on error in chown/chmod while before
> we would attempt to copy anyway.

Ah, this was actually intended to follow a scheme where we neither abort
on failure, not ignore the error completely, but simply do things as
good as we can and return the most recent error. After all this is a
file copy operation, and hence trying to copy things as possible, even
if caps for chmod/chown are missing might be OK.

I fixed that now with a different patch!

Thanks a lot for the pointer!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list