commit 59ee2147f50ef1112a6fadc11cfaaf5b6e5be8b8
parent fd4caf1e0521ed0b9c39f0ead6dddc5a29ec8daa
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Wed, 15 Jul 2026 23:45:43 +0200
allow -d if merely env variable is set
Diffstat:
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/challenger/challenger-admin.c b/src/challenger/challenger-admin.c
@@ -95,19 +95,6 @@ run (void *cls,
global_ret = EXIT_INVALIDARGUMENT;
return;
}
- if (NULL == client_secret)
- client_secret = getenv ("CHALLENGER_CLIENT_SECRET");
- if ( (NULL != client_secret) &&
- (0 != strncasecmp (client_secret,
- RFC_8959_PREFIX,
- strlen (RFC_8959_PREFIX))) )
- {
- fprintf (stderr,
- "CLIENT_SECRET must begin with `%s'\n",
- RFC_8959_PREFIX);
- global_ret = EXIT_INVALIDARGUMENT;
- return;
- }
if (NULL ==
(db = CHALLENGERDB_connect (cfg)))
{
@@ -156,6 +143,19 @@ run (void *cls,
}
goto cleanup;
}
+ if (NULL == client_secret)
+ client_secret = getenv ("CHALLENGER_CLIENT_SECRET");
+ if ( (NULL != client_secret) &&
+ (0 != strncasecmp (client_secret,
+ RFC_8959_PREFIX,
+ strlen (RFC_8959_PREFIX))) )
+ {
+ fprintf (stderr,
+ "CLIENT_SECRET must begin with `%s'\n",
+ RFC_8959_PREFIX);
+ global_ret = EXIT_INVALIDARGUMENT;
+ return;
+ }
if (NULL != client_id)
{
enum GNUNET_DB_QueryStatus qs;