Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/netgroup.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-09-08 17:19:07 +0200
committerArthur de Jong <arthur@arthurdejong.org>2007-09-08 17:19:07 +0200
commit4b539318232ffc077eaa882963b9788d686610cb (patch)
treeee200bf041a84ff883270309064e6284d6f421be /nslcd/netgroup.c
parent30423d96ecd243663906a3a1c13f1f0e90ac6330 (diff)
move filters definitions to the database modules themselves (and already define base and scope but don't use them yet)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@383 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/netgroup.c')
-rw-r--r--nslcd/netgroup.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/nslcd/netgroup.c b/nslcd/netgroup.c
index b7a3d36..623dbaa 100644
--- a/nslcd/netgroup.c
+++ b/nslcd/netgroup.c
@@ -113,7 +113,27 @@ struct mynetgrent
} \
while (0)
+/* ( nisSchema.2.8 NAME 'nisNetgroup' SUP top STRUCTURAL
+ * DESC 'Abstraction of a netgroup. May refer to other netgroups'
+ * MUST cn
+ * MAY ( nisNetgroupTriple $ memberNisNetgroup $ description ) )
+ */
+
+/* the search base for searches */
+const char *netgroup_base = NULL;
+
+/* the search scope for searches */
+int netgroup_scope = LDAP_SCOPE_DEFAULT;
+
+/* the basic search filter for searches */
+const char *netgroup_filter = "(objectClass=nisNetgroup)";
+
/* the attributes to request with searches */
+const char *attmap_netgroup_cn = "cn";
+const char *attmap_netgroup_nisNetgroupTriple = "nisNetgroupTriple";
+const char *attmap_netgroup_memberNisNetgroup = "memberNisNetgroup";
+
+/* the attribute list to request with searches */
static const char *netgroup_attrs[4];
static int mkfilter_netgroup_byname(const char *name,
@@ -125,8 +145,8 @@ static int mkfilter_netgroup_byname(const char *name,
return -1;
/* build filter */
return mysnprintf(buffer,buflen,
- "(&(%s=%s)(%s=%s))",
- attmap_objectClass,attmap_netgroup_objectClass,
+ "(&%s(%s=%s))",
+ netgroup_filter,
attmap_netgroup_cn,buf2);
}