summaryrefslogtreecommitdiffstats
path: root/src/sysusers
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-03-04 18:52:10 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2021-03-04 23:35:52 +0100
commitbb72c434854f9f76f773edcb1f4b036372f5dc96 (patch)
tree57c8336e6251f3a36db22cb0366a8e4d131a8cf7 /src/sysusers
parentcopy: simplify error paths when creating temporary files (diff)
downloadsystemd-bb72c434854f9f76f773edcb1f4b036372f5dc96.tar.xz
systemd-bb72c434854f9f76f773edcb1f4b036372f5dc96.zip
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.
Diffstat (limited to 'src/sysusers')
-rw-r--r--src/sysusers/sysusers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index 4e231be856..88e365c662 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -393,7 +393,7 @@ static int write_temporary_passwd(const char *passwd_path, FILE **tmpfile, char
original = fopen(passwd_path, "re");
if (original) {
- r = sync_rights(fileno(original), fileno(passwd));
+ r = copy_rights(fileno(original), fileno(passwd));
if (r < 0)
return r;
@@ -494,7 +494,7 @@ static int write_temporary_shadow(const char *shadow_path, FILE **tmpfile, char
original = fopen(shadow_path, "re");
if (original) {
- r = sync_rights(fileno(original), fileno(shadow));
+ r = copy_rights(fileno(original), fileno(shadow));
if (r < 0)
return r;
@@ -590,7 +590,7 @@ static int write_temporary_group(const char *group_path, FILE **tmpfile, char **
original = fopen(group_path, "re");
if (original) {
- r = sync_rights(fileno(original), fileno(group));
+ r = copy_rights(fileno(original), fileno(group));
if (r < 0)
return r;
@@ -688,7 +688,7 @@ static int write_temporary_gshadow(const char * gshadow_path, FILE **tmpfile, ch
if (original) {
struct sgrp *sg;
- r = sync_rights(fileno(original), fileno(gshadow));
+ r = copy_rights(fileno(original), fileno(gshadow));
if (r < 0)
return r;