summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2006-12-19 11:53:05 +0000
committerArthur de Jong <arthur@arthurdejong.org>2006-12-19 11:53:05 +0000
commita03d9151a39c2875d761b5b0f89675150546925e (patch)
treec97cfc299100b6b16729dcf29bb854f75815a4a9
parentfde5e0ece1377fa1ed09fe4a601e4e18767174bd (diff)
change default configuration file name to /etc/nss-ldapd.conf
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@179 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac8
-rw-r--r--debian/libnss-ldapd.config6
-rw-r--r--debian/libnss-ldapd.nslcd.init2
-rw-r--r--debian/libnss-ldapd.postinst7
-rw-r--r--debian/libnss-ldapd.postrm6
-rwxr-xr-xdebian/rules13
-rw-r--r--nss-ldapd.conf (renamed from ldap.conf)32
-rw-r--r--nss-ldapd.conf.5 (renamed from nss_ldap.5)4
9 files changed, 30 insertions, 54 deletions
diff --git a/Makefile.am b/Makefile.am
index b9a7984..a37eaf0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
SUBDIRS = nss server tests
-dist_man_MANS = nss_ldap.5 nslcd.8
+dist_man_MANS = nss-ldapd.conf.5 nslcd.8
DEBIAN_FILES = debian/changelog debian/compat debian/control \
debian/copyright debian/rules \
@@ -36,7 +36,7 @@ DEBIAN_FILES = debian/changelog debian/compat debian/control \
debian/po/*.po debian/po/templates.pot \
debian/po/POTFILES.in
-EXTRA_DIST = ldap.conf nslcd.h nslcd-common.h \
+EXTRA_DIST = nss-ldapd.conf nslcd.h nslcd-common.h \
$(DEBIAN_FILES)
NSS_LDAP_PATH_CONF = @NSS_LDAP_PATH_CONF@
@@ -48,7 +48,7 @@ install-ldap_conf:
@if [ -f $(DESTDIR)$(NSS_LDAP_PATH_CONF) ]; then \
echo "$(DESTDIR)$(NSS_LDAP_PATH_CONF) already exists, install will not overwrite"; \
else \
- $(INSTALL_DATA) -D $(srcdir)/ldap.conf $(DESTDIR)$(NSS_LDAP_PATH_CONF); \
+ $(INSTALL_DATA) -D $(srcdir)/nss-ldapd.conf $(DESTDIR)$(NSS_LDAP_PATH_CONF); \
fi
# target for easily creating a Debian package
diff --git a/configure.ac b/configure.ac
index f3cee92..fd2a975 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,17 +105,17 @@ fi
AC_ARG_WITH(ldap-conf-file,
AS_HELP_STRING([--with-ldap-conf-file=PATH],
- [path to LDAP configuration file @<:@/etc/ldap.conf@:>@]),
+ [path to LDAP configuration file @<:@/etc/nss-ldapd.conf@:>@]),
[ NSS_LDAP_PATH_CONF="$with_ldap_conf_file" ],
- [ NSS_LDAP_PATH_CONF="/etc/ldap.conf" ])
+ [ NSS_LDAP_PATH_CONF="/etc/nss-ldapd.conf" ])
AC_DEFINE_UNQUOTED(NSS_LDAP_PATH_CONF,"$NSS_LDAP_PATH_CONF",[Path to LDAP configuration file.])
AC_SUBST(NSS_LDAP_PATH_CONF)
AC_ARG_WITH(ldap-secret-file,
AS_HELP_STRING([--with-ldap-secret-file=PATH],
- [path to LDAP root secret file @<:@/etc/ldap.secret@:>@]),
+ [path to LDAP root secret file @<:@/etc/nss-ldapd.secret@:>@]),
[ NSS_LDAP_PATH_ROOTPASSWD="$with_ldap_secret_file" ],
- [ NSS_LDAP_PATH_ROOTPASSWD="/etc/ldap.secret" ])
+ [ NSS_LDAP_PATH_ROOTPASSWD="/etc/nss-ldapd.secret" ])
AC_DEFINE_UNQUOTED(NSS_LDAP_PATH_ROOTPASSWD,"$NSS_LDAP_PATH_ROOTPASSWD",[Path to LDAP root secret file.])
AC_SUBST(NSS_LDAP_PATH_ROOTPASSWD)
diff --git a/debian/libnss-ldapd.config b/debian/libnss-ldapd.config
index 6e86bb8..02561f0 100644
--- a/debian/libnss-ldapd.config
+++ b/debian/libnss-ldapd.config
@@ -2,6 +2,8 @@
set -e
+CONFFILE="/etc/nss-ldapd.conf"
+
# source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0
@@ -114,10 +116,10 @@ db_set libnss-ldapd/ldap-rootbindpw ""
# fill our defaults with the current configuration if available
# and fall back to guessing the config from some other system files
-if [ -f /etc/libnss-ldapd.conf ]
+if [ -f "$CONFFILE" ]
then
# parse current configuration
- parsecfg /etc/libnss-ldapd.conf
+ parsecfg "$CONFFILE"
else
# newer found values override older values
parsesys
diff --git a/debian/libnss-ldapd.nslcd.init b/debian/libnss-ldapd.nslcd.init
index d39ab99..5258ae0 100644
--- a/debian/libnss-ldapd.nslcd.init
+++ b/debian/libnss-ldapd.nslcd.init
@@ -35,7 +35,7 @@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
NSLCD_BIN=/usr/sbin/nslcd
NSLCD_DESC="NSS-LDAP connection daemon"
-NSLCD_CFG=/etc/libnss-ldapd.conf
+NSLCD_CFG=/etc/nss-ldapd.conf
[ -x "$NSLCD_BIN" ] || exit 0
[ -f "$NSLCD_CFG" ] || exit 0
diff --git a/debian/libnss-ldapd.postinst b/debian/libnss-ldapd.postinst
index 013aa4f..9ad88a1 100644
--- a/debian/libnss-ldapd.postinst
+++ b/debian/libnss-ldapd.postinst
@@ -2,8 +2,7 @@
set -e
-PACKAGE=libnss-ldapd
-CONFFILE="/etc/libnss-ldapd.conf"
+CONFFILE="/etc/nss-ldapd.conf"
# set an option in the configuration file to the specified value
cfg_set()
@@ -112,7 +111,7 @@ create_config()
# begin the file by some information as to where it came from
cat > "$CONFFILE" << EOM
# $CONFFILE
-# libnss-ldapd configuration file. See libnss-ldapd.conf(5)
+# nss-ldapd configuration file. See nss-ldapd.conf(5)
# for details.
#
# This file was based on existing configuration files
@@ -135,7 +134,7 @@ EOM
# TODO: improve this template
cat > "$CONFFILE" << EOM
# $CONFFILE
-# libnss-ldapd configuration file. See libnss-ldapd.conf(5)
+# nss-ldapd configuration file. See nss-ldapd.conf(5)
# for details.
# The location at which the LDAP server(s) should be reachable.
diff --git a/debian/libnss-ldapd.postrm b/debian/libnss-ldapd.postrm
index 8a1da8f..33bab84 100644
--- a/debian/libnss-ldapd.postrm
+++ b/debian/libnss-ldapd.postrm
@@ -1,11 +1,11 @@
#!/bin/sh
-action=$1
+CONFFILE="/etc/nss-ldapd.conf"
# remove our configuration file (not a conffile) on purge manually
-if [ "$action" = "purge" ]
+if [ "$1" = "purge" ]
then
- rm -f /etc/libnss-ldapd.conf
+ rm -f "$CONFFILE"
fi
#DEBHELPER#
diff --git a/debian/rules b/debian/rules
index 732c1a7..80a944b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,7 +23,7 @@ configure-stamp:
--disable-maintainer-mode \
--disable-dependency-tracking \
--with-ldap-lib=openldap \
- --with-ldap-conf-file=/etc/libnss-ldapd.conf \
+ --with-ldap-conf-file=/etc/nss-ldapd.conf \
--with-nslcd-pidfile=/var/run/nslcd/nslcd.pid \
--with-nslcd-socket=/var/run/nslcd/socket \
--enable-paged-results \
@@ -54,16 +54,7 @@ install: build
dh_clean -k
$(MAKE) install DESTDIR=$(CURDIR)/debian/libnss-ldapd
# make configfile fully generated
- rm -f $(CURDIR)/debian/libnss-ldapd/etc/libnss-ldapd.conf
- # rename man page
- mv $(CURDIR)/debian/libnss-ldapd/usr/share/man/man5/nss_ldap.5 $(CURDIR)/debian/libnss-ldapd/usr/share/man/man5/libnss-ldapd.conf.5
- # change all references from /etc/ldap.conf to /etc/libnss-ldapd.conf
- for file in $(CURDIR)/debian/libnss-ldapd/usr/share/man/man5/libnss-ldapd.conf.5 \
- ; \
- do \
- sed -i -e 's:/etc/ldap.conf:/etc/libnss-ldapd.conf:g' \
- -e 's:/etc/ldap.secret:/etc/libnss-ldapd.secret:g' $$file; \
- done
+ rm -f $(CURDIR)/debian/libnss-ldapd/etc/nss-ldapd.conf
# install a lintian override file
install -D -m 644 $(CURDIR)/debian/libnss-ldapd.lintian-overrides \
$(CURDIR)/debian/libnss-ldapd/usr/share/lintian/overrides/libnss-ldapd
diff --git a/ldap.conf b/nss-ldapd.conf
index 27618dc..c700f39 100644
--- a/ldap.conf
+++ b/nss-ldapd.conf
@@ -1,29 +1,18 @@
- @(#)$Id$
-#
# This is the configuration file for the LDAP nameservice
# switch library and the LDAP PAM module.
-#
-# PADL Software
-# http://www.padl.com
-#
-
-# Your LDAP server. Must be resolvable without using LDAP.
-# Multiple hosts may be specified, each separated by a
-# space. How long nss_ldap takes to failover depends on
-# whether your LDAP client library supports configurable
-# network or connect timeouts (see bind_timelimit).
-host 127.0.0.1
-
-# The distinguished name of the search base.
-base dc=padl,dc=com
-# Another way to specify your LDAP server is to provide an
-# uri with the server name. This allows to use
-# Unix Domain Sockets to connect to a local LDAP Server.
+# The uri pointing to the LDAP server to use for name lookups.
+# Mulitple entries may be specified, each separated by a
+# space. The address that is used here should be resolvable
+# without using LDAP (obviously).
#uri ldap://127.0.0.1/
#uri ldaps://127.0.0.1/
#uri ldapi://%2fvar%2frun%2fldapi_sock/
# Note: %2f encodes the '/' used as directory separator
+uri ldap://127.0.0.1/
+
+# The distinguished name of the search base.
+base dc=example,dc=net
# The LDAP version to use (defaults to 3
# if supported by client library)
@@ -46,10 +35,6 @@ base dc=padl,dc=com
# of an editor to create the file.
#rootbinddn cn=manager,dc=padl,dc=com
-# The port.
-# Optional: default is 389.
-#port 389
-
# The search scope.
#scope sub
#scope one
@@ -307,4 +292,3 @@ base dc=padl,dc=com
# Override the default Kerberos ticket cache location.
#krb5_ccname FILE:/etc/.ldapcache
-
diff --git a/nss_ldap.5 b/nss-ldapd.conf.5
index 0e7cfd5..7a84eb9 100644
--- a/nss_ldap.5
+++ b/nss-ldapd.conf.5
@@ -51,7 +51,7 @@ depend on which flags
were enabled when the software was built. Most features are enabled
in the configuration file, described below. (The location of the
configuration file is
-configurable at compile time; the default path is /etc/ldap.conf.)
+configurable at compile time; the default path is /etc/nss-ldapd.conf.)
Also, some features may be unavailable on certain
operating systems or with certain LDAP libraries. For more information,
consult your vendor.
@@ -455,6 +455,6 @@ module was developed by PADL Software Pty Ltd (www.padl.com).
.SH FILES
.TP
-/etc/ldap.conf, /etc/ldap.secret, /etc/nsswitch.conf
+/etc/nss-ldapd.conf, /etc/nss-ldapd.secret, /etc/nsswitch.conf
.SH SEE ALSO
.BR nsswitch.conf (5)