lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1969 - in nss-pam-ldapd-0.7.15+squeeze: . debian

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1969 - in nss-pam-ldapd-0.7.15+squeeze: . debian



Author: arthur
Date: Sun May 12 12:00:59 2013
New Revision: 1969
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1969&view=revision

Log:
get the first configuration value instead of the last because that one is also 
written (based on r1567 from 0.8)

Modified:
   nss-pam-ldapd-0.7.15+squeeze/   (props changed)
   nss-pam-ldapd-0.7.15+squeeze/debian/nslcd.config

Modified: nss-pam-ldapd-0.7.15+squeeze/debian/nslcd.config
==============================================================================
--- nss-pam-ldapd-0.7.15+squeeze/debian/nslcd.config    Sat May 11 17:19:31 
2013        (r1968)
+++ nss-pam-ldapd-0.7.15+squeeze/debian/nslcd.config    Sun May 12 12:00:59 
2013        (r1969)
@@ -78,7 +78,7 @@
     if [ -z "$uris" ]
     then
       hosts=`sed -n 's/^host[[:space:]]*//ip' "$cfgfile"`
-      port=`sed -n 's/^port[[:space:]]*//ip' "$cfgfile" | tail -n 1`
+      port=`sed -n 's/^port[[:space:]]*//ip' "$cfgfile" | head -n 1`
       for host in $hosts
       do
         if [ -z "$port" ] || (echo "$host" | grep -q ':' )
@@ -95,21 +95,21 @@
   db_get nslcd/ldap-base
   if [ -z "$RET" ]
   then
-    searchbase=`sed -n 
's/^base[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\1/ip' "$cfgfile" | tail -n 
1`
+    searchbase=`sed -n 
's/^base[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\1/ip' "$cfgfile" | head -n 
1`
     [ -n "$searchbase" ] && db_set nslcd/ldap-base "$searchbase"
   fi
   # find binddn
   db_get nslcd/ldap-binddn
   if [ -z "$RET" ]
   then
-    binddn=`sed -n 's/^binddn[[:space:]]*//ip' "$cfgfile" | tail -n 1`
+    binddn=`sed -n 's/^binddn[[:space:]]*//ip' "$cfgfile" | head -n 1`
     db_set nslcd/ldap-binddn "$binddn"
   fi
   # find bindpw
   db_get nslcd/ldap-bindpw
   if [ -z "$RET" ]
   then
-    bindpw=`sed -n 's/^bindpw[[:space:]]*//ip' "$cfgfile" | tail -n 1`
+    bindpw=`sed -n 's/^bindpw[[:space:]]*//ip' "$cfgfile" | head -n 1`
     db_set nslcd/ldap-bindpw "$bindpw"
   fi
   # check ssl option
@@ -128,7 +128,7 @@
   db_get nslcd/ldap-reqcert
   if [ -z "$RET" ]
   then
-    reqcert=`sed -n 
's/^tls_\(reqcert\|checkpeer\)[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\2/ip' 
"$cfgfile" | tail -n 1`
+    reqcert=`sed -n 
's/^tls_\(reqcert\|checkpeer\)[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\2/ip' 
"$cfgfile" | head -n 1`
     # normalise value
     reqcert=`echo "$reqcert" | tr 'A-Z' 'a-z' | sed 
's/^no$/never/;s/^yes$/demand/;s/^hard$/demand/'`
     [ -n "$reqcert" ] && db_set nslcd/ldap-reqcert "$reqcert"
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/