Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Effectiveness of --disable-dynamic-nss?
- X-seq: zsh-workers 33606
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Effectiveness of --disable-dynamic-nss?
- Date: Thu, 06 Nov 2014 14:55:30 +0000
- In-reply-to: <CAHYJk3TpyqP-RvumAQbzwhd8f=TGTjfP6LATAU_VZ=+9oHp5ng@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <CAHYJk3TpyqP-RvumAQbzwhd8f=TGTjfP6LATAU_VZ=+9oHp5ng@mail.gmail.com>
On Thu, 06 Nov 2014 15:11:59 +0100
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> Someone was mentioning on the #zsh channel that $USERNAME was empty
> when they compiled statically and I vaguely remembered glibc doesn't
> support name lookup statically, which led me to look at
> --disable-dynamic-nss. I noticed it seems to define USE_* stuff when
> the switch is not given for some HAVE_* stuff that pertains to name
> lookup. However, even in the commit where it was introduced, it
> skipped many HAVE_GETPWNAM (for example), and converted others, some
> even within the diff context of other defines that were changed. So my
> two questions are:
>
> Is there a reason they were left alone or does the switch not work?
> If they're all meant to be disabled, why not just have it #undef the
> HAVE_* defines instead of defining new things and changing every user,
> and hope nobody ever introduces new HAVE_* #ifdefs?
>
> And tangentially, is $USERNAME supposed to return anything when
> compiled with this switch given? The function that handles this
> parameter was switched to USE_INITGROUPS but still uses HAVE_GETPWNAM,
> which is confusing to me.
I haven't looked at the history, but from your report this looks like a
case of fairly severe code rot combined with a partial implementation.
I don't think anybody round here is likely to have verified that option
even for basic operation for quite a while.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author