[385] in Hesiod

home help back first fref pref prev next nref lref last post

Re: glibc-2.1 nss_hesiod.so fails UID/GID lookups

daemon@ATHENA.MIT.EDU (Nalin Dahyabhai)
Mon May 10 15:41:27 1999

Date: Mon, 10 May 1999 15:40:18 -0400 (EDT)
From: Nalin Dahyabhai <nalin@thermo.stat.ncsu.edu>
Reply-To: Nalin Dahyabhai <nalin.dahyabhai@pobox.com>
To: Troy Benjegerdes <hozer@drgw.net>
Cc: hesiod@MIT.EDU, Mark Kettenis <kettenis@delius.kettenis.nl>
In-Reply-To: <Pine.LNX.4.04.9905101240250.7827-100000@narn.local.drgw.net>
Message-Id: <Pine.LNX.4.10.9905101519270.17152-200000@thermo.stat.ncsu.edu>
Mime-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="26757950-707116088-926365218=:17152"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--26757950-707116088-926365218=:17152
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 10 May 1999, Troy Benjegerdes wrote:

> I followed the directions in README.hesiod that came with glibc-2.1.1, and
> set up a nameserver, etc. However, UID and GID lookups don't work.
> 
> This occurs on both PPC and Intel systems. (The intel box is running
> Red Hat 6.0).
> 
> 'getpwnam' works fine, but 'getpwuid' does not. I modified 'whoami.c' to
> test this out, and have done a little bit GDB tracing in glibc, but I have
> decided it would be more productive to ask someone than to try and figure
> it out myself.
> 
> (getpwnam generates the correct DNS lookup, while getpwuid generates
> nothing, as far as I can tell)

I've been hunting this one down on and off for the last few days, and it
looks like the hesiod/Versions file is the culprit.  It doesn't declare
symbol versions for _nss_hesiod_getpwuid_r and _nss_hesiod_getgrgid_r, so
they are compiled with local scope.  When the libc core tries to get the
address of the symbols after demand-loading the shared object, it fails
and the call never gets made.

Try the attached patch and see if it helps.  I've opened a bug in Red
Hat's bug tracking system about it, but I can't get to ftp.gnu.org or
prep.ai.mit.edu to check if the problem is in the latest glibc release, or
even if there is a newer one.

Nalin

--26757950-707116088-926365218=:17152
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="glibc-990416-nss_hesiod.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.9905101540180.17152@thermo.stat.ncsu.edu>
Content-Description: patch against glibc 2.1 (990416)
Content-Disposition: attachment; filename="glibc-990416-nss_hesiod.patch"

VGhpcyBwYXRjaCBmaXhlcyBzeW1ib2wgZGVjbGFyYXRpb25zIHRoYXQgZnVi
YXIgdGhlIG5zc19oZXNpb2QgbW9kdWxlLg0KDQpkaWZmIC11TnIgZ2xpYmMv
aGVzaW9kL1ZlcnNpb25zIGdsaWJjLWhlc2lvZC9oZXNpb2QvVmVyc2lvbnMN
Ci0tLSBnbGliYy9oZXNpb2QvVmVyc2lvbnMJVGh1IEp1bCAgOSAxNDo0Njoy
NyAxOTk4DQorKysgZ2xpYmMtaGVzaW9kL2hlc2lvZC9WZXJzaW9ucwlNb24g
TWF5IDEwIDE0OjAyOjEzIDE5OTkNCkBAIC0xLDkgKzEsOSBAQA0KIGxpYm5z
c19oZXNpb2Qgew0KICAgR0xJQkNfMi4xIHsNCiAgICAgX25zc19oZXNpb2Rf
c2V0cHdlbnQ7IF9uc3NfaGVzaW9kX2VuZHB3ZW50Ow0KLSAgICBfbnNzX2hl
c2lvZF9nZXRwd25hbV9yOyBfbnNzX2hlc2lvZF9nZXRwd3VpZDsNCisgICAg
X25zc19oZXNpb2RfZ2V0cHduYW1fcjsgX25zc19oZXNpb2RfZ2V0cHd1aWRf
cjsNCiAgICAgX25zc19oZXNpb2Rfc2V0Z3JlbnQ7IF9uc3NfaGVzaW9kX2Vu
ZGdyZW50Ow0KLSAgICBfbnNzX2hlc2lvZF9nZXRncm5hbV9yOyBfbnNzX2hl
c2lvZF9nZXRncmdpZDsNCisgICAgX25zc19oZXNpb2RfZ2V0Z3JuYW1fcjsg
X25zc19oZXNpb2RfZ2V0Z3JnaWRfcjsNCiAgICAgX25zc19oZXNpb2Rfc2V0
c2VydmVudDsgX25zc19oZXNpb2RfZW5kc2VydmVudDsNCiAgICAgX25zc19o
ZXNpb2RfZ2V0c2VydmJ5bmFtZV9yOw0KICAgfQ0K
--26757950-707116088-926365218=:17152--

home help back first fref pref prev next nref lref last post