1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00

main: uid_to_name() might theoretically fail, handle that

This commit is contained in:
Lennart Poettering 2017-11-16 12:24:32 +01:00
parent 1e41242e11
commit a68aef7a95

View File

@ -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) {