From: Lennart Poettering Date: Thu, 16 Nov 2017 11:24:32 +0000 (+0100) Subject: main: uid_to_name() might theoretically fail, handle that X-Git-Tag: v236~190^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a68aef7a957153d538e70c5230a5db004d935367;p=thirdparty%2Fsystemd.git main: uid_to_name() might theoretically fail, handle that --- diff --git a/src/core/main.c b/src/core/main.c index a97c6e1f4ef..4b395601a04 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1892,8 +1892,8 @@ int main(int argc, char *argv[]) { _cleanup_free_ char *t; t = uid_to_name(getuid()); - log_debug(PACKAGE_STRING " running in %suser mode for user "UID_FMT"/%s. (" SYSTEMD_FEATURES ")", - arg_action == ACTION_TEST ? " test" : "", getuid(), t); + log_debug(PACKAGE_STRING " running in %suser mode for user " UID_FMT "/%s. (" SYSTEMD_FEATURES ")", + arg_action == ACTION_TEST ? " test" : "", getuid(), strna(t)); } if (arg_action == ACTION_RUN) {