mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
sysusers: flush nscd's caches whenever /etc/{passwd,group} are modified
This commit is contained in:
parent
77c93e0a4e
commit
d481b83052
@ -15,6 +15,7 @@
|
||||
#include "hashmap.h"
|
||||
#include "main-func.h"
|
||||
#include "mount-util.h"
|
||||
#include "nscd-flush.h"
|
||||
#include "pager.h"
|
||||
#include "path-util.h"
|
||||
#include "pretty-print.h"
|
||||
@ -798,6 +799,9 @@ static int write_files(void) {
|
||||
return r;
|
||||
|
||||
group_tmp = mfree(group_tmp);
|
||||
|
||||
if (!arg_root && !arg_image)
|
||||
(void) nscd_flush_cache(STRV_MAKE("group"));
|
||||
}
|
||||
if (gshadow) {
|
||||
r = rename_and_apply_smack_floor_label(gshadow_tmp, gshadow_path);
|
||||
@ -813,6 +817,9 @@ static int write_files(void) {
|
||||
return r;
|
||||
|
||||
passwd_tmp = mfree(passwd_tmp);
|
||||
|
||||
if (!arg_root && !arg_image)
|
||||
(void) nscd_flush_cache(STRV_MAKE("passwd"));
|
||||
}
|
||||
if (shadow) {
|
||||
r = rename_and_apply_smack_floor_label(shadow_tmp, shadow_path);
|
||||
|
Loading…
Reference in New Issue
Block a user