From a6c4b9d1793c7ea1965a23e1d23b73012acd151b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 10 Oct 2007 13:12:53 +0200 Subject: r25607: Allow to set security descriptor type flags at creation time with security_descriptor_create(). Guenther (This used to be commit 7dd0d28d254f78891b0807492baafa188b42df16) --- source4/libcli/security/security_descriptor.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/libcli/security') diff --git a/source4/libcli/security/security_descriptor.c b/source4/libcli/security/security_descriptor.c index 1d8549a605..9723e8ccca 100644 --- a/source4/libcli/security/security_descriptor.c +++ b/source4/libcli/security/security_descriptor.c @@ -327,6 +327,7 @@ bool security_descriptor_mask_equal(const struct security_descriptor *sd1, a typical call would be: sd = security_descriptor_create(mem_ctx, + sd_type_flags, mysid, mygroup, SID_NT_AUTHENTICATED_USERS, @@ -379,6 +380,7 @@ struct security_descriptor *security_descriptor_append(struct security_descripto } struct security_descriptor *security_descriptor_create(TALLOC_CTX *mem_ctx, + uint16_t sd_type, const char *owner_sid, const char *group_sid, ...) @@ -390,6 +392,8 @@ struct security_descriptor *security_descriptor_create(TALLOC_CTX *mem_ctx, sd = security_descriptor_initialise(mem_ctx); if (sd == NULL) return NULL; + sd->type |= sd_type; + if (owner_sid) { sd->owner_sid = dom_sid_parse_talloc(sd, owner_sid); if (sd->owner_sid == NULL) { -- cgit