nss-pam-ldapd commit: r1740 - debian/nss-pam-ldapd/trunk/debian
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1740 - debian/nss-pam-ldapd/trunk/debian
- 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 commit: r1740 - debian/nss-pam-ldapd/trunk/debian
- Date: Fri, 31 Aug 2012 17:06:47 +0200 (CEST)
Author: arthur
Date: Fri Aug 31 17:06:46 2012
New Revision: 1740
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1740&view=revision
Log:
properly parse and write configuration options with an optional map parameter
during debconf configuration (LP: #1029062)
Modified:
debian/nss-pam-ldapd/trunk/debian/changelog
debian/nss-pam-ldapd/trunk/debian/nslcd.config
debian/nss-pam-ldapd/trunk/debian/nslcd.postinst
Modified: debian/nss-pam-ldapd/trunk/debian/changelog
==============================================================================
--- debian/nss-pam-ldapd/trunk/debian/changelog Fri Aug 31 14:50:09 2012
(r1739)
+++ debian/nss-pam-ldapd/trunk/debian/changelog Fri Aug 31 17:06:46 2012
(r1740)
@@ -4,8 +4,10 @@
* install a ldapns.ldif in nslcd doc directory (closes: #674591)
* ensure that time is set before starting k5start to ensure that Kerberos
ticket is granted (closes: #659227)
+ * properly parse and write configuration options with an optional map
+ parameter during debconf configuration (LP: #1029062)
- -- Arthur de Jong <adejong@debian.org> Fri, 31 Aug 2012 14:48:58 +0200
+ -- Arthur de Jong <adejong@debian.org> Fri, 31 Aug 2012 17:02:41 +0200
nss-pam-ldapd (0.8.10-1) unstable; urgency=low
Modified: debian/nss-pam-ldapd/trunk/debian/nslcd.config
==============================================================================
--- debian/nss-pam-ldapd/trunk/debian/nslcd.config Fri Aug 31 14:50:09
2012 (r1739)
+++ debian/nss-pam-ldapd/trunk/debian/nslcd.config Fri Aug 31 17:06:46
2012 (r1740)
@@ -29,7 +29,8 @@
# overwrite debconf value if different from config file
db_get "$debconf_param"
debconf_value="$RET"
- cfgfile_value=`sed -n
's/^'"$cfg_param"'[[:space:]]*\([^[:space:]].*[^[:space:]]\)[[:space:]]*$/\1/ip'
"$cfgfile" | head -n 1`
+ # the first part avoids getting options that have an option MAP parameter
+ cfgfile_value=`sed -n
'/^'"$cfg_param"'[[:space:]]*[aeghnprs][acedgihklopsrutwv]*[[:space:]]/!s/^'"$cfg_param"'[[:space:]]*\([^[:space:]].*[^[:space:]]\)[[:space:]]*$/\1/ip'
"$cfgfile" | head -n 1`
[ -n "$cfgfile_value" ] && [ "$debconf_value" != "$cfgfile_value" ] &&
db_set "$debconf_param" "$cfgfile_value"
# we're done
return 0
Modified: debian/nss-pam-ldapd/trunk/debian/nslcd.postinst
==============================================================================
--- debian/nss-pam-ldapd/trunk/debian/nslcd.postinst Fri Aug 31 14:50:09
2012 (r1739)
+++ debian/nss-pam-ldapd/trunk/debian/nslcd.postinst Fri Aug 31 17:06:46
2012 (r1740)
@@ -10,19 +10,12 @@
{
parameter="$1"
value="$2"
- # make matching of spaces better in parameter
- # this is complicated becase of the "base [map] dn" keyword
- param_re=`echo "$parameter" | sed
's#^#[[:space:]]*#;s#[[:space:]][[:space:]]*#[[:space:]][[:space:]]*#g'`
- # lines to not match
-
nomatch_re="^$param_re[[:space:]][[:space:]]*\(aliases\|ethers\|group\|hosts\|netgroup\|networks\|passwd\|protocols\|rpc\|services\|shadow\)"
# check if the parameter is defined
- line=`sed -n '/'"$nomatch_re"'/n;/^'"$param_re"'[[:space:]]/p' "$CONFFILE" |
head -n 1`
+ line=`sed -n
'/^'"$parameter"'[[:space:]]*[aeghnprs][acedgihklopsrutwv]*[[:space:]]/d;/^'"$parameter"'[[:space:]]/p'
"$CONFFILE" | head -n 1`
if [ -z "$line" ]
then
# check if the parameter is commented out
- param_re="#$param_re"
-
nomatch_re="^$param_re[[:space:]][[:space:]]*\(aliases\|ethers\|group\|hosts\|netgroup\|networks\|passwd\|protocols\|rpc\|services\|shadow\)"
- line=`sed -n '/'"$nomatch_re"'/n;/^'"$param_re"'[[:space:]]/p' "$CONFFILE"
| head -n 1`
+ line=`sed -n
'/^#'"$parameter"'[[:space:]]*[aeghnprs][acedgihklopsrutwv]*[[:space:]]/d;/^#'"$parameter"'[[:space:]]/p'
"$CONFFILE" | head -n 1`
fi
# decide what to do
if [ -z "$line" ]
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r1740 - debian/nss-pam-ldapd/trunk/debian,
Commits of the nss-pam-ldapd project