mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
repart: set a useful access mode file for generated fstab files
We create these as temporary files with 0600 access mode. Let's adjust this before we install the files.
This commit is contained in:
@@ -7701,6 +7701,10 @@ static int context_fstab(Context *context) {
|
||||
assert_not_reached();
|
||||
}
|
||||
|
||||
r = fchmod_umask(fileno(f), 0666);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to adjust access mode of generated fstab file: %m");
|
||||
|
||||
r = flink_tmpfile(f, t, path, IN_SET(arg_append_fstab, APPEND_AUTO, APPEND_REPLACE) ? LINK_TMPFILE_REPLACE : 0);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to link temporary file to %s: %m", path);
|
||||
|
||||
Reference in New Issue
Block a user