summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_sec.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-08 11:21:57 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-08 11:21:57 +0000
commit7d212460a5c00b4039440c2db0dde56e7d519d66 (patch)
tree7c14238930104c5edc8711f480b3ba0095d8d687 /source4/librpc/ndr/ndr_sec.c
parent4e4a63d5185d1567c115e7cbf15022b0fbcbc870 (diff)
downloadsamba-7d212460a5c00b4039440c2db0dde56e7d519d66.tar.gz
samba-7d212460a5c00b4039440c2db0dde56e7d519d66.tar.bz2
samba-7d212460a5c00b4039440c2db0dde56e7d519d66.zip
- corrected some lsa idl
- updated lsa parse code from pidl (This used to be commit 3983b2aee77b0e093847bfc02e02b83ab281f5dd)
Diffstat (limited to 'source4/librpc/ndr/ndr_sec.c')
-rw-r--r--source4/librpc/ndr/ndr_sec.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c
index 31cf823e0d..b83bf87771 100644
--- a/source4/librpc/ndr/ndr_sec.c
+++ b/source4/librpc/ndr/ndr_sec.c
@@ -174,16 +174,14 @@ NTSTATUS ndr_pull_dom_sid_ofs(struct ndr_pull *ndr, struct dom_sid **sid)
parse a security descriptor
*/
NTSTATUS ndr_pull_security_descriptor(struct ndr_pull *ndr,
- struct security_descriptor **sd)
+ struct security_descriptor *sd)
{
- NDR_ALLOC(ndr, *sd);
-
- NDR_CHECK(ndr_pull_uint8(ndr, &(*sd)->revision));
- NDR_CHECK(ndr_pull_uint16(ndr, &(*sd)->type));
- NDR_CHECK(ndr_pull_dom_sid_ofs(ndr, &(*sd)->owner_sid));
- NDR_CHECK(ndr_pull_dom_sid_ofs(ndr, &(*sd)->group_sid));
- NDR_CHECK(ndr_pull_security_acl_ofs(ndr, &(*sd)->sacl));
- NDR_CHECK(ndr_pull_security_acl_ofs(ndr, &(*sd)->dacl));
+ NDR_CHECK(ndr_pull_uint8(ndr, &sd->revision));
+ NDR_CHECK(ndr_pull_uint16(ndr, &sd->type));
+ NDR_CHECK(ndr_pull_dom_sid_ofs(ndr, &sd->owner_sid));
+ NDR_CHECK(ndr_pull_dom_sid_ofs(ndr, &sd->group_sid));
+ NDR_CHECK(ndr_pull_security_acl_ofs(ndr, &sd->sacl));
+ NDR_CHECK(ndr_pull_security_acl_ofs(ndr, &sd->dacl));
return NT_STATUS_OK;
}
@@ -265,6 +263,15 @@ NTSTATUS ndr_push_dom_sid(struct ndr_push *ndr, struct dom_sid *sid)
return NT_STATUS_OK;
}
+/*
+ parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
+*/
+NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, struct dom_sid *sid)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, sid->num_auths));
+ return ndr_push_dom_sid(ndr, sid);
+}
+
/*
generate a ndr security descriptor