mirror of
https://github.com/samba-team/samba.git
synced 2025-01-15 23:24:37 +03:00
Some crash fixes for netshareenum returning zero shares.
This commit is contained in:
parent
84c1a5b0f0
commit
a5a0ff8bd7
@ -116,6 +116,9 @@ WERROR cli_srvsvc_net_share_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx,
|
||||
|
||||
ZERO_STRUCTP(ctr);
|
||||
|
||||
if (!r.ctr.num_entries)
|
||||
goto done;
|
||||
|
||||
ctr->info_level = info_level;
|
||||
ctr->num_entries = r.ctr.num_entries;
|
||||
|
||||
|
@ -270,7 +270,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli,
|
||||
result = cli_srvsvc_net_share_enum(
|
||||
cli, mem_ctx, info_level, &ctr, preferred_len, &hnd);
|
||||
|
||||
if (!W_ERROR_IS_OK(result))
|
||||
if (!W_ERROR_IS_OK(result) || !ctr.num_entries)
|
||||
goto done;
|
||||
|
||||
/* Display results */
|
||||
|
Loading…
x
Reference in New Issue
Block a user