mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
fileio: Rename rename_and_apply_smack to rename_and_apply_smack_floor_label.
This commit is contained in:
parent
90c81688ff
commit
2da3dc69e7
@ -1197,7 +1197,7 @@ int sync_rights(int from, int to) {
|
||||
return fchmod_and_chown(to, st.st_mode & 07777, st.st_uid, st.st_gid);
|
||||
}
|
||||
|
||||
int rename_and_apply_smack(const char *from, const char *to) {
|
||||
int rename_and_apply_smack_floor_label(const char *from, const char *to) {
|
||||
int r = 0;
|
||||
if (rename(from, to) < 0)
|
||||
return -errno;
|
||||
|
@ -109,4 +109,4 @@ int warn_file_is_world_accessible(const char *filename, struct stat *st, const c
|
||||
|
||||
int sync_rights(int from, int to);
|
||||
|
||||
int rename_and_apply_smack(const char *temp_path, const char *dest_path);
|
||||
int rename_and_apply_smack_floor_label(const char *temp_path, const char *dest_path);
|
||||
|
@ -772,14 +772,14 @@ static int write_files(void) {
|
||||
|
||||
/* And make the new files count */
|
||||
if (group) {
|
||||
r = rename_and_apply_smack(group_tmp, group_path);
|
||||
r = rename_and_apply_smack_floor_label(group_tmp, group_path);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
group_tmp = mfree(group_tmp);
|
||||
}
|
||||
if (gshadow) {
|
||||
r = rename_and_apply_smack(gshadow_tmp, gshadow_path);
|
||||
r = rename_and_apply_smack_floor_label(gshadow_tmp, gshadow_path);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@ -787,14 +787,14 @@ static int write_files(void) {
|
||||
}
|
||||
|
||||
if (passwd) {
|
||||
r = rename_and_apply_smack(passwd_tmp, passwd_path);
|
||||
r = rename_and_apply_smack_floor_label(passwd_tmp, passwd_path);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
passwd_tmp = mfree(passwd_tmp);
|
||||
}
|
||||
if (shadow) {
|
||||
r = rename_and_apply_smack(shadow_tmp, shadow_path);
|
||||
r = rename_and_apply_smack_floor_label(shadow_tmp, shadow_path);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user