summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-11-16 12:24:32 +0100
committerLennart Poettering <lennart@poettering.net>2017-11-17 11:28:17 +0100
commita68aef7a957153d538e70c5230a5db004d935367 (patch)
treec0ed712435a3c412eb6e3d45c84c9874a47b1c0d /src
parent1e41242e11e33888234c2ac8ef0e57f9efc90e71 (diff)
downloadsystemd-a68aef7a957153d538e70c5230a5db004d935367.tar.gz
systemd-a68aef7a957153d538e70c5230a5db004d935367.tar.bz2
systemd-a68aef7a957153d538e70c5230a5db004d935367.zip
main: uid_to_name() might theoretically fail, handle that
Diffstat (limited to 'src')
-rw-r--r--src/core/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/main.c b/src/core/main.c
index a97c6e1f4e..4b395601a0 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) {