copy: move sync_rights() to copy.c and rename copy_rights()

It's so similar to copy_access(), hence let's move it over and rename it
in similar style to the rest of the functions.

No change in behaviour, just moving things over.
This commit is contained in:
Lennart Poettering
2021-03-04 22:35:52 +00:00
committed by Luca Boccassi
parent e1aec57dd1
commit bb72c43485
6 changed files with 23 additions and 17 deletions
+2 -2
View File
@@ -675,7 +675,7 @@ static int write_root_passwd(const char *passwd_path, const char *password, cons
if (original) {
struct passwd *i;
r = sync_rights(fileno(original), fileno(passwd));
r = copy_rights(fileno(original), fileno(passwd));
if (r < 0)
return r;
@@ -743,7 +743,7 @@ static int write_root_shadow(const char *shadow_path, const char *hashed_passwor
if (original) {
struct spwd *i;
r = sync_rights(fileno(original), fileno(shadow));
r = copy_rights(fileno(original), fileno(shadow));
if (r < 0)
return r;