diff options
author | Günther Deschner <gd@samba.org> | 2010-08-26 15:48:50 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-09-20 14:04:37 -0700 |
commit | 4dbd743e467096624961533335afccadc67af0e6 (patch) | |
tree | 221fd5ed097893d3e48f07c926d7ef9bd8313276 /source3/winbindd | |
parent | 400616017974f057c8a2e817b62b90b1490d4129 (diff) | |
download | samba-4dbd743e467096624961533335afccadc67af0e6.tar.gz samba-4dbd743e467096624961533335afccadc67af0e6.tar.bz2 samba-4dbd743e467096624961533335afccadc67af0e6.zip |
s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/idmap_ad.c | 3 | ||||
-rw-r--r-- | source3/winbindd/idmap_ldap.c | 3 | ||||
-rw-r--r-- | source3/winbindd/wb_getgrsid.c | 3 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cache.c | 7 | ||||
-rw-r--r-- | source3/winbindd/winbindd_util.c | 7 |
5 files changed, 14 insertions, 9 deletions
diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c index 3d47baadc9..f2e47a7042 100644 --- a/source3/winbindd/idmap_ad.c +++ b/source3/winbindd/idmap_ad.c @@ -33,6 +33,7 @@ #include "nss_info.h" #include "secrets.h" #include "idmap.h" +#include "../libcli/security/dom_sid.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_IDMAP @@ -266,7 +267,7 @@ static struct id_map *find_map_by_sid(struct id_map **maps, struct dom_sid *sid) int i; for (i = 0; maps[i] && i<IDMAP_AD_MAX_IDS; i++) { - if (sid_equal(maps[i]->sid, sid)) { + if (dom_sid_equal(maps[i]->sid, sid)) { return maps[i]; } } diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c index 39df489be7..dcdc14f277 100644 --- a/source3/winbindd/idmap_ldap.c +++ b/source3/winbindd/idmap_ldap.c @@ -28,6 +28,7 @@ #include "secrets.h" #include "idmap.h" #include "idmap_rw.h" +#include "../libcli/security/dom_sid.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_IDMAP @@ -1030,7 +1031,7 @@ static struct id_map *find_map_by_sid(struct id_map **maps, struct dom_sid *sid) if (maps[i] == NULL) { /* end of the run */ return NULL; } - if (sid_equal(maps[i]->sid, sid)) { + if (dom_sid_equal(maps[i]->sid, sid)) { return maps[i]; } } diff --git a/source3/winbindd/wb_getgrsid.c b/source3/winbindd/wb_getgrsid.c index bb93be2174..8accc639af 100644 --- a/source3/winbindd/wb_getgrsid.c +++ b/source3/winbindd/wb_getgrsid.c @@ -20,6 +20,7 @@ #include "includes.h" #include "winbindd.h" #include "librpc/gen_ndr/cli_wbint.h" +#include "../libcli/security/dom_sid.h" struct wb_getgrsid_state { struct tevent_context *ev; @@ -55,7 +56,7 @@ struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx, if (lp_winbind_trusted_domains_only()) { struct winbindd_domain *our_domain = find_our_domain(); - if (sid_compare_domain(group_sid, &our_domain->sid) == 0) { + if (dom_sid_compare_domain(group_sid, &our_domain->sid) == 0) { DEBUG(7, ("winbindd_getgrsid: My domain -- rejecting " "getgrsid() for %s\n", sid_string_tos(group_sid))); tevent_req_nterror(req, NT_STATUS_NO_SUCH_GROUP); diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 1ae0c70e2e..c2ce0a2713 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -30,6 +30,7 @@ #include "../librpc/gen_ndr/ndr_wbint.h" #include "ads.h" #include "nss_info.h" +#include "../libcli/security/dom_sid.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND @@ -118,7 +119,7 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain) } if (strequal(domain->name, get_global_sam_name()) && - sid_equal(&domain->sid, get_global_sam_sid())) { + dom_sid_equal(&domain->sid, get_global_sam_sid())) { domain->backend = &sam_passdb_methods; domain->initialized = True; } @@ -644,7 +645,7 @@ static struct cache_entry *wcache_fetch_raw(char *kstr) static bool is_my_own_sam_domain(struct winbindd_domain *domain) { if (strequal(domain->name, get_global_sam_name()) && - sid_equal(&domain->sid, get_global_sam_sid())) { + dom_sid_equal(&domain->sid, get_global_sam_sid())) { return true; } @@ -654,7 +655,7 @@ static bool is_my_own_sam_domain(struct winbindd_domain *domain) static bool is_builtin_domain(struct winbindd_domain *domain) { if (strequal(domain->name, "BUILTIN") && - sid_equal(&domain->sid, &global_sid_Builtin)) { + dom_sid_equal(&domain->sid, &global_sid_Builtin)) { return true; } diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 671c868273..14be0e26fa 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -23,6 +23,7 @@ #include "includes.h" #include "winbindd.h" #include "secrets.h" +#include "../libcli/security/dom_sid.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND @@ -135,7 +136,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const continue; } - if (sid_equal(sid, &domain->sid)) { + if (dom_sid_equal(sid, &domain->sid)) { break; } } @@ -146,7 +147,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const * We found a match. Possibly update the SID */ if ((sid != NULL) - && sid_equal(&domain->sid, &global_sid_NULL)) { + && dom_sid_equal(&domain->sid, &global_sid_NULL)) { sid_copy( &domain->sid, sid ); } return domain; @@ -740,7 +741,7 @@ struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid) /* Search through list */ for (domain = domain_list(); domain != NULL; domain = domain->next) { - if (sid_compare_domain(sid, &domain->sid) == 0) + if (dom_sid_compare_domain(sid, &domain->sid) == 0) return domain; } |