1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

s4-libcli: use new GUID functions in libcli

This commit is contained in:
Andrew Tridgell
2009-12-10 11:24:54 +11:00
parent 08e8988bd8
commit 498f2b879a
3 changed files with 9 additions and 18 deletions

View File

@ -991,21 +991,17 @@ size_t smbcli_blob_append_string(struct smbcli_session *session,
pull a GUID structure from the wire. The buffer must be at least 16
bytes long
*/
enum ndr_err_code smbcli_pull_guid(void *base, uint16_t offset,
struct GUID *guid)
NTSTATUS smbcli_pull_guid(void *base, uint16_t offset,
struct GUID *guid)
{
DATA_BLOB blob;
TALLOC_CTX *tmp_ctx = talloc_new(NULL);
enum ndr_err_code ndr_err;
ZERO_STRUCTP(guid);
blob.data = offset + (uint8_t *)base;
blob.length = 16;
ndr_err = ndr_pull_struct_blob(&blob, tmp_ctx, NULL, guid,
(ndr_pull_flags_fn_t)ndr_pull_GUID);
talloc_free(tmp_ctx);
return ndr_err;
return GUID_from_ndr_blob(&blob, guid);
}
/*