]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
sharesec: don't ignore unknown options
authorRalph Boehme <slow@samba.org>
Fri, 10 Sep 2021 05:11:07 +0000 (07:11 +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/sharesec.c

index cec1da1e94ddf1c4b8906451832f5d4501513715..9b8064de7027aef436825bca66fa0c56e16c2163 100644 (file)
@@ -515,6 +515,11 @@ int main(int argc, const char *argv[])
                case OPT_VIEW_ALL:
                        mode = SMB_ACL_VIEW_ALL;
                        break;
+               case POPT_ERROR_BADOPT:
+                       fprintf(stderr, "\nInvalid option %s: %s\n\n",
+                               poptBadOption(pc, 0), poptStrerror(opt));
+                       poptPrintUsage(pc, stderr, 0);
+                       exit(1);
                }
        }