From 72c4709eefbfac429eca3ed8fb66decd03ed098d Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 25 Mar 2011 13:30:46 +0000 Subject: implement a validnames option that can be used to fine-tune the test for valid user and group names using a regular expression git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1411 ef36b2f9-881f-0410-afb5-c4e39611909c --- tests/test_common.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_common.c') diff --git a/tests/test_common.c b/tests/test_common.c index 092867b..ee96733 100644 --- a/tests/test_common.c +++ b/tests/test_common.c @@ -26,6 +26,11 @@ #include #include "nslcd/common.h" +#include "nslcd/cfg.h" + +/* we include nslcd/cfg.c here to use cfg_defaults() to set the default + regular expression used in test_isvalidname() */ +#include "nslcd/cfg.c" static void test_isvalidname(void) { @@ -41,6 +46,8 @@ static void test_isvalidname(void) /* the main program... */ int main(int UNUSED(argc),char UNUSED(*argv[])) { + nslcd_cfg=(struct ldap_config *)malloc(sizeof(struct ldap_config)); + cfg_defaults(nslcd_cfg); test_isvalidname(); return 0; } -- cgit v1.2.3