diff options
author | DJ Delorie <dj@redhat.com> | 2020-12-09 21:46:30 -0500 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2020-12-14 12:19:43 -0500 |
commit | d2e929a907914e233d001d1dd5e3143e84fa69e0 (patch) | |
tree | e0fc726fa628727fee23a86a6053f9107502c84b /grp/tst-initgroups2.c | |
parent | 2ee7711bdd7de9dd30073b223ce29d5cd50320f6 (diff) | |
download | glibc-d2e929a907914e233d001d1dd5e3143e84fa69e0.zip glibc-d2e929a907914e233d001d1dd5e3143e84fa69e0.tar.gz glibc-d2e929a907914e233d001d1dd5e3143e84fa69e0.tar.bz2 |
nsswitch: handle missing actions properly
Some internal functions need to know if a database has a nonzero
list of actions; success getting the database does not guarantee
that. Add checks for such as needed.
Skip the ":" in each nsswitch.conf line so as not to add a dummy
action libnss_:.so
See also https://bugzilla.redhat.com/show_bug.cgi?id=1906066
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'grp/tst-initgroups2.c')
-rw-r--r-- | grp/tst-initgroups2.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/grp/tst-initgroups2.c b/grp/tst-initgroups2.c new file mode 100644 index 0000000..776e560 --- /dev/null +++ b/grp/tst-initgroups2.c @@ -0,0 +1,21 @@ +/* Test that initgroups works. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include "tst-initgroups1.c" + +/* This version uses the initgroups built in to the files module. */ |