Replace calls to sid_equal with calls to dom_sid_equal
authorVolker Lendecke <vl@samba.org>
Wed, 17 Aug 2011 10:18:14 +0000 (12:18 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 17 Aug 2011 10:30:08 +0000 (12:30 +0200)
libcli/security/util_sid.c
source3/modules/onefs_acl.c
source3/torture/pdbtest.c
source3/winbindd/wb_lookupsids.c
source3/winbindd/winbindd_cache.c

index cf1f7f368fd51d8e68dbf6c8f8af6c3a5594cf9b..dd27b7c20d3eaae85a82c064ac105810f1a719ed 100644 (file)
@@ -337,7 +337,7 @@ void del_sid_from_array(const struct dom_sid *sid, struct dom_sid **sids,
                /* if we find the SID, then decrement the count
                   and break out of the loop */
 
-               if ( sid_equal(sid, &sid_list[i]) ) {
+               if (dom_sid_equal(sid, &sid_list[i])) {
                        *num -= 1;
                        break;
                }
@@ -377,5 +377,5 @@ bool add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
 bool is_null_sid(const struct dom_sid *sid)
 {
        static const struct dom_sid null_sid = {0};
-       return sid_equal(sid, &null_sid);
+       return dom_sid_equal(sid, &null_sid);
 }
index f78d1f0e2e63b4fe7ef4e42e7df005428736ffee..749ddec3da748bfc4cd9d62941b91ff7028f44b0 100644 (file)
@@ -46,13 +46,13 @@ onefs_sid_to_identity(const struct dom_sid *sid, struct ifs_identity *id,
        uid_t uid = 0;
        gid_t gid = 0;
 
-       if (!sid || sid_equal(sid, &global_sid_NULL))
+       if (!sid || dom_sid_equal(sid, &global_sid_NULL))
                type = IFS_ID_TYPE_NULL;
-       else if (sid_equal(sid, &global_sid_World))
+       else if (dom_sid_equal(sid, &global_sid_World))
                type = IFS_ID_TYPE_EVERYONE;
-       else if (sid_equal(sid, &global_sid_Creator_Owner))
+       else if (dom_sid_equal(sid, &global_sid_Creator_Owner))
                type = IFS_ID_TYPE_CREATOR_OWNER;
-       else if (sid_equal(sid, &global_sid_Creator_Group))
+       else if (dom_sid_equal(sid, &global_sid_Creator_Group))
                type = IFS_ID_TYPE_CREATOR_GROUP;
        else if (is_group) {
                if (!sid_to_gid(sid, &gid))
@@ -156,7 +156,7 @@ sid_in_ignore_list(struct dom_sid * sid, int snum)
 
        while (*sid_list) {
                if (string_to_sid(&match, *sid_list))
-                       if (sid_equal(sid, &match))
+                       if (dom_sid_equal(sid, &match))
                                return true;
                sid_list++;
        }
index 65f5188cc070993501c4bcca1b2512f64dcbbaed..2f4909a68ba17ecc0be195c7e9fbbcea43b43a0c 100644 (file)
@@ -438,7 +438,8 @@ int main(int argc, char **argv)
 
        if (!strequal(td->domain_name, new_td->domain_name) ||
            !strequal(td->netbios_name, new_td->netbios_name) ||
-           !sid_equal(&td->security_identifier, &new_td->security_identifier) ||
+           !dom_sid_equal(&td->security_identifier,
+                          &new_td->security_identifier) ||
            td->trust_direction != new_td->trust_direction ||
            td->trust_type != new_td->trust_type ||
            td->trust_attributes != new_td->trust_attributes ||
index b4b7b9c8cbf7f4df1732ffb94c3ccc340fb0bf8a..e896860e0138c46fb990bcb8fab1370dea94f9c8 100644 (file)
@@ -367,7 +367,7 @@ static bool wb_lookupsids_find_dom_idx(struct lsa_DomainInfo *domain,
        struct lsa_DomainInfo *new_domain;
 
        for (i=0; i<list->count; i++) {
-               if (sid_equal(domain->sid, list->domains[i].sid)) {
+               if (dom_sid_equal(domain->sid, list->domains[i].sid)) {
                        *idx = i;
                        return true;
                }
index 58a8e710f6f6b336212bb199109147bf7509f15b..ec5f9e74ba23c6ff3581a34157a1fa75b363e5d5 100644 (file)
@@ -4571,7 +4571,7 @@ struct winbindd_tdc_domain*
        wcache_tdc_fetch_list(&dom_list, &num_domains);
 
        for (i = 0; i<num_domains; i++) {
-               if (sid_equal(sid, &(dom_list[i].sid))) {
+               if (dom_sid_equal(sid, &(dom_list[i].sid))) {
                        DEBUG(10, ("wcache_tdc_fetch_domainbysid: "
                                   "Found domain %s for SID %s\n",
                                   dom_list[i].domain_name,