From: Lennart Poettering Date: Wed, 22 Jan 2025 10:55:24 +0000 (+0100) Subject: userdbctl: don't expect argument to --fuzzy X-Git-Tag: v258-rc1~1531^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=165275fe803d0d001a0991014da928e44ed25941;p=thirdparty%2Fsystemd.git userdbctl: don't expect argument to --fuzzy The getopt() parser was completely wrong, it expected an argument where wasn't expected or processes. The test cases only passed by accident because they use the "user" verb which is also the default verb. It would be accidently read as argument for --fuzzy and ignored. Fix that. --- diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c index e47c3761d0b..8a85778ef7d 100644 --- a/src/userdb/userdbctl.c +++ b/src/userdb/userdbctl.c @@ -1227,7 +1227,7 @@ static int parse_argv(int argc, char *argv[]) { { "chain", no_argument, NULL, ARG_CHAIN }, { "uid-min", required_argument, NULL, ARG_UID_MIN }, { "uid-max", required_argument, NULL, ARG_UID_MAX }, - { "fuzzy", required_argument, NULL, 'z' }, + { "fuzzy", no_argument, NULL, 'z' }, { "disposition", required_argument, NULL, ARG_DISPOSITION }, { "boundaries", required_argument, NULL, ARG_BOUNDARIES }, {}