37a8428 nss: initialize nss_enum_index in nss_setnetgrent()

1 file Authored by sbose 6 years ago, Committed by jhrozek 6 years ago,
    nss: initialize nss_enum_index in nss_setnetgrent()
    
    setnetgrent() is the first call when looking up a netgroup and sets the
    netgroup name for upcoming getnetgrent() and endnetgrent() calls.
    Currently the state is reset by calling endnetgrent() but it would be
    more robust to unconditionally reset the state in setnetgrent() as well
    in case calling endnetgrent() was forgotten.
    
    Related to https://pagure.io/SSSD/sssd/issue/3679
    
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    
        
file modified
+3 -0