]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbget: don't ignore unknown options
authorRalph Boehme <slow@samba.org>
Fri, 10 Sep 2021 05:12:57 +0000 (07:12 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 10 Sep 2021 15:10:30 +0000 (15:10 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/utils/smbget.c

index 250f02efec487dabf3c8545cb7418891b55b617d..19958f35afabf4ab8fd1b6609008e9fccfdbb3c2 100644 (file)
@@ -974,6 +974,11 @@ int main(int argc, char **argv)
                case 'v':
                        opt.verbose = true;
                        break;
+               case POPT_ERROR_BADOPT:
+                       fprintf(stderr, "\nInvalid option %s: %s\n\n",
+                               poptBadOption(pc, 0), poptStrerror(c));
+                       poptPrintUsage(pc, stderr, 0);
+                       exit(1);
                }
        }