Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/nslcd.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-08-18 21:35:56 +0200
committerArthur de Jong <arthur@arthurdejong.org>2007-08-18 21:35:56 +0200
commit3d531f6a73d6af0ad5444f9ddeb7cd6ac8fec64e (patch)
tree2825de651d7c8cdd76dc821b640aaa3795cc0772 /nslcd/nslcd.c
parent1a79a08b416d2c611afd51d143c4d74efecd7b9e (diff)
rewrite configuration file handling to be simpler and more consistent, this does mean that the syntax of the configfile has changed from the PADL one and that some options were removed (also update manual page and sample config file to reflect changes)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@343 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/nslcd.c')
-rw-r--r--nslcd/nslcd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c
index 35fe3ed..a4c5dca 100644
--- a/nslcd/nslcd.c
+++ b/nslcd/nslcd.c
@@ -48,6 +48,7 @@
#include "nslcd.h"
#include "log.h"
+#include "cfg.h"
#include "common.h"
#include "compat/attrs.h"
@@ -540,6 +541,10 @@ int main(int argc,char *argv[])
if (__nss_configure_lookup("hosts","files dns"))
log_log(LOG_ERR,"unable to override hosts lookup method: %s",strerror(errno));
+ /* read configuration file */
+ cfg_init();
+ nslcd_cfg->ldc_debug=nslcd_debugging;
+
/* daemonize */
if ((!nslcd_debugging)&&(daemon(0,0)<0))
{
@@ -551,7 +556,7 @@ int main(int argc,char *argv[])
(void)umask((mode_t)0022);
/* intilialize logging */
- if (!nslcd_debugging)
+ if (!nslcd_cfg->ldc_debug)
log_startlogging();
log_log(LOG_INFO,"version %s starting",VERSION);