ntpd: abort if argvs are (unexpectedly) given
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 2 Jul 2019 09:28:18 +0000 (11:28 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 2 Jul 2019 09:28:18 +0000 (11:28 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/ntpd.c

index cd6da2b3843c94de344354dc620f23498eca6feb..d55b070c5b07c39f49c814207a1c5a04939086e5 100644 (file)
@@ -2436,7 +2436,8 @@ static NOINLINE void ntp_init(char **argv)
                        "d" /* compat */
                        "46aAbgL" /* compat, ignored */
                                "\0"
-                               "dd:wn"  /* -d: counter; -p: list; -w implies -n */
+                               "=0"      /* should have no arguments */
+                               ":dd:wn"  /* -d: counter; -p: list; -w implies -n */
                                IF_FEATURE_NTPD_SERVER(":Il") /* -I implies -l */
                        IF_FEATURE_NTP_AUTH(, &key_file_path)
                        , &peers, &G.script_name