mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
r18611: Do not return NT_STATUS_OK when libnet_Add|DelShare has failed.
Guenther (This used to be commit 1709ad741b43a19eaeef9e0a64e70a52132c088b)
This commit is contained in:
parent
28c9c212bc
commit
57cd2235fa
@ -134,13 +134,19 @@ NTSTATUS libnet_AddShare(struct libnet_context *ctx,
|
||||
s.in.info.info2 = &r->in.share;
|
||||
s.in.server_unc = talloc_asprintf(mem_ctx, "\\\\%s", r->in.server_name);
|
||||
|
||||
status = dcerpc_srvsvc_NetShareAdd(c.out.dcerpc_pipe, mem_ctx,&s);
|
||||
status = dcerpc_srvsvc_NetShareAdd(c.out.dcerpc_pipe, mem_ctx, &s);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
r->out.error_string = talloc_asprintf(mem_ctx,
|
||||
"srvsvc_NetShareAdd on server '%s' failed"
|
||||
": %s",
|
||||
r->in.server_name, nt_errstr(status));
|
||||
} else if (!W_ERROR_IS_OK(s.out.result)) {
|
||||
r->out.error_string = talloc_asprintf(mem_ctx,
|
||||
"srvsvc_NetShareAdd on server '%s' failed"
|
||||
": %s",
|
||||
r->in.server_name, win_errstr(s.out.result));
|
||||
status = werror_to_ntstatus(s.out.result);
|
||||
}
|
||||
|
||||
talloc_free(c.out.dcerpc_pipe);
|
||||
@ -178,6 +184,12 @@ NTSTATUS libnet_DelShare(struct libnet_context *ctx,
|
||||
"srvsvc_NetShareDel on server '%s' failed"
|
||||
": %s",
|
||||
r->in.server_name, nt_errstr(status));
|
||||
} else if (!W_ERROR_IS_OK(s.out.result)) {
|
||||
r->out.error_string = talloc_asprintf(mem_ctx,
|
||||
"srvsvc_NetShareDel on server '%s' failed"
|
||||
": %s",
|
||||
r->in.server_name, win_errstr(s.out.result));
|
||||
status = werror_to_ntstatus(s.out.result);
|
||||
}
|
||||
|
||||
talloc_free(c.out.dcerpc_pipe);
|
||||
|
Loading…
x
Reference in New Issue
Block a user