zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Effectiveness of --disable-dynamic-nss?
Date: Thu, 6 Nov 2014 15:11:59 +0100	[thread overview]
Message-ID: <CAHYJk3TpyqP-RvumAQbzwhd8f=TGTjfP6LATAU_VZ=+9oHp5ng@mail.gmail.com> (raw)

Hi,

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.

-- 
Mikael Magnusson


             reply	other threads:[~2014-11-06 14:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 14:11 Mikael Magnusson [this message]
2014-11-06 14:55 ` Peter Stephenson
2014-11-06 16:17 ` Bart Schaefer
2014-11-06 23:27   ` Mikael Magnusson
2014-11-08 17:11   ` Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHYJk3TpyqP-RvumAQbzwhd8f=TGTjfP6LATAU_VZ=+9oHp5ng@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).