summaryrefslogtreecommitdiff
path: root/source4/libcli/security/dom_sid.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/security/dom_sid.c')
-rw-r--r--source4/libcli/security/dom_sid.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/libcli/security/dom_sid.c b/source4/libcli/security/dom_sid.c
index 64e418677a..f5457e7e0e 100644
--- a/source4/libcli/security/dom_sid.c
+++ b/source4/libcli/security/dom_sid.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "librpc/gen_ndr/security.h"
+#include "libcli/security/security.h"
/*****************************************************************
Compare the auth portion of two sids.
@@ -78,7 +79,7 @@ static int dom_sid_compare(const struct dom_sid *sid1, const struct dom_sid *sid
Compare two sids.
*****************************************************************/
-BOOL dom_sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2)
+bool dom_sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2)
{
return dom_sid_compare(sid1, sid2) == 0;
}
@@ -240,24 +241,24 @@ NTSTATUS dom_sid_split_rid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
}
/*
- return True if the 2nd sid is in the domain given by the first sid
+ return true if the 2nd sid is in the domain given by the first sid
*/
-BOOL dom_sid_in_domain(const struct dom_sid *domain_sid,
+bool dom_sid_in_domain(const struct dom_sid *domain_sid,
const struct dom_sid *sid)
{
int i;
if (!domain_sid || !sid) {
- return False;
+ return false;
}
if (domain_sid->num_auths > sid->num_auths) {
- return False;
+ return false;
}
for (i = domain_sid->num_auths-1; i >= 0; --i) {
if (domain_sid->sub_auths[i] != sid->sub_auths[i]) {
- return False;
+ return false;
}
}
@@ -278,7 +279,7 @@ char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
}
maxlen = sid->num_auths * 11 + 25;
- ret = talloc_size(mem_ctx, maxlen);
+ ret = talloc_array(mem_ctx, char, maxlen);
if (!ret) return talloc_strdup(mem_ctx, "(SID ERR)");
ia = (sid->id_auth[5]) +