mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
userdb: fix enumeration of .membership files
The man page nss-systemd(8) says > The contents of these files are currently not read, and the files > should be created empty. But previously we filtered out such files, as the CONF_FILES_FILTER_MASKED flag checks if a file is empty (or symlink to null), thus any empty files were ignored. To accept empty .membership files, let's use CONF_FILES_FILTER_MASKED_BY_SYMLINK. Fixes #37945.
This commit is contained in:
@@ -1669,7 +1669,7 @@ static void discover_membership_dropins(UserDBIterator *i, UserDBFlags flags) {
|
||||
&i->dropins,
|
||||
".membership",
|
||||
NULL,
|
||||
CONF_FILES_REGULAR|CONF_FILES_BASENAME|CONF_FILES_FILTER_MASKED,
|
||||
CONF_FILES_REGULAR|CONF_FILES_BASENAME|CONF_FILES_FILTER_MASKED_BY_SYMLINK,
|
||||
USERDB_DROPIN_DIR_NULSTR("userdb"));
|
||||
if (r < 0)
|
||||
log_debug_errno(r, "Failed to find membership drop-ins, ignoring: %m");
|
||||
|
||||
Reference in New Issue
Block a user