[systemd-devel] [systemd-commits] 8 commits - src/shared src/test src/tmpfiles

Lennart Poettering lennart at poettering.net
Sun Apr 12 09:22:25 PDT 2015


On Sun, 12.04.15 00:04, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:

> > -        if (user && !streq(user, "-")) {
> > +        if (!isempty(user) && !streq(user, "-")) {
>
> I think this change is misleading. user/group/mode/age can either be
> NULL or "-" or should be set to a valid value. It should not be possible
> to set them to an empty string. (Not that the change causes any problems,
> just commenting on the fact that the patch description implies that it
> changes stuff, but I don't see that.)

We use unquote_many_words() these days for parsing the tmpfiles
lines. That means the following line will result in user, group and
mode all being set to empty strings:


f "/tmp/foo bar" "" "" ""

I think NULL, "" and "-" should all be considered as "not specified"
and handled accordingly...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list