mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
firstboot: drop redundant and spurious errno check
Follow-up for 2319154a6b.
This commit is contained in:
@@ -928,9 +928,6 @@ static int write_root_passwd(int rfd, int etc_fd, const char *password, const ch
|
||||
.pw_shell = (char *) (shell ?: default_root_shell_at(rfd)),
|
||||
};
|
||||
|
||||
if (errno != ENOENT)
|
||||
return -errno;
|
||||
|
||||
r = putpwent_sane(&root, passwd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@@ -1004,9 +1001,6 @@ static int write_root_shadow(int etc_fd, const char *hashed_password) {
|
||||
.sp_flag = ULONG_MAX, /* this appears to be what everybody does ... */
|
||||
};
|
||||
|
||||
if (errno != ENOENT)
|
||||
return -errno;
|
||||
|
||||
r = putspent_sane(&root, shadow);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user