[systemd-devel] [PATCH] Add usernames as arguments to tmpfiles ignore directives.

Thomas Blume Thomas.Blume at suse.com
Mon Jan 12 06:11:08 PST 2015

On Donnerstag 2015-01-08 21:29, Zbigniew Jędrzejewski-Szmek wrote:

> On Thu, Jan 08, 2015 at 01:37:57PM +0100, Thomas Blume wrote:
>> Currently, systemd can only ignore files specified by their path, during
>> tmpdir cleanup. This patch adds the feature to give usernames as argument.
>> During cleanup the file ownership is checked and files that match the specified
>> usernames are ignored.
>> For example, you could give:
>> X /tmp/* - - - - testuser3,testuser2
> I think the patch is useful, but the syntax is wrong. We already have a field
> for user name - it is the 4th column. The advantage is that it would be natually
> possible to extend it to groups.

I was looking at the UID column, but it seems that only one username can
be passed that way.
For a list of usernames, I'd have to tweak the get_user_creds function, which
seemed too intrusive to me.
In addition i->uid_set is set when UID is present, and I didn't want to have
some undesired side effects from this.


Thomas Blume

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstr. 5 / D-90409 Nürnberg / Phone: +49-911-740 53 - 0 / VOIP: 3919
GPG 2048R/2CD4D3E8 9A50 048F 1C73 59AA 4D2E  424E B3C6 3FD9 2CD4 D3E8

More information about the systemd-devel mailing list