userdb: add new flag for excluding varlink data in lookups
This is useful to later-on use the userdb infra for only some sources.
This commit is contained in:
@@ -402,6 +402,9 @@ static int userdb_start_query(
|
||||
assert(iterator);
|
||||
assert(method);
|
||||
|
||||
if (FLAGS_SET(flags, USERDB_EXCLUDE_VARLINK))
|
||||
return -ENOLINK;
|
||||
|
||||
e = getenv("SYSTEMD_BYPASS_USERDB");
|
||||
if (e) {
|
||||
r = parse_boolean(e);
|
||||
|
||||
@@ -17,6 +17,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(UserDBIterator*, userdb_iterator_free);
|
||||
typedef enum UserDBFlags {
|
||||
/* The main sources */
|
||||
USERDB_EXCLUDE_NSS = 1 << 0, /* don't do client-side nor server-side NSS */
|
||||
USERDB_EXCLUDE_VARLINK = 1 << 1, /* don't talk to any varlink services */
|
||||
|
||||
/* Modifications */
|
||||
USERDB_SUPPRESS_SHADOW = 1 << 3, /* don't do client-side shadow calls (server side might happen though) */
|
||||
|
||||
Reference in New Issue
Block a user