nss-pam-ldapd commit: r1169 - nss-pam-ldapd/common
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1169 - nss-pam-ldapd/common
- 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: r1169 - nss-pam-ldapd/common
- Date: Sat, 14 Aug 2010 15:16:12 +0200 (CEST)
Author: arthur
Date: Sat Aug 14 15:16:11 2010
New Revision: 1169
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1169
Log:
also don't expand variables in rest of ${var:+rest} expressions if var is not
set or empty
Modified:
nss-pam-ldapd/common/expr.c
Modified: nss-pam-ldapd/common/expr.c
==============================================================================
--- nss-pam-ldapd/common/expr.c Sat Aug 14 15:00:13 2010 (r1168)
+++ nss-pam-ldapd/common/expr.c Sat Aug 14 15:16:11 2010 (r1169)
@@ -124,10 +124,19 @@
{
/* if variable is set, substitute remainer */
(*ptr)+=2;
- if
(parse_expression(str,ptr,'}',buffer,buflen,expander,expander_arg)==NULL)
- return NULL;
- if ((varvalue==NULL)||(*varvalue=='\0'))
+ if ((varvalue!=NULL)&&(*varvalue!='\0'))
+ {
+ /* value is set, evaluate rest of expression */
+ if
(parse_expression(str,ptr,'}',buffer,buflen,expander,expander_arg)==NULL)
+ return NULL;
+ }
+ else
+ {
+ /* value is not set, skip rest of expression and blank */
+ if
(parse_expression(str,ptr,'}',buffer,buflen,empty_expander,NULL)==NULL)
+ return NULL;
buffer[0]='\0';
+ }
}
else
return NULL;
--
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: r1169 - nss-pam-ldapd/common,
Commits of the nss-pam-ldapd project.