1
0
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:
Tim Potter -
parent 84c1a5b0f0
commit a5a0ff8bd7
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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 */