lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1543 - nss-pam-ldapd/debian

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

nss-pam-ldapd commit: r1543 - nss-pam-ldapd/debian



Author: arthur
Date: Wed Sep 14 21:13:21 2011
New Revision: 1543
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1543&view=revision

Log:
make whitespace matching consistent in regular expressions (thanks Nick)

Modified:
   nss-pam-ldapd/debian/libnss-ldapd.config
   nss-pam-ldapd/debian/libnss-ldapd.postrm
   nss-pam-ldapd/debian/nslcd.config
   nss-pam-ldapd/debian/nslcd.init
   nss-pam-ldapd/debian/nslcd.postinst

Modified: nss-pam-ldapd/debian/libnss-ldapd.config
==============================================================================
--- nss-pam-ldapd/debian/libnss-ldapd.config    Fri Sep  9 18:08:44 2011        
(r1542)
+++ nss-pam-ldapd/debian/libnss-ldapd.config    Wed Sep 14 21:13:21 2011        
(r1543)
@@ -27,7 +27,7 @@
 # find name services that currently use LDAP
 configured=`nss_list_configured`
 # separate by commas
-configured=`echo $configured | sed 's/ /, /g'`
+configured=`echo $configured | sed 's/[[:space:]][[:space:]]*/, /g'`
 # store configured services either on first config or when ldap is already
 # configured
 if [ -z "$RET" ] || [ -n "$configured" ]

Modified: nss-pam-ldapd/debian/libnss-ldapd.postrm
==============================================================================
--- nss-pam-ldapd/debian/libnss-ldapd.postrm    Fri Sep  9 18:08:44 2011        
(r1542)
+++ nss-pam-ldapd/debian/libnss-ldapd.postrm    Wed Sep 14 21:13:21 2011        
(r1543)
@@ -60,7 +60,7 @@
       # ask with debconf
       . /usr/share/debconf/confmodule
       db_title "Removing libnss-ldapd"
-      db_subst libnss-ldapd/clean_nsswitch services "`echo $configured | sed 
's/ /, /g'`"
+      db_subst libnss-ldapd/clean_nsswitch services "`echo $configured | sed 
's/[[:space:]][[:space:]]*/, /g'`"
       db_fset libnss-ldapd/clean_nsswitch seen false
       if db_input high libnss-ldapd/clean_nsswitch
       then

Modified: nss-pam-ldapd/debian/nslcd.config
==============================================================================
--- nss-pam-ldapd/debian/nslcd.config   Fri Sep  9 18:08:44 2011        (r1542)
+++ nss-pam-ldapd/debian/nslcd.config   Wed Sep 14 21:13:21 2011        (r1543)
@@ -41,7 +41,7 @@
   domain=`hostname --domain` || true
   [ -z "$domain" ] && domain=`hostname --nis | grep '\.'` || true
   [ -z "$domain" ] && domain=`hostname --fqdn | sed -n 's/^[^.]*\.//p'` || true
-  [ -z "$domain" ] && domain=`sed -n 's/^ *\(domain\|search\) *\([^ ]*\) 
*$/\2/p' /etc/resolv.conf | head -n 1` || true
+  [ -z "$domain" ] && domain=`sed -n 
's/^[[:space:]]*\(domain\|search\)[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\2/p'
 /etc/resolv.conf | head -n 1` || true
   echo "$domain"
 }
 

Modified: nss-pam-ldapd/debian/nslcd.init
==============================================================================
--- nss-pam-ldapd/debian/nslcd.init     Fri Sep  9 18:08:44 2011        (r1542)
+++ nss-pam-ldapd/debian/nslcd.init     Wed Sep 14 21:13:21 2011        (r1543)
@@ -49,18 +49,18 @@
 K5START_DESC="Keep alive Kerberos ticket"
 K5START_START=""
 K5START_PIDFILE=$NSLCD_STATEDIR/k5start_nslcd.pid
-K5START_USER=$(sed -n 's/^uid *\([^ ]*\) *$/\1/ip' $NSLCD_CFG)
-K5START_GROUP=$(sed -n 's/^gid *\([^ ]*\) *$/\1/ip' $NSLCD_CFG)
+K5START_USER=$(sed -n 's/^uid[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\1/ip' 
$NSLCD_CFG)
+K5START_GROUP=$(sed -n 
's/^gid[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\1/ip' $NSLCD_CFG)
 K5START_MODE=600
 K5START_KEYTAB=/etc/krb5.keytab
 K5START_CCREFRESH=60
 K5START_PRINCIPAL="host/$(hostname -f)"
-K5START_CCFILE=$(sed -n 's/^krb5_ccname *\(FILE:\)\?\([^: ]*\) *$/\2/ip' 
$NSLCD_CFG)
+K5START_CCFILE=$(sed -n 
's/^krb5_ccname[[:space:]]*\(FILE:\)\?\([^:[:space:]]*\)[[:space:]]*$/\2/ip' 
$NSLCD_CFG)
 
 # check if we should use k5start by default (sasl_mech should be GSSAPI and
 # krb5_ccname should be found)
 if [ -x "$K5START_BIN" ] && \
-   grep -q '^sasl_mech *GSSAPI$' $NSLCD_CFG && \
+   grep -q '^sasl_mech[[:space:]]*GSSAPI[[:space:]]*$' $NSLCD_CFG && \
    [ -n "$K5START_CCFILE" ]
 then
   K5START_START="yes"

Modified: nss-pam-ldapd/debian/nslcd.postinst
==============================================================================
--- nss-pam-ldapd/debian/nslcd.postinst Fri Sep  9 18:08:44 2011        (r1542)
+++ nss-pam-ldapd/debian/nslcd.postinst Wed Sep 14 21:13:21 2011        (r1543)
@@ -69,7 +69,7 @@
   # escape all uri directives
   sed -i 's/^uri /_uri_ /i' $CONFFILE
   # set the uri options
-  echo "$uris" | sed 's/^[ \t]*//;s/[ \t]*$//;s/  */\n/g' | while read uri
+  echo "$uris" | sed 
's/^[[:space:]]*//;s/[[:space:]]*$//;s/[[:space:]][[:space:]]*/\n/g' | while 
read uri
   do
     if grep -qi '^_uri_ ' $CONFFILE
     then
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/