summaryrefslogtreecommitdiff
path: root/src/userdb
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-11-08 17:27:26 +0100
committerLennart Poettering <lennart@poettering.net>2021-11-08 21:40:30 +0100
commit4083d825e9e82e6e7500da41d668d3a76c16fb98 (patch)
tree7663ac37b160abceba5af2aa9151c5c98d2ce491 /src/userdb
parente032cbd591decfdd27e5a106ee3b33144865b2dd (diff)
downloadsystemd-4083d825e9e82e6e7500da41d668d3a76c16fb98.tar.gz
userdbctl: add a switch for explicitly enabling/disabling multiplexer-based lookups
This is incredibly useful for debugging.
Diffstat (limited to 'src/userdb')
-rw-r--r--src/userdb/userdbctl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c
index 11b3a1c921..5f3831d70c 100644
--- a/src/userdb/userdbctl.c
+++ b/src/userdb/userdbctl.c
@@ -617,6 +617,7 @@ static int help(int argc, char *argv[], void *userdata) {
" --synthesize=BOOL Synthesize root/nobody user\n"
" --with-dropin=BOOL Control whether to include drop-in records\n"
" --with-varlink=BOOL Control whether to talk to services at all\n"
+ " --multiplexer=BOOL Control whether to use the multiplexer\n"
" --json=pretty|short JSON output mode\n"
"\nSee the %s for details.\n",
program_invocation_short_name,
@@ -638,6 +639,7 @@ static int parse_argv(int argc, char *argv[]) {
ARG_WITH_DROPIN,
ARG_WITH_VARLINK,
ARG_SYNTHESIZE,
+ ARG_MULTIPLEXER,
ARG_JSON,
};
@@ -652,6 +654,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "with-dropin", required_argument, NULL, ARG_WITH_DROPIN },
{ "with-varlink", required_argument, NULL, ARG_WITH_VARLINK },
{ "synthesize", required_argument, NULL, ARG_SYNTHESIZE },
+ { "multiplexer", required_argument, NULL, ARG_MULTIPLEXER },
{ "json", required_argument, NULL, ARG_JSON },
{}
};
@@ -787,6 +790,14 @@ static int parse_argv(int argc, char *argv[]) {
SET_FLAG(arg_userdb_flags, USERDB_DONT_SYNTHESIZE, !r);
break;
+ case ARG_MULTIPLEXER:
+ r = parse_boolean_argument("--multiplexer=", optarg, NULL);
+ if (r < 0)
+ return r;
+
+ SET_FLAG(arg_userdb_flags, USERDB_AVOID_MULTIPLEXER, !r);
+ break;
+
case '?':
return -EINVAL;