From e7dd6a12913464fd752ddb94bd2f553f14007c74 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 10 Apr 2005 23:08:04 +0000 Subject: r6287: sorted out a small but surprisingly tricky dependency problem with the ndr code for handling sids and security descriptors now that we have a sid in the nbt IDL (This used to be commit f8e77fcdeac704aed5e501aa9108f3ed0ab26ca4) --- source4/libcli/security/config.mk | 8 ++++++++ source4/libcli/security/dom_sid.c | 32 -------------------------------- 2 files changed, 8 insertions(+), 32 deletions(-) (limited to 'source4/libcli/security') 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 -- cgit