This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nss/24695] nss_db: calling getpwent after endpwent crashes


https://sourceware.org/bugzilla/show_bug.cgi?id=24695

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.29/master branch has been updated by DJ Delorie
<dj@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f1f24cdebafff0c372611801cc8dbe504c3ecfff

commit f1f24cdebafff0c372611801cc8dbe504c3ecfff
Author: DJ Delorie <dj@redhat.com>
Date:   Fri Jun 28 18:30:00 2019 -0500

    nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696]

    nss_db allows for getpwent et al to be called without a set*ent,
    but it only works once.  After the last get*ent a set*ent is
    required to restart, because the end*ent did not properly reset
    the module.  Resetting it to NULL allows for a proper restart.

    If the database doesn't exist, however, end*ent erroniously called
    munmap which set errno.

    The test case runs "makedb" inside the testroot, so needs selinux
    DSOs installed.

    (cherry picked from commit 99135114ba23c3110b7e4e650fabdc5e639746b7)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]