summaryrefslogtreecommitdiff
path: root/source4/libcli/security
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-10-10 13:12:53 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:42:51 +0100
commita6c4b9d1793c7ea1965a23e1d23b73012acd151b (patch)
tree6cad5d745f37a8e37673fde74f1dc822dbe61061 /source4/libcli/security
parent50bf95197705a3e3ca6b69fc9584ed0564c305d1 (diff)
downloadsamba-a6c4b9d1793c7ea1965a23e1d23b73012acd151b.tar.gz
samba-a6c4b9d1793c7ea1965a23e1d23b73012acd151b.tar.bz2
samba-a6c4b9d1793c7ea1965a23e1d23b73012acd151b.zip
r25607: Allow to set security descriptor type flags at creation time with
security_descriptor_create(). Guenther (This used to be commit 7dd0d28d254f78891b0807492baafa188b42df16)
Diffstat (limited to 'source4/libcli/security')
-rw-r--r--source4/libcli/security/security_descriptor.c4
1 files changed, 4 insertions, 0 deletions
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) {