summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-setuid.c
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-09-13 20:39:58 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-09-13 20:39:58 -0400
commitb3ec0a0674f4e499bcb6d2469acdf9d2d574c3d6 (patch)
tree374687545d464bb1e57991cf73b654a7fa0b83ba /src/nspawn/nspawn-setuid.c
parentf6e7ffdf3fe8e3ed5e659f747946461350ade5a8 (diff)
parentae8150ecbd54765622aadf288100440d71a10ccd (diff)
Merge tag 'systemd/v231-1.parabola1' into systemd/parabola
Diffstat (limited to 'src/nspawn/nspawn-setuid.c')
-rw-r--r--src/nspawn/nspawn-setuid.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nspawn/nspawn-setuid.c b/src/nspawn/nspawn-setuid.c
index ee15a47e93..b8e8e091c8 100644
--- a/src/nspawn/nspawn-setuid.c
+++ b/src/nspawn/nspawn-setuid.c
@@ -124,14 +124,12 @@ int change_uid_gid(const char *user, char **_home) {
fd = -1;
if (!fgets(line, sizeof(line), f)) {
-
if (!ferror(f)) {
log_error("Failed to resolve user %s.", user);
return -ESRCH;
}
- log_error_errno(errno, "Failed to read from getent: %m");
- return -errno;
+ return log_error_errno(errno, "Failed to read from getent: %m");
}
truncate_nl(line);
@@ -214,8 +212,7 @@ int change_uid_gid(const char *user, char **_home) {
return -ESRCH;
}
- log_error_errno(errno, "Failed to read from getent: %m");
- return -errno;
+ return log_error_errno(errno, "Failed to read from getent: %m");
}
truncate_nl(line);