From 835f5e14dc40b8ef3c93bdc976477c38a63d018b Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Wed, 10 Aug 2022 15:03:44 +0900 Subject: [PATCH 1/3] Fix handling of default option values in createuser Add description of which one is the default between two complementary options of --bypassrls and --replication in the help text. In correspondence let the command always include the tokens corresponding to every options of that kind in the SQL command sent to server. --- src/bin/scripts/createuser.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c index 991930a1ae..afde9bed5f 100644 --- a/src/bin/scripts/createuser.c +++ b/src/bin/scripts/createuser.c @@ -270,6 +270,12 @@ main(int argc, char *argv[]) createrole = TRI_NO; } + if (bypassrls == 0) + bypassrls = TRI_NO; + + if (replication == 0) + replication = TRI_NO; + if (inherit == 0) inherit = TRI_YES; @@ -432,9 +438,10 @@ help(const char *progname) printf(_(" --interactive prompt for missing role name and attributes rather\n" " than using defaults\n")); printf(_(" --bypassrls role can bypass row-level security (RLS) policy\n")); - printf(_(" --no-bypassrls role cannot bypass row-level security (RLS) policy\n")); + printf(_(" --no-bypassrls role cannot bypass row-level security (RLS) policy\n" + " (default)\n")); printf(_(" --replication role can initiate replication\n")); - printf(_(" --no-replication role cannot initiate replication\n")); + printf(_(" --no-replication role cannot initiate replication (default)\n")); printf(_(" -?, --help show this help, then exit\n")); printf(_("\nConnection options:\n")); printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); -- 2.31.1