nss-pam-ldapd branch master updated. 0.9.9-3-g9fbcdd1
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd branch master updated. 0.9.9-3-g9fbcdd1
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd branch master updated. 0.9.9-3-g9fbcdd1
- Date: Sat, 21 Jul 2018 19:05:33 +0200 (CEST)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".
The branch, master has been updated
via 9fbcdd17ad1f6da3421051fbe329d74201f0437f (commit)
from 2a468fd0149d8088e66e025e7f2b7c2b7799e969 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=9fbcdd17ad1f6da3421051fbe329d74201f0437f
commit 9fbcdd17ad1f6da3421051fbe329d74201f0437f
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sat Jul 21 18:38:40 2018 +0200
Add a Travis configuration file
This ensures that the integration tests can be successfully run. It
configures a slapd instance with the test database, configures the
system to use LDAP authentication and runs the tests.
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..1e6d48a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,48 @@
+language: c
+sudo: required
+os:
+ - linux
+compiler:
+ - gcc
+addons:
+ apt:
+ packages:
+ - docbook-xml
+ - docbook2x
+ - expect
+ - ldap-utils
+ - libkrb5-dev
+ - libldap2-dev
+ - libpam0g-dev
+ - libsasl2-dev
+ - python
+ - python-daemon
+ - python-ldap
+ - python-pyasn1
+ - python-pyasn1-modules
+ - slapd
+ - xmlto
+ - pylint
+script:
+ # Build the package
+ - ./autogen.sh
+ - ./configure
+ --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc
+ --libdir=/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`
+ --with-pam-seclib-dir=/lib/`dpkg-architecture
-qDEB_HOST_MULTIARCH`/security
+ --enable-warnings --enable-pynslcd
+ - make
+ - make distcheck
+ # Set up a custom LDAP server
+ - sudo service slapd stop || true
+ - tmpslapd=`mktemp -d -t slapd.XXXXXX` && sudo tests/setup_slapd.sh
"$tmpslapd" setup && sudo tests/setup_slapd.sh "$tmpslapd" start
+ # Set up the system to use LDAP for authentication
+ - sudo make install
+ - sudo tests/testenv.sh enable_nss passwd group shadow networks protocols
services ethers rpc netgroup aliases
+ - sudo tests/testenv.sh enable_pam
+ - sudo su -c 'cat tests/nslcd-test.conf > /etc/nslcd.conf && chmod 640
/etc/nslcd.conf && chown root:travis /etc/nslcd.conf'
+ # Run nslcd and run the tests
+ - sudo nslcd/nslcd
+ - sudo tests/testenv.sh check && sudo tests/testenv.sh check_nss passwd
group shadow networks protocols services ethers rpc netgroup aliases
+ - sudo make check
+ - cat tests/test-suite.log
diff --git a/tests/debian-pam-config b/tests/debian-pam-config
new file mode 100644
index 0000000..9181a69
--- /dev/null
+++ b/tests/debian-pam-config
@@ -0,0 +1,19 @@
+Name: LDAP Authentication
+Default: yes
+Priority: 128
+Auth-Type: Primary
+Auth-Initial:
+ [success=end default=ignore] pam_ldap.so minimum_uid=1000
+Auth:
+ [success=end default=ignore] pam_ldap.so minimum_uid=1000
use_first_pass
+Account-Type: Additional
+Account:
+ [success=ok new_authtok_reqd=done ignore=ignore user_unknown=ignore
authinfo_unavail=ignore default=bad] pam_ldap.so minimum_uid=1000
+Password-Type: Primary
+Password-Initial:
+ [success=end default=ignore] pam_ldap.so minimum_uid=1000
+Password:
+ [success=end default=ignore] pam_ldap.so minimum_uid=1000
try_first_pass
+Session-Type: Additional
+Session:
+ [success=ok default=ignore] pam_ldap.so minimum_uid=1000
diff --git a/tests/testenv.sh b/tests/testenv.sh
index 9a0a866..8377d0e 100755
--- a/tests/testenv.sh
+++ b/tests/testenv.sh
@@ -2,7 +2,7 @@
# testenv.sh - script to check test environment
#
-# Copyright (C) 2011-2017 Arthur de Jong
+# Copyright (C) 2011-2018 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -54,7 +54,7 @@ nss_is_enabled()
# check to see if name is configured to do lookups through
# LDAP and enable if not
-nss_enable()
+enable_nss()
{
name="$1"
if nss_is_enabled "$name"
@@ -77,6 +77,13 @@ nss_enable()
return 0
}
+# put a PAM stack in place that enables lookups through LDAP
+# (this is currently hard-coded to only support Debian-based systems)
+enable_pam() {
+ cp "$srcdir"/debian-pam-config /usr/share/pam-configs/ldap
+ pam-auth-update --enable --force ldap
+}
+
# check nsswitch.conf to see if dbs use ldap
check_nsswitch() {
required="${1:-passwd group}"
@@ -170,16 +177,20 @@ check_nslcd_running() {
}
case "$1" in
- nss_enable)
+ enable_nss|nss_enable)
# modify /etc/nsswitch.conf to enable ldap for db
shift
while [ $# -gt 0 ]
do
- nss_enable "$1"
+ enable_nss "$1"
shift
done
exit 0
;;
+ enable_pam)
+ enable_pam
+ exit 0
+ ;;
check)
# perform all tests for test environment
res=0
@@ -214,7 +225,7 @@ case "$1" in
exit $res
;;
*)
- echo "Usage: $0 {nss_enable|check|check_nss|check_ldap}" >&2
+ echo "Usage: $0 {enable_nss|enable_pam|check|check_nss|check_ldap}" >&2
exit 1
;;
esac
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
tests/debian-pam-config | 19 +++++++++++++++++++
tests/testenv.sh | 21 ++++++++++++++++-----
3 files changed, 83 insertions(+), 5 deletions(-)
create mode 100644 .travis.yml
create mode 100644 tests/debian-pam-config
hooks/post-receive
--
nss-pam-ldapd
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd branch master updated. 0.9.9-3-g9fbcdd1,
Commits of the nss-pam-ldapd project