]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
it's OK to not be given an attribute
authorAlan T. DeKok <aland@freeradius.org>
Sun, 30 Nov 2025 16:28:02 +0000 (11:28 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 2 Dec 2025 20:45:36 +0000 (15:45 -0500)
just load all of the dictionaries, and then exit.

src/bin/radict.c

index f07dbdf96ee170e4abfcfc8a8a2f28eb0bd85a6f..637cc829fd89adb5ae38fc23556feff1c301da94 100644 (file)
@@ -58,7 +58,7 @@ DIAG_ON(unused-macros)
 
 static void usage(void)
 {
-       fprintf(stderr, "usage: radict [OPTS] <attribute> [attribute...]\n");
+       fprintf(stderr, "usage: radict [OPTS] [attribute...]\n");
        fprintf(stderr, "  -A               Export aliases.\n");
        fprintf(stderr, "  -c               Print out in CSV format.\n");
        fprintf(stderr, "  -D <dictdir>     Set main dictionary directory (defaults to " DICTDIR ").\n");
@@ -517,10 +517,7 @@ int main(int argc, char *argv[])
                goto finish;
        }
 
-       if (argc == 0) {
-               fprintf(stderr, "Missing attribute argument\n");
-               fr_exit(EXIT_FAILURE);
-       }
+       if (argc == 0) goto finish;
 
        while (argc-- > 0) {
                char                    *attr;