[systemd-devel] [PATCH] tmpfiles, man: Add xattr support to tmpfiles

Lennart Poettering lennart at poettering.net
Mon Jun 17 09:18:28 PDT 2013


On Mon, 17.06.13 16:27, Maciej Wereski (m.wereski at partner.samsung.com) wrote:

> This patch makes it possible to set extended attributes on files created
> by tmpfiles. This can be especially used to set SMACK security labels on
> volatile files and directories.
> 
> To keep backwards compatibility Argument field is used. If word starts
> with "xattr=", then it is cut out from Argument and parsed. There may be
> many xattrs. Full format is:
> 
> xattr=name=value
> 
> If value contains spaces, then it must be surrounded by quotation marks.
> User can also put quotation mark in value by escaping it with
> backslash.

I think adding this certainly makes sense, but I am not sure I like the
syntax. Maybe it would be simpler to add an extra char for this ("a" or
so?). That way creating a dir and applying an xattr would require two
lines instead of one, but the stuff isn't atomic anyway. 

Admittedly adding a new "a" isn't particularly nice either, but I have
no better idea than that...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list