This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
getpwent, libnss_compat and netgroups
- From: "james bardin" <jbardin at bu dot edu>
- To: libc-help at sourceware dot org
- Date: Fri, 24 Oct 2008 13:28:18 -0400
- Subject: getpwent, libnss_compat and netgroups
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition:x-google-sender-auth; bh=ljcyTnnADGSSUrnXvaEKSNM3RyftK/y40si5S6VZ9e8=; b=RCOnUxa147AK68qbT70P7NKcQDEE+HXOp3QMvgBOu0vFj++IdPSd5R5DPi0xz0XAfL qAqkT5BgdSeVWV4UP3TOzyY3yVlOrJIBm4tTOF076Ys8ODWnG0Le7Pfl25XIJOQ/CqF6 Or3mCr47YJyjydf3aB1zvR9xkYawdyMAU8wdQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=hQTHv2jgh1CHfB8GOu9R4k7g31BayUBhKKUnpmrBSPiErmy2wLLLE+2kgXUu2kAIQR /SO4qzjejKgN3UGeFRbuDZmBiamwOGaOCP68m+FJ+uUJEHS1QE242oStToaxsW/wCITR 3XPUsdgK/DX9ALJnCw8wS4UtTgBodnFDjZzGA=
Hello,
I'm not sure if this is a bug, a feature request, or a "that's the way
it should work", so I'm posting here first.
This is using compat mode in nsswitch.conf, and an NIS backend.
The issue our programmer asked me about, is that when using a wildcard
netgroup, getpwent doesn't enumerate the users in that group entry.
The setup would be like so:
The netgroup could be "usergroup (-,,)".
The line "+@usergroup::::::/bin/bash" is in /etc/passwd.
Overall, the system works as expected. Searching the group with yp
returns (-,,). I also confirmed that innetgr() returns true for any
nis user with the netgroup "usersgroup".
But, our dev wanted to only use getpwent to lookup users. On other
*nixes, getpwent will enumerate through a wildcard group, while glibc
returns nothing for that line. Other explicitly defined netgroups are
listed by getpwent.
Thanks
-jim