diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-10 11:24:54 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-12-10 17:51:26 +1100 |
commit | 498f2b879a38b7b3888fcb2892a9d073417f7d84 (patch) | |
tree | ebdf47d79d37cc7976fbc8a738c0bd71a25bb15b /source4/libcli/raw | |
parent | 08e8988bd850de8050cd05aacdcd0e0f78200c7d (diff) | |
download | samba-498f2b879a38b7b3888fcb2892a9d073417f7d84.tar.gz samba-498f2b879a38b7b3888fcb2892a9d073417f7d84.tar.bz2 samba-498f2b879a38b7b3888fcb2892a9d073417f7d84.zip |
s4-libcli: use new GUID functions in libcli
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r-- | source4/libcli/raw/rawfsinfo.c | 8 | ||||
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 12 |
2 files changed, 6 insertions, 14 deletions
diff --git a/source4/libcli/raw/rawfsinfo.c b/source4/libcli/raw/rawfsinfo.c index 43a0919e38..4c79ba066c 100644 --- a/source4/libcli/raw/rawfsinfo.c +++ b/source4/libcli/raw/rawfsinfo.c @@ -159,7 +159,6 @@ NTSTATUS smb_raw_fsinfo_passthru_parse(DATA_BLOB blob, TALLOC_CTX *mem_ctx, union smb_fsinfo *fsinfo) { NTSTATUS status = NT_STATUS_OK; - enum ndr_err_code ndr_err; int i; /* parse the results */ @@ -217,11 +216,8 @@ NTSTATUS smb_raw_fsinfo_passthru_parse(DATA_BLOB blob, TALLOC_CTX *mem_ctx, case RAW_QFS_OBJECTID_INFORMATION: QFS_CHECK_SIZE(64); - ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, &fsinfo->objectid_information.out.guid, - (ndr_pull_flags_fn_t)ndr_pull_GUID); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - status = ndr_map_error2ntstatus(ndr_err); - } + status = GUID_from_ndr_blob(&blob, &fsinfo->objectid_information.out.guid); + NT_STATUS_NOT_OK_RETURN(status); for (i=0;i<6;i++) { fsinfo->objectid_information.out.unknown[i] = BVAL(blob.data, 16 + i*8); } diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index 0f04190a8b..723e3d909c 100644 --- a/source4/libcli/raw/rawrequest.c +++ b/source4/libcli/raw/rawrequest.c @@ -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); } /* |