if (streq(verb, "start")) {
_cleanup_(user_record_unrefp) UserRecord *ur = NULL;
r = userdb_by_name(user, /* match= */ NULL, USERDB_PARSE_NUMERIC|USERDB_SUPPRESS_SHADOW, &ur);
- if (r == -ESRCH)
- return log_error_errno(r, "User '%s' does not exist: %m", user);
if (r < 0)
- return log_error_errno(r, "Failed to resolve user '%s': %m", user);
+ return log_error_errno(r, "Failed to resolve user '%s': %s", user, STRERROR_USER(r));
/* We do two things here: mount the per-user XDG_RUNTIME_DIR, and set up tmpfs quota on /tmp/
* and /dev/shm/. */
r = userdb_start_query(iterator, "io.systemd.UserDatabase.GetUserRecord", /* more= */ false, query, flags);
if (r >= 0) {
r = userdb_process(iterator, &ur, /* ret_group_record= */ NULL, /* ret_user_name= */ NULL, /* ret_group_name= */ NULL);
- if (r == -ENOEXEC) /* found a user matching UID or name, but not filter. In this case the
+ if (r == -ENOEXEC) /* Found a user matching UID or name, but not filter. In this case the
* fallback paths below are pointless */
return r;
}