diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-04-10 23:08:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:29 -0500 |
commit | e7dd6a12913464fd752ddb94bd2f553f14007c74 (patch) | |
tree | 9dc0e9ec0216521d7a488ff905658b9d23138f06 /source4/libcli | |
parent | fc1b6bae230c583cdf2f06dae63d221849b33655 (diff) | |
download | samba-e7dd6a12913464fd752ddb94bd2f553f14007c74.tar.gz samba-e7dd6a12913464fd752ddb94bd2f553f14007c74.tar.bz2 samba-e7dd6a12913464fd752ddb94bd2f553f14007c74.zip |
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)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/security/config.mk | 8 | ||||
-rw-r--r-- | source4/libcli/security/dom_sid.c | 32 |
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 |