mirror of
https://github.com/systemd/systemd.git
synced 2024-10-29 21:55:36 +03:00
sysusers: use filename if /proc is not mounted
During system install, /proc may not be mounted yet. Fixes RHBZ#2036217 (https://bugzilla.redhat.com/show_bug.cgi?id=2036217).
This commit is contained in:
parent
0d03e672a9
commit
b78d7f2468
@ -284,7 +284,7 @@ static int make_backup(const char *target, const char *x) {
|
||||
|
||||
/* Copy over the access mask. Don't fail on chmod() or chown(). If it stays owned by us and/or
|
||||
* unreadable by others, then it isn't too bad... */
|
||||
r = fchmod_and_chown(fileno(dst), st.st_mode & 07777, st.st_uid, st.st_gid);
|
||||
r = fchmod_and_chown_with_fallback(fileno(dst), dst_tmp, st.st_mode & 07777, st.st_uid, st.st_gid);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Failed to change access mode or ownership of %s: %m", backup);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user