[systemd-devel] [PATCH] unit: add specifiers for user name and home directory

Lennart Poettering lennart at poettering.net
Thu Dec 15 07:01:05 PST 2011


On Fri, 09.12.11 03:00, Ran Benita (ran234 at gmail.com) wrote:

> +        _username = username;
> +        r = get_user_creds(&_username, &uid, &gid, &home);
> +        free(username);
> +        if (r)
> +                return NULL;
> +
> +        /* specifier == '~' */

Do we really want '~' here, and not 'h'? Sounds a bit weird to me to
chain up weird characters like % and ~ in a sequence. %h might be less
of a surprise to the user?

And please pass uid and gid as NULL, get_user_creds() can deal with
that.

> +        return strdup(home);

Otherwise looks fine. Thanks!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list