summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/rawfileinfo.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-29 07:02:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:37 -0500
commit332f5b19a101115ce920b9291d10e78fbea8db62 (patch)
tree82e368ca500571d009323b562505d32babf8b68a /source4/libcli/raw/rawfileinfo.c
parentbcc9e8af30e430e5bc49f23457a56ffe21624679 (diff)
downloadsamba-332f5b19a101115ce920b9291d10e78fbea8db62.tar.gz
samba-332f5b19a101115ce920b9291d10e78fbea8db62.tar.bz2
samba-332f5b19a101115ce920b9291d10e78fbea8db62.zip
r16667: - use ndr_pull_struct_blob() to make the RAW_FILEINFO_SEC_DESC pull code
simpler - use ndr_push_struct_blob() for RAW_SFILEINFO_SEC_DESC metze (This used to be commit 79e51f033e680303431e56e818346b66a836d044)
Diffstat (limited to 'source4/libcli/raw/rawfileinfo.c')
-rw-r--r--source4/libcli/raw/rawfileinfo.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index b33d0df828..67cad83c6d 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -244,20 +244,17 @@ NTSTATUS smb_raw_fileinfo_passthru_parse(const DATA_BLOB *blob, TALLOC_CTX *mem_
return NT_STATUS_OK;
case RAW_FILEINFO_SEC_DESC: {
- struct ndr_pull *ndr;
NTSTATUS status;
- ndr = ndr_pull_init_blob(blob, mem_ctx);
- if (!ndr) {
- return NT_STATUS_NO_MEMORY;
- }
+
parms->query_secdesc.out.sd = talloc(mem_ctx, struct security_descriptor);
- if (parms->query_secdesc.out.sd == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
- status = ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS,
- parms->query_secdesc.out.sd);
- talloc_free(ndr);
- return status;
+ NT_STATUS_HAVE_NO_MEMORY(parms->query_secdesc.out.sd);
+
+ status = ndr_pull_struct_blob(blob, mem_ctx,
+ parms->query_secdesc.out.sd,
+ (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
+ NT_STATUS_NOT_OK_RETURN(status);
+
+ return NT_STATUS_OK;
}
default: