]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
recursor: abort when unused arguments remain 6210/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 19 Jan 2018 23:57:51 +0000 (00:57 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 19 Jan 2018 23:57:51 +0000 (00:57 +0100)
Copied this over from receiver.cc, as @ahupowerdns pointed out that Auth handles this.

pdns/pdns_recursor.cc

index d96a64be9734dc6793b4bcf3966a16d5a4d411c3..63b3db1a30fb3713ce939a66d24d0fd8631cdaea 100644 (file)
@@ -3435,6 +3435,11 @@ int main(int argc, char **argv)
     }
     cleanSlashes(configname);
 
+    if(!::arg().getCommands().empty()) {
+      cerr<<"Fatal: non-option on the command line, perhaps a '--setting=123' statement missed the '='?"<<endl;
+      exit(99);
+    }
+
     if(::arg().mustDo("config")) {
       cout<<::arg().configstring()<<endl;
       exit(0);