summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/security/config.mk8
-rw-r--r--source4/libcli/security/dom_sid.c32
2 files changed, 8 insertions, 32 deletions
diff --git a/source4/libcli/security/config.mk b/source4/libcli/security/config.mk
index d6896535d6..40987e37e2 100644
--- a/source4/libcli/security/config.mk
+++ b/source4/libcli/security/config.mk
@@ -1,8 +1,16 @@
#################################
+# Start SUBSYSTEM LIB_SECURITY_NDR_HELPER
+[SUBSYSTEM::LIB_SECURITY_NDR_HELPER]
+ADD_OBJ_FILES = librpc/ndr/ndr_sec_helper.o
+# End SUBSYSTEM LIB_SECURITY_NDR_HELPER
+#################################
+
+#################################
# Start SUBSYSTEM LIB_SECURITY_NDR
[SUBSYSTEM::LIB_SECURITY_NDR]
ADD_OBJ_FILES = librpc/gen_ndr/ndr_security.o
NOPROTO = YES
+REQUIRED_SUBSYSTEMS = LIB_SECURITY_NDR_HELPER
# End SUBSYSTEM LIB_SECURITY_NDR
#################################
diff --git a/source4/libcli/security/dom_sid.c b/source4/libcli/security/dom_sid.c
index 493ecab183..80e481c3e4 100644
--- a/source4/libcli/security/dom_sid.c
+++ b/source4/libcli/security/dom_sid.c
@@ -84,38 +84,6 @@ BOOL dom_sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2)
return dom_sid_compare(sid1, sid2) == 0;
}
-/*
- convert a dom_sid to a string
-*/
-char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
-{
- int i, ofs, maxlen;
- uint32_t ia;
- char *ret;
-
- if (!sid) {
- return talloc_strdup(mem_ctx, "(NULL SID)");
- }
-
- maxlen = sid->num_auths * 11 + 25;
- ret = talloc_size(mem_ctx, maxlen);
- if (!ret) return talloc_strdup(mem_ctx, "(SID ERR)");
-
- ia = (sid->id_auth[5]) +
- (sid->id_auth[4] << 8 ) +
- (sid->id_auth[3] << 16) +
- (sid->id_auth[2] << 24);
-
- ofs = snprintf(ret, maxlen, "S-%u-%lu",
- (uint_t)sid->sid_rev_num, (unsigned long)ia);
-
- for (i = 0; i < sid->num_auths; i++) {
- ofs += snprintf(ret + ofs, maxlen - ofs, "-%lu", (unsigned long)sid->sub_auths[i]);
- }
-
- return ret;
-}
-
/*
convert a string to a dom_sid, returning a talloc'd dom_sid