diff options
-rw-r--r-- | source3/passdb/lookup_sid.c | 6 | ||||
-rw-r--r-- | source3/passdb/machine_sid.c | 6 | ||||
-rw-r--r-- | source3/passdb/machine_sid.h | 2 | ||||
-rw-r--r-- | source3/passdb/pdb_interface.c | 2 | ||||
-rw-r--r-- | source3/passdb/pdb_ldap.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/samr/srv_samr_nt.c | 12 | ||||
-rw-r--r-- | source3/winbindd/wb_lookupsids.c | 2 | ||||
-rw-r--r-- | source3/winbindd/wb_next_grent.c | 4 | ||||
-rw-r--r-- | source3/winbindd/wb_next_pwent.c | 4 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cache.c | 4 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 2 | ||||
-rw-r--r-- | source3/winbindd/winbindd_samr.c | 2 | ||||
-rw-r--r-- | source3/winbindd/winbindd_util.c | 2 |
13 files changed, 26 insertions, 26 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index 3f8b06dfca..9b2f548e55 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -497,7 +497,7 @@ static bool lookup_rids(TALLOC_CTX *mem_ctx, const struct dom_sid *domain_sid, *types = NULL; } - if (sid_check_is_domain(domain_sid)) { + if (sid_check_is_our_sam(domain_sid)) { NTSTATUS result; if (*domain_name == NULL) { @@ -613,7 +613,7 @@ static bool lookup_as_domain(const struct dom_sid *sid, TALLOC_CTX *mem_ctx, const char *tmp; enum lsa_SidType type; - if (sid_check_is_domain(sid)) { + if (sid_check_is_our_sam(sid)) { *name = talloc_strdup(mem_ctx, get_global_sam_name()); return true; } @@ -710,7 +710,7 @@ static bool check_dom_sid_to_level(const struct dom_sid *sid, int level) case 3: case 4: case 6: - ret = sid_check_is_domain(sid); + ret = sid_check_is_our_sam(sid); break; case 5: ret = false; diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c index bc663f0b26..f3a4402d47 100644 --- a/source3/passdb/machine_sid.c +++ b/source3/passdb/machine_sid.c @@ -229,10 +229,10 @@ void reset_global_sam_sid(void) } /***************************************************************** - Check if the SID is our domain SID (S-1-5-21-x-y-z). + Check if the SID is our sam SID (S-1-5-21-x-y-z). *****************************************************************/ -bool sid_check_is_domain(const struct dom_sid *sid) +bool sid_check_is_our_sam(const struct dom_sid *sid) { return dom_sid_equal(sid, get_global_sam_sid()); } @@ -247,5 +247,5 @@ bool sid_check_is_in_our_domain(const struct dom_sid *sid) sid_copy(&dom_sid, sid); sid_split_rid(&dom_sid, NULL); - return sid_check_is_domain(&dom_sid); + return sid_check_is_our_sam(&dom_sid); } diff --git a/source3/passdb/machine_sid.h b/source3/passdb/machine_sid.h index 03f4754adc..2feada716d 100644 --- a/source3/passdb/machine_sid.h +++ b/source3/passdb/machine_sid.h @@ -27,7 +27,7 @@ struct dom_sid *get_global_sam_sid(void); void reset_global_sam_sid(void) ; -bool sid_check_is_domain(const struct dom_sid *sid); +bool sid_check_is_our_sam(const struct dom_sid *sid); bool sid_check_is_in_our_domain(const struct dom_sid *sid); #endif /* _PASSDB_MACHINE_SID_H_ */ diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 7a78055663..30c13faebc 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -1805,7 +1805,7 @@ static NTSTATUS pdb_default_lookup_rids(struct pdb_methods *methods, } /* Should not happen, but better check once too many */ - if (!sid_check_is_domain(domain_sid)) { + if (!sid_check_is_our_sam(domain_sid)) { return NT_STATUS_INVALID_HANDLE; } diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 8c29612be3..23793bf726 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -3727,7 +3727,7 @@ static NTSTATUS ldapsam_alias_memberships(struct pdb_methods *methods, type = SID_NAME_ALIAS; } - if (sid_check_is_domain(domain_sid)) { + if (sid_check_is_our_sam(domain_sid)) { type = SID_NAME_ALIAS; } @@ -4032,7 +4032,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods, } if (!sid_check_is_builtin(domain_sid) && - !sid_check_is_domain(domain_sid)) { + !sid_check_is_our_sam(domain_sid)) { result = NT_STATUS_INVALID_PARAMETER; goto done; } diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c index 8dcc7ad3a2..2363fd434b 100644 --- a/source3/rpc_server/samr/srv_samr_nt.c +++ b/source3/rpc_server/samr/srv_samr_nt.c @@ -233,7 +233,7 @@ static DISP_INFO *get_samr_dispinfo_by_sid(const struct dom_sid *psid) return builtin_dispinfo; } - if (sid_check_is_domain(psid) || sid_check_is_in_our_domain(psid)) { + if (sid_check_is_our_sam(psid) || sid_check_is_in_our_domain(psid)) { /* * Necessary only once, but it does not really hurt. */ @@ -484,7 +484,7 @@ NTSTATUS _samr_OpenDomain(struct pipes_struct *p, if ( !NT_STATUS_IS_OK(status) ) return status; - if (!sid_check_is_domain(r->in.sid) && + if (!sid_check_is_our_sam(r->in.sid) && !sid_check_is_builtin(r->in.sid)) { return NT_STATUS_NO_SUCH_DOMAIN; } @@ -5326,7 +5326,7 @@ NTSTATUS _samr_GetAliasMembership(struct pipes_struct *p, return status; } - if (!sid_check_is_domain(&dinfo->sid) && + if (!sid_check_is_our_sam(&dinfo->sid) && !sid_check_is_builtin(&dinfo->sid)) return NT_STATUS_OBJECT_TYPE_MISMATCH; @@ -5837,7 +5837,7 @@ NTSTATUS _samr_CreateDomainGroup(struct pipes_struct *p, return status; } - if (!sid_check_is_domain(&dinfo->sid)) { + if (!sid_check_is_our_sam(&dinfo->sid)) { return NT_STATUS_ACCESS_DENIED; } @@ -5899,7 +5899,7 @@ NTSTATUS _samr_CreateDomAlias(struct pipes_struct *p, return result; } - if (!sid_check_is_domain(&dinfo->sid)) { + if (!sid_check_is_our_sam(&dinfo->sid)) { return NT_STATUS_ACCESS_DENIED; } @@ -6319,7 +6319,7 @@ NTSTATUS _samr_OpenGroup(struct pipes_struct *p, /* this should not be hard-coded like this */ - if (!sid_check_is_domain(&dinfo->sid)) { + if (!sid_check_is_our_sam(&dinfo->sid)) { return NT_STATUS_ACCESS_DENIED; } diff --git a/source3/winbindd/wb_lookupsids.c b/source3/winbindd/wb_lookupsids.c index b050bd0698..4da2629d10 100644 --- a/source3/winbindd/wb_lookupsids.c +++ b/source3/winbindd/wb_lookupsids.c @@ -185,7 +185,7 @@ static bool wb_lookupsids_next(struct tevent_req *req, d = &state->domains[state->domains_done]; - if (sid_check_is_domain(&d->sid)) { + if (sid_check_is_our_sam(&d->sid)) { state->rids.num_rids = d->sids.num_sids; state->rids.rids = talloc_array(state, uint32_t, state->rids.num_rids); diff --git a/source3/winbindd/wb_next_grent.c b/source3/winbindd/wb_next_grent.c index 2b3799ab93..d3b0333358 100644 --- a/source3/winbindd/wb_next_grent.c +++ b/source3/winbindd/wb_next_grent.c @@ -62,7 +62,7 @@ struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx, } if ((state->gstate->domain != NULL) - && sid_check_is_domain(&state->gstate->domain->sid)) { + && sid_check_is_our_sam(&state->gstate->domain->sid)) { state->gstate->domain = state->gstate->domain->next; } @@ -125,7 +125,7 @@ static void wb_next_grent_fetch_done(struct tevent_req *subreq) state->gstate->domain = state->gstate->domain->next; if ((state->gstate->domain != NULL) - && sid_check_is_domain(&state->gstate->domain->sid)) { + && sid_check_is_our_sam(&state->gstate->domain->sid)) { state->gstate->domain = state->gstate->domain->next; } diff --git a/source3/winbindd/wb_next_pwent.c b/source3/winbindd/wb_next_pwent.c index 28ae9b7075..785658d4be 100644 --- a/source3/winbindd/wb_next_pwent.c +++ b/source3/winbindd/wb_next_pwent.c @@ -40,7 +40,7 @@ static struct winbindd_domain *wb_next_find_domain(struct winbindd_domain *domai } if ((domain != NULL) - && sid_check_is_domain(&domain->sid)) { + && sid_check_is_our_sam(&domain->sid)) { domain = domain->next; } return domain; @@ -114,7 +114,7 @@ static void wb_next_pwent_fetch_done(struct tevent_req *subreq) state->gstate->domain = state->gstate->domain->next; if ((state->gstate->domain != NULL) - && sid_check_is_domain(&state->gstate->domain->sid)) { + && sid_check_is_our_sam(&state->gstate->domain->sid)) { state->gstate->domain = state->gstate->domain->next; } diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 315202d618..66de29e061 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -124,7 +124,7 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain) } if (strequal(domain->name, get_global_sam_name()) && - sid_check_is_domain(&domain->sid)) { + sid_check_is_our_sam(&domain->sid)) { domain->backend = &sam_passdb_methods; domain->initialized = True; } @@ -668,7 +668,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_check_is_domain(&domain->sid)) { + sid_check_is_our_sam(&domain->sid)) { return true; } diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 44ca77bc6c..f52e723451 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2159,7 +2159,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, char *machine_account = NULL; char *domain_name = NULL; - if (sid_check_is_domain(&domain->sid)) { + if (sid_check_is_our_sam(&domain->sid)) { return open_internal_samr_conn(mem_ctx, domain, cli, sam_handle); } diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c index 5994a354b5..10074d142e 100644 --- a/source3/winbindd/winbindd_samr.c +++ b/source3/winbindd/winbindd_samr.c @@ -761,7 +761,7 @@ static NTSTATUS sam_rids_to_names(struct winbindd_domain *domain, /* Paranoia check */ if (!sid_check_is_builtin(domain_sid) && - !sid_check_is_domain(domain_sid) && + !sid_check_is_our_sam(domain_sid) && !sid_check_is_unix_users(domain_sid) && !sid_check_is_unix_groups(domain_sid) && !sid_check_is_in_wellknown_domain(domain_sid)) { diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 7dff138fc1..af17e5f7b3 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -77,7 +77,7 @@ static bool is_internal_domain(const struct dom_sid *sid) if (sid == NULL) return False; - return (sid_check_is_domain(sid) || sid_check_is_builtin(sid)); + return (sid_check_is_our_sam(sid) || sid_check_is_builtin(sid)); } static bool is_in_internal_domain(const struct dom_sid *sid) |