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:
committed by
Luca Boccassi
parent
e1aec57dd1
commit
bb72c43485
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user