From ebf4e8013b2928fdcfa6008ee6559e8c7e1fd60b Mon Sep 17 00:00:00 2001 From: Maciej Wereski Date: Thu, 4 Dec 2014 10:32:10 +0100 Subject: tmpfiles, man: Add xattr support to tmpfiles 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. It is done by adding new line of type "t". Such line should contain attributes in Argument field, using following format: name=value All other fields are ignored. 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. Example: D /var/run/cups - - - - t /var/run/cups - - - - security.SMACK64=printing --- man/tmpfiles.d.xml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'man/tmpfiles.d.xml') diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 1b14d69a91..4f2e6406a8 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -343,6 +343,25 @@ L /tmp/foobar - - - - /dev/null normal path names. + + + t + Set extended + attributes on item. It may be + used in conjunction with other + types (only d, + D, f, + F, L, + p, c, + b, makes sense). + If used as a standalone line, then + systemd-tmpfiles + will try to set extended + attributes on specified path. + This can be especially used to set + SMACK labels. + + If the exclamation mark is used, this @@ -430,7 +449,7 @@ r! /tmp/.X[0-9]*-lock will not be modified. This parameter is ignored for x, r, R, - L lines. + L, t lines. Optionally, if prefixed with ~, the access mode is masked @@ -462,8 +481,8 @@ r! /tmp/.X[0-9]*-lock ownership will not be modified. These parameters are ignored for x, r, - R, L - lines. + R, L, + t lines. @@ -527,8 +546,8 @@ r! /tmp/.X[0-9]*-lock specify a short string that is written to the file, suffixed by a newline. For C, specifies the source file - or directory. Ignored for all other - lines. + or directory. For t determines + extended attributes to be set. Ignored for all other lines. @@ -540,7 +559,8 @@ r! /tmp/.X[0-9]*-lock screen needs two directories created at boot with specific modes and ownership. d /run/screens 1777 root root 10d -d /run/uscreens 0755 root root 10d12h +d /run/uscreens 0755 root root 10d12h +t /run/screen - - - - user.name="John Smith" security.SMACK64=screen /etc/tmpfiles.d/abrt.conf example -- cgit v1.2.3-54-g00ecf