Bug 804103

Summary: nss-pam-ldapd returns empty netgroup when a nonexistent netgroup is requested
Product: Red Hat Enterprise Linux 6 Reporter: Jakub Hrozek <jhrozek>
Component: nss-pam-ldapdAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: arthur, dpal, dspurek, jgalipea, jhrozek, prc
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-18 14:06:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Hrozek 2012-03-16 14:45:44 UTC
Description of problem:
When user requests a netgroup that does not exist, nss-pam-ldapd returns an empty netgroup.

Version-Release number of selected component (if applicable):
0.7.5-15

How reproducible:
always

Steps to Reproduce:
1. getent netgroup -s ldap thereisnosuchnetgroup

  
Actual results:
thereisnosuchgroup
(denoting an empty netgroup)

Expected results:
nothing should be returned

Additional info:
Glibc (and sssd, for that matter), work fine:
getent netgroup -s files thereisnosuchnetgroup
<blank>

Comment 2 Arthur de Jong 2012-03-16 15:28:47 UTC
This is a known issue that is rather difficult to address. It stems from the fact that the NSS interface for netgroups is a bit weird. The request to nslcd is also a bit different from the rest.

The nslcd protocol currently cannot distinguish between an empty netgroup and a non-existing one. For this to be possible to the protocol needs to be changed.

That being said I don't think there should be many practical differences between an empty netgroup and a non-existing one.

Comment 3 Jakub Hrozek 2012-03-16 15:44:11 UTC
(In reply to comment #2)
> This is a known issue that is rather difficult to address. It stems from the
> fact that the NSS interface for netgroups is a bit weird. The request to nslcd
> is also a bit different from the rest.
> 
> The nslcd protocol currently cannot distinguish between an empty netgroup and a
> non-existing one. For this to be possible to the protocol needs to be changed.
> 
> That being said I don't think there should be many practical differences
> between an empty netgroup and a non-existing one.

Thank you for chiming in, Arthur.

It sounds like a fix would be invasive, moreover this issue has only been found during testing, it hasn't been reported in production.

I'd still prefer to keep this bugzilla open for tracking purposes.

Comment 4 RHEL Program Management 2012-07-10 08:16:20 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2012-07-11 01:43:16 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 6 RHEL Program Management 2012-07-18 14:06:16 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 7 Arthur de Jong 2013-04-05 14:40:54 UTC
FYI: the required protocol change has been made in the 0.9.0 release because backwards-incompatible changes were required anyway. The setnetgrent() function should now return an error for non-existing netgroups.

Note that 0.9.0 is a development release and not recommended for production.