summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-07-12 15:55:21 +0200
committerMichael Adam <obnox@samba.org>2012-07-12 16:43:51 +0200
commitc43505b621725c9a754f0ee98318d451b093f2ed (patch)
tree62ffe55074eecc8f46bdedb252ef5622a1625b8e /source3/passdb
parentac2644b7766e41858d53ead9d0c023a26265789a (diff)
downloadsamba-c43505b621725c9a754f0ee98318d451b093f2ed.tar.gz
samba-c43505b621725c9a754f0ee98318d451b093f2ed.tar.bz2
samba-c43505b621725c9a754f0ee98318d451b093f2ed.zip
s3: rename sid_check_is_domain() to sid_check_is_our_sam()
This does not check whether the given sid is the domain sid, but whether it is the sid of the local sam, which is different for a domain member server.
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/lookup_sid.c6
-rw-r--r--source3/passdb/machine_sid.c6
-rw-r--r--source3/passdb/machine_sid.h2
-rw-r--r--source3/passdb/pdb_interface.c2
-rw-r--r--source3/passdb/pdb_ldap.c4
5 files changed, 10 insertions, 10 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;
}