Re: Setting a default value with an alternative attribute
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
Re: Setting a default value with an alternative attribute
- From: Iain Morgan <Iain.Morgan [at] nasa.gov>
- To: Arthur de Jong <arthur [at] arthurdejong.org>
- Cc: "nss-pam-ldapd-users [at] lists.arthurdejong.org" <nss-pam-ldapd-users [at] lists.arthurdejong.org>
- Subject: Re: Setting a default value with an alternative attribute
- Date: Fri, 19 Oct 2012 12:15:23 -0700
Thanks for the patch. I tested it against 0.7.5 since that was the
vednor-provided version which I have been testing, and the patch worked
fine.
--
Iain
On Wed, Oct 17, 2012 at 14:07:27 -0500, Arthur de Jong wrote:
> On Tue, 2012-10-16 at 16:20 -0700, Iain Morgan wrote:
> > I have a few client systems which require special handling of the
> > homeDirectory attribute. Most user accounts will actually share the
> > same home directory, but there will be a few exceptions to this rule.
> >
> > I had planned to create a variant of the homeDirectory attribute to
> > handle the exceptoins, homeDirectory;foo, and let nslcd supply a
> > default value for the majority of the accounts.
> >
> > I had hoped that something like this would work:
> >
> > map passwd homeDirectory "${homeDirectory;foo:-/home/something}"
> >
> > but this results in blank values for the home directories.
>
> The expressions currently don't support attribute options but the
> attached patch should fix that that. Can you test it?
>
> > PS: Kudos on the clean design of nslcd. In particular, the syntax used
> > in the config file is much better than I have seen in other clients.
>
> Thanks.
>
> --
> -- arthur - arthur@arthurdejong.org - http://arthurdejong.org --
> Index: common/expr.c
> ===================================================================
> --- common/expr.c (revision 1802)
> +++ common/expr.c (working copy)
> @@ -51,7 +51,7 @@
> /* look for an alpha+alphanumeric* string */
> if (!my_isalpha(str[*ptr]))
> return NULL;
> - while (my_isalphanum(str[*ptr]))
> + while (my_isalphanum(str[*ptr])||(str[*ptr]==';'))
> {
> if ((size_t)i>=buflen)
> return NULL;
> --
> To unsubscribe send an email to
> nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
> http://lists.arthurdejong.org/nss-pam-ldapd-users/
--
Iain Morgan
--
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-users/