summaryrefslogtreecommitdiff
path: root/server/db
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-04-01 10:21:20 -0400
committerSimo Sorce <ssorce@redhat.com>2009-04-01 11:03:08 -0400
commit4c056813c8afee16038b6d197f29ae12817c0488 (patch)
treec54f1df0946ae0becefdbd48292faba3b7a95c50 /server/db
parent499e4d63fe57875338777f0ac4455693307b4c56 (diff)
downloadsssd-4c056813c8afee16038b6d197f29ae12817c0488.tar.gz
sssd-4c056813c8afee16038b6d197f29ae12817c0488.tar.bz2
sssd-4c056813c8afee16038b6d197f29ae12817c0488.zip
Add way to use files as a proxy backend fro LOCAL
Makes LOCAL a normal backend removing some special handling. Fix/Add id range filtering and name filtering Filters uid=0 and gid=0 in the proxy backend as 0 is invalid within sysdb and was causing getxxent calls to fail completely. Fix nss_ncache_check_xxx calls to avoid dirtying the 'ret' variable and causing some unwanted failures. Change sysdb to always return the uid number when searching member entries so that id range filtering can be perfomed also in group searhes (does not work with legacy backends)
Diffstat (limited to 'server/db')
-rw-r--r--server/db/sysdb.h5
-rw-r--r--server/db/sysdb_search.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h
index 9e2cb39d..ec87ec07 100644
--- a/server/db/sysdb.h
+++ b/server/db/sysdb.h
@@ -107,11 +107,12 @@
SYSDB_USERPIC, \
SYSDB_LAST_UPDATE, \
NULL}
-#define SYSDB_GRNAM_ATTRS {SYSDB_NAME, SYSDB_GIDNUM, \
+#define SYSDB_GRSRC_ATTRS {SYSDB_NAME, SYSDB_GIDNUM, \
SYSDB_LAST_UPDATE, SYSDB_LEGACY_MEMBER, \
"objectClass", \
NULL}
-#define SYSDB_GRPW_ATTRS {SYSDB_NAME, SYSDB_LAST_UPDATE, \
+#define SYSDB_GRPW_ATTRS {SYSDB_NAME, SYSDB_UIDNUM, \
+ SYSDB_LAST_UPDATE, \
"objectClass", \
NULL}
diff --git a/server/db/sysdb_search.c b/server/db/sysdb_search.c
index 42470b63..7dd467e8 100644
--- a/server/db/sysdb_search.c
+++ b/server/db/sysdb_search.c
@@ -481,7 +481,7 @@ static int get_grp_callback(struct ldb_request *req,
static void grp_search(struct sysdb_req *sysreq, void *ptr)
{
struct sysdb_search_ctx *sctx;
- static const char *attrs[] = SYSDB_GRNAM_ATTRS;
+ static const char *attrs[] = SYSDB_GRSRC_ATTRS;
struct ldb_request *req;
struct ldb_dn *base_dn;
int ret;