mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
r1941: - fixed an allocation error with querying security descriptors remotely
- print the received security_descriptor in the smbclient "acl" command
- make sure we zero the alignment data in nttrans packet sends
(This used to be commit 8925b8b219
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
454e76dec2
commit
8d6e233f66
@ -1777,6 +1777,8 @@ static int cmd_acl(void)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NDR_PRINT_DEBUG(security_descriptor, query.out.sd);
|
||||||
|
|
||||||
talloc_destroy(mem_ctx);
|
talloc_destroy(mem_ctx);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
@ -78,7 +78,7 @@ NTSTATUS smb_raw_query_secdesc_recv(struct smbcli_request *req,
|
|||||||
return NT_STATUS_INVALID_PARAMETER;
|
return NT_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
query->out.sd = talloc(mem_ctx, sizeof(query->out.sd));
|
query->out.sd = talloc_p(mem_ctx, struct security_descriptor);
|
||||||
if (!query->out.sd) {
|
if (!query->out.sd) {
|
||||||
return NT_STATUS_NO_MEMORY;
|
return NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
@ -480,6 +480,10 @@ struct smbcli_request *smb_raw_nttrans_send(struct smbcli_tree *tree,
|
|||||||
outparam = req->out.data + align;
|
outparam = req->out.data + align;
|
||||||
outdata = outparam + parms->in.params.length;
|
outdata = outparam + parms->in.params.length;
|
||||||
|
|
||||||
|
if (align != 0) {
|
||||||
|
memset(req->out.data, 0, align);
|
||||||
|
}
|
||||||
|
|
||||||
SCVAL(req->out.vwv, 0, parms->in.max_setup);
|
SCVAL(req->out.vwv, 0, parms->in.max_setup);
|
||||||
SSVAL(req->out.vwv, 1, 0); /* reserved */
|
SSVAL(req->out.vwv, 1, 0); /* reserved */
|
||||||
SIVAL(req->out.vwv, 3, parms->in.params.length);
|
SIVAL(req->out.vwv, 3, parms->in.params.length);
|
||||||
|
Reference in New Issue
Block a user