summaryrefslogtreecommitdiff
path: root/source3/lib/util_sid_passdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_sid_passdb.c')
-rw-r--r--source3/lib/util_sid_passdb.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/lib/util_sid_passdb.c b/source3/lib/util_sid_passdb.c
index 4378d0fc1e..33fb5420d6 100644
--- a/source3/lib/util_sid_passdb.c
+++ b/source3/lib/util_sid_passdb.c
@@ -23,6 +23,34 @@
#include "passdb/machine_sid.h"
/**
+ * check whether this is an object-sid that should
+ * be treated by the passdb, e.g. for id-mapping.
+ */
+bool sid_check_object_is_for_passdb(const struct dom_sid *sid)
+{
+ if (sid_check_is_in_our_sam(sid)) {
+ return true;
+ }
+
+ if (sid_check_is_in_builtin(sid)) {
+ return true;
+ }
+
+ if (sid_check_is_in_wellknown_domain(sid)) {
+ return true;
+ }
+
+ if (sid_check_is_in_unix_users(sid)) {
+ return true;
+ }
+
+ if (sid_check_is_in_unix_groups(sid)) {
+ return true;
+ }
+
+ return false;
+}
+/**
* check whether this is an object- or domain-sid that should
* be treated by the passdb, e.g. for id-mapping.
*/