1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3: net_share.c: fix argc handling

The "net share" command was no longer possible because it enters
the net_share function with argc == 0.
This commit is contained in:
Holger Hetterich 2010-03-02 23:17:20 +01:00 committed by Jeremy Allison
parent f36dafd852
commit e3c2e1a303

View File

@ -62,12 +62,9 @@ int net_share_usage(struct net_context *c, int argc, const char **argv)
int net_share(struct net_context *c, int argc, const char **argv)
{
if (argc < 1)
return net_share_usage(c, argc, argv);
if (StrCaseCmp(argv[0], "HELP") == 0) {
net_share_usage(c, argc, argv);
return 0;
if (argc > 0 && StrCaseCmp(argv[0], "HELP") == 0) {
net_share_usage(c, argc, argv);
return 0;
}
if (net_rpc_check(c, 0))