From 987de8a971bf9730c92406234d4a0f3a23a92dda Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 18 Jun 2013 10:47:33 +0200 Subject: s3:passdb make pdb_sid_to_id honor backend responsibilities only ask passdb backend for mapping if it is responsible Pair-Programmed-With: Michael Adam Signed-off-by: Christian Ambach Signed-off-by: Michael Adam --- source3/passdb/pdb_interface.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/passdb/pdb_interface.c') diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index b45b4d66bb..ea67e2faf5 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -34,6 +34,7 @@ #include "../libcli/security/security.h" #include "../lib/util/util_pw.h" #include "passdb/pdb_secrets.h" +#include "lib/util_sid_passdb.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_PASSDB @@ -1217,6 +1218,12 @@ bool pdb_gid_to_sid(gid_t gid, struct dom_sid *sid) bool pdb_sid_to_id(const struct dom_sid *sid, struct unixid *id) { struct pdb_methods *pdb = pdb_get_methods(); + + /* only ask the backend if it is responsible */ + if (!sid_check_object_is_for_passdb(sid)) { + return false; + } + return pdb->sid_to_id(pdb, sid, id); } -- cgit