summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2013-06-18 10:39:10 +0200
committerMichael Adam <obnox@samba.org>2013-06-21 10:44:20 +0200
commit56df37d332d8cb18f28c7a48376795916eaa050d (patch)
tree89c74c28f2a0ea57ead5bd28e8dc2554fd062756 /source3/lib
parent0ad38d777f442b5da10c39c9c5695c4d857d7141 (diff)
downloadsamba-56df37d332d8cb18f28c7a48376795916eaa050d.tar.gz
samba-56df37d332d8cb18f28c7a48376795916eaa050d.tar.bz2
samba-56df37d332d8cb18f28c7a48376795916eaa050d.zip
s3:lib/util_sid_passdb make use of pdb_is_responsible_for_* functions
ask passdb to determine if sid/object should be handled by passdb or not Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_sid_passdb.c49
1 files changed, 34 insertions, 15 deletions
diff --git a/source3/lib/util_sid_passdb.c b/source3/lib/util_sid_passdb.c
index 33fb5420d6..0138c7d5f3 100644
--- a/source3/lib/util_sid_passdb.c
+++ b/source3/lib/util_sid_passdb.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "lib/util_sid_passdb.h"
#include "passdb/machine_sid.h"
+#include "passdb.h"
/**
* check whether this is an object-sid that should
@@ -28,23 +29,29 @@
*/
bool sid_check_object_is_for_passdb(const struct dom_sid *sid)
{
- if (sid_check_is_in_our_sam(sid)) {
+ if (sid_check_is_in_our_sam(sid) && pdb_is_responsible_for_our_sam()) {
return true;
}
- if (sid_check_is_in_builtin(sid)) {
+ if (sid_check_is_in_builtin(sid) && pdb_is_responsible_for_builtin()) {
return true;
}
- if (sid_check_is_in_wellknown_domain(sid)) {
+ if (sid_check_is_in_wellknown_domain(sid) &&
+ pdb_is_responsible_for_wellknown())
+ {
return true;
}
- if (sid_check_is_in_unix_users(sid)) {
+ if (sid_check_is_in_unix_users(sid) &&
+ pdb_is_responsible_for_unix_users())
+ {
return true;
}
- if (sid_check_is_in_unix_groups(sid)) {
+ if (sid_check_is_in_unix_groups(sid) &&
+ pdb_is_responsible_for_unix_groups())
+ {
return true;
}
@@ -56,43 +63,55 @@ bool sid_check_object_is_for_passdb(const struct dom_sid *sid)
*/
bool sid_check_is_for_passdb(const struct dom_sid *sid)
{
- if (sid_check_is_our_sam(sid)) {
+ if (sid_check_is_our_sam(sid) && pdb_is_responsible_for_our_sam()) {
return true;
}
- if (sid_check_is_in_our_sam(sid)) {
+ if (sid_check_is_in_our_sam(sid) && pdb_is_responsible_for_our_sam()) {
return true;
}
- if (sid_check_is_builtin(sid)) {
+ if (sid_check_is_builtin(sid) && pdb_is_responsible_for_builtin()) {
return true;
}
- if (sid_check_is_in_builtin(sid)) {
+ if (sid_check_is_in_builtin(sid) && pdb_is_responsible_for_builtin()) {
return true;
}
- if (sid_check_is_wellknown_domain(sid, NULL)) {
+ if (sid_check_is_wellknown_domain(sid, NULL) &&
+ pdb_is_responsible_for_wellknown())
+ {
return true;
}
- if (sid_check_is_in_wellknown_domain(sid)) {
+ if (sid_check_is_in_wellknown_domain(sid) &&
+ pdb_is_responsible_for_wellknown())
+ {
return true;
}
- if (sid_check_is_unix_users(sid)) {
+ if (sid_check_is_unix_users(sid) &&
+ pdb_is_responsible_for_unix_users())
+ {
return true;
}
- if (sid_check_is_in_unix_users(sid)) {
+ if (sid_check_is_in_unix_users(sid) &&
+ pdb_is_responsible_for_unix_users())
+ {
return true;
}
- if (sid_check_is_unix_groups(sid)) {
+ if (sid_check_is_unix_groups(sid) &&
+ pdb_is_responsible_for_unix_groups())
+ {
return true;
}
- if (sid_check_is_in_unix_groups(sid)) {
+ if (sid_check_is_in_unix_groups(sid) &&
+ pdb_is_responsible_for_unix_groups())
+ {
return true;
}