mirror of
https://github.com/systemd/systemd.git
synced 2025-02-25 21:57:32 +03:00
sysusers: reduce duplication in param list definition
This commit is contained in:
parent
ed5ce9ad1d
commit
28e014fed0
@ -867,13 +867,13 @@ static int write_temporary_gshadow(const char * gshadow_path, FILE **ret_tmpfile
|
||||
static int write_files(void) {
|
||||
_cleanup_fclose_ FILE *passwd = NULL, *group = NULL, *shadow = NULL, *gshadow = NULL;
|
||||
_cleanup_(unlink_and_freep) char *passwd_tmp = NULL, *group_tmp = NULL, *shadow_tmp = NULL, *gshadow_tmp = NULL;
|
||||
const char *passwd_path, *shadow_path, *group_path, *gshadow_path;
|
||||
int r;
|
||||
|
||||
passwd_path = prefix_roota(arg_root, "/etc/passwd");
|
||||
shadow_path = prefix_roota(arg_root, "/etc/shadow");
|
||||
group_path = prefix_roota(arg_root, "/etc/group");
|
||||
gshadow_path = prefix_roota(arg_root, "/etc/gshadow");
|
||||
const char
|
||||
*passwd_path = prefix_roota(arg_root, "/etc/passwd"),
|
||||
*shadow_path = prefix_roota(arg_root, "/etc/shadow"),
|
||||
*group_path = prefix_roota(arg_root, "/etc/group"),
|
||||
*gshadow_path = prefix_roota(arg_root, "/etc/gshadow");
|
||||
|
||||
r = write_temporary_group(group_path, &group, &group_tmp);
|
||||
if (r < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user