Age | Commit message (Collapse) | Author | Files | Lines |
|
The majority of grp routines are entry points for nss functionality.
This commit removes the 'grp' subdirectory and moves all nss-relevant
functionality and all tests to 'nss', and the 'setgroups' stub into
'posix' (alongside the 'getgroups' stub). References to grp/ are
accordingly changed. In addition, compat-initgroups.c, a fallback
implementation of initgroups is renamed to initgroups-fallback.c so that
the build system does not confuse it for nss_compat/compat-initgroups.c.
Build time improves very slightly; e.g. down from an average of 45.5s to
44.5s on an 8-thread mobile x86_64 CPU.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
I used these shell commands:
../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")
and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 7061 files FOO.
I then removed trailing white space from math/tgmath.h,
support/tst-support-open-dev-null-range.c, and
sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following
obscure pre-commit check failure diagnostics from Savannah. I don't
know why I run into these diagnostics whereas others evidently do not.
remote: *** 912-#endif
remote: *** 913:
remote: *** 914-
remote: *** error: lines with trailing whitespace found
...
remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
|
|
I used these shell commands:
../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")
and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 6694 files FOO.
I then removed trailing white space from benchtests/bench-pthread-locks.c
and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this
diagnostic from Savannah:
remote: *** pre-commit check failed ...
remote: *** error: lines with trailing whitespace found
remote: error: hook declined to update refs/heads/master
|
|
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>
|
|
Stitch new ABI and types throughout all NSS callers.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
|
this means that *always* libnsl is only built as shared library for
backward compatibility and the NSS modules libnss_nis and libnss_nisplus
are not built at all, libnsl's headers aren't installed.
This compatibility is kept only for architectures and ABIs that have
been added in or before version 2.28.
Replacement implementations based on TIRPC, which additionally support
IPv6, are available from <https://github.com/thkukuk/>.
This change does not affect libnss_compat which does not depended
on libnsl since 2.27 and thus can be used without NIS.
libnsl code depends on Sun RPC, e.g. on --enable-obsolete-rpc (installed
libnsl headers use installed Sun RPC headers), which will be removed in
the following commit.
|
|
|
|
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
|
|
The function uses the internal service_user type, so it is not
really usable from the outside of glibc. Rename the function
to __nss_database_lookup2 for internal use, and change
__nss_database_lookup to always indicate failure to the caller.
__nss_next already was a compatibility symbol. The new
implementation always fails and no longer calls __nss_next2.
unscd, the alternative nscd implementation, does not use
__nss_database_lookup, so it is not affected by this change.
|
|
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
|
|
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
* grp/initgroups.c: Include config.h.
(DEFAULT_CONFIG): New macro.
(internal_getgrouplist): Use DEFAULT_CONFIG.
* nscd/initgrcache.c (addinitgroupsX): Likewise.
* nss/nsswitch.c (__nss_disable_nscd): Likewise.
(DEFAULT_DEFCONFIG): New macro.
(__nss_database_lookup): Use DEFAULT_DEFCONFIG.
* nss/grp-lookup.c: Include config.h
(DEFAULT_CONFIG): Set definition based on LINK_OBSOLETE_NSL.
* nss/pwd-lookup.c (DEFAULT_CONFIG): Likewise.
* nss/spwd-lookup.c (DEFAULT_CONFIG): Likewise.
* manual/nss.texi: Update default values section.
|
|
Mark internal nss symbols with attribute_hidden to allow direct access
within libc.so and libc.a without using GOT nor PLT.
Tested on x86-64 with and without --disable-nscd.
[BZ #18822]
* grp/initgroups.c (__nss_group_database): Removed.
(__nss_initgroups_database): Likewise.
* nscd/gai.c (__nss_hosts_database): Likewise.
* nss/XXX-lookup.c (DATABASE_NAME_SYMBOL): Likewise.
* posix/tst-rfc3484-2.c (__nss_hosts_database): Likewise.
* posix/tst-rfc3484-3.c (__nss_hosts_database): Likewise.
* posix/tst-rfc3484.c (__nss_hosts_database): Likewise.
* sysdeps/posix/getaddrinfo.c (__nss_hosts_database): Likewise.
* nss/getXXent.c (INTERNAL (REENTRANT_GETNAME)): Add
attribute_hidden.
* nss/nsswitch.c (__nss_database_custom): Define only if
USE_NSCD is defined.
(__nss_configure_lookup): Use __nss_database_custom only if
USE_NSCD is defined.
* nss/nsswitch.h (__nss_database_custom): Declare only if
USE_NSCD is defined. Add attribute_hidden.
(__nss_setent): Add attribute_hidden.
(__nss_endent): Likewise.
(__nss_getent_r): Likewise.
(__nss_getent): Likewise.
(DEFINE_DATABASE): Declare __nss_##arg##_database.
|
|
Commit 384ca551743318bd9c9e24a496d6397f2e3f2a49 from 2007 added this to
nss/XXX-lookup.c:
+#ifndef NO_COMPAT
+int
+internal_function attribute_compat_text_section
+DB_COMPAT_FCT (service_user **ni, const char *fct_name, void **fctp)
+{
+ return DB_LOOKUP_FCT (ni, fct_name, NULL, fctp);
+}
+#endif
That is, it adds a pseudo-compat function with an internal_function
attribute. The function it was supposed to replace did not have the
attribute:
extern int DB_LOOKUP_FCT (service_user **ni, const char *fct_name,
- void **fctp) internal_function;
+ const char *fct2_name, void **fctp)
+ internal_function;
This changed the calling convention on i386 for the following
functions in the public ABI:
__nss_passwd_lookup
__nss_group_lookup
__nss_hosts_lookup
This commit replaces the functions with always-failing stubs,
with true compat symbols. Due to a happy accident, the calling
convention of the stub is identical for the internal_function
and non-internal_function case on i386.
In addition, this commit auto-generates the __nss_*_lookup2
function declarations as part of <nsswitch.h>.
|
|
|
|
|
|
grp/compat-initgroups.c is included from nscd/initgrcache.c, which is
why the #include directive has to be added there as well.
|
|
|
|
|
|
|
|
|
|
|
|
When glibc is built with --enable-static-nss, the warning that
using NSS symbols requires the nss shared objects to be present
is no longer true, as those symbols are built into libc. Suppress
the warning for those symbols by providing a new macro
(nss_interface_function) for the NSS functions that is defined as
static_link_warning in the normal case, and empty for static NSS.
|
|
|
|
|
|
|
|
Together with a previous patch which introduced the initgroups
entry in nsswitch.conf this patch allows more customization of
the lookups for initgroups/getgrouplist. Nothing changes if
the groups entry in nsswitch.conf is used. If the initgroups entry
is used instead the code now doesn't automatically continue looking
for more entries aftedr a successful lookup. Instead the normal
rules are followed which do specify that by default no more
service is consulted. This can be overwritten with
[SUCCESS=continue]
appropriately placed in the line.
|
|
|
|
While at it fix interaction between __nss_configure_lookup and nscd.
Otherwise the test fails if nscd is runnung.
|
|
abort if there is no initgroups_dyn function.
|
|
* sysvipc/sys/msg.h: Change return value to ssize_t.
* sysdeps/unix/sysv/linux/msgrcv.c: Likewise.
|
|
element on NEWGROUPS.
|
|
test introduced in patch for bz #661.
(getgrouplist): Simplify code a bit.
|
|
2005-03-19 Bruno Haible <bruno@clisp.org>
* intl/dcigettext.c (struct known_translation_t): Change type of
domainname field to 'const char *'.
(DCIGETTEXT): Remove const-cast.
[BZ #661]
* grp/initgroups.c (internal_getgrouplist): Check if we have
enough space before adding the primary group to the list.
|
|
|
|
|
|
2004-10-05 Ulrich Drepper <drepper@redhat.com>
* grp/initgroups.c: Remove duplicate group IDs.
* grp/compat-initgroups.c: Likewise.
* nscd/initgrcache.c: Likewise.
|
|
* grp/initgroups.c: Move compat_call implementation...
* grp/compat-initgroups.c: ...to here. New file.
* grp/Makefile (distribute): Add compat-initgroups.c.
(CFLAGS-initgroups.c): Add -DUSE_NSCD=1.
* mscd/initgrcache.c: New file.
* nscd/nscd_initgroups.c: New file.
* nscd/Makefile (routines): Add nscd_initgroups.
(nscd-modules): Add initgrcache.
* nscd/cache.c (prune_cache): Add support for INITGROUPS entries.
* nscd/connections.c: Handle INITGROUPS requests.
* nscd/nscd-client.h: Define INITGROUPS, initgr_response_header.
Add initgrdata element to struct datahead. Fix typo in comment.
* nscd/nscd_proto.h: Declare __nscd_getgrouplist. Fix parameter
type in __nscd_getgrgrid_r.
* nscd/selinux.c (perms): Add INITGROUPS entry.
* nscd/nscd_getai.c: No need to include <sys/mman.h>.
* sunrpc/get_myaddr.c (get_myaddress): Account for interfaces without
assigned addresses.
* sunrpc/pmap_clnt.c (__get_myaddress): Likewise.
* sunrpc/pmap_rmt.c (getbroadcastnets): Likewise.
* sunrpc/clnt_udp.c (is_network_up): Likewise.
|
|
2004-03-30 Ulrich Drepper <drepper@redhat.com>
* nis/nss_nis/nis-initgroups.c: Implement getting the information
from the netid.byname map if the system administrator allows this.
* grp/initgroups.c (initgroups): Limit the initial allocation to 64
entries to not allocate too much on systems with really high limits.
|
|
2003-06-16 Thorsten Kukuk <kukuk@suse.de>
* include/libc-symbols.h: Add static_link_warning macro.
* grp/initgroups.c: Print linker warning if this function
is called in a static linked binary.
* nss/getXXbyYY.c: Likewise.
* nss/getXXbyYY_r.c: Likewise.
* nss/getXXent.c: Likewise.
* nss/getXXent_r.c: Likewise.
* sysdeps/posix/getaddrinfo.c: Likewise.
2003-06-16 Bruno Haible <bruno@clisp.org>
* iconvdata/gconv-modules (ISO-8859-15): Add aliases ISO_8859-15,
LATIN-9.
(ISO-8859-16): Add aliases ISO_8859-16:2001, ISO_8859-16.
(IBM1047): Add alias IBM-1047.
(GBK): Add aliases MS936, WINDOWS-936.
2003-06-16 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/xstatconv.c (__xstat_conv): Define even if
defined __ASSUME_STAT64_SYSCALL && defined XSTAT_IS_XSTAT64.
(__xstat64_conv): Change xstat_conv to __xstat_conv.
Reported by Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>.
|
|
2003-04-23 Ulrich Drepper <drepper@redhat.com>
* grp/initgroups.c (getgrouplist): Don't copy too much into the
user buffer if more groups are found than fit into it.
* nis/nss_nis/nis-initgroups.c (_nss_nis_initgroups_dyn): Use
extend_alloca.
|
|
* grp/initgroups.c (__nss_group_data): Declare as hidden.
|
|
* grp/initgroups.c (internal_getgrouplist): Likewise.
|
|
2001-07-06 Paul Eggert <eggert@twinsun.com>
* manual/argp.texi: Remove ignored LGPL copyright notice; it's
not appropriate for documentation anyway.
* manual/libc-texinfo.sh: "Library General Public License" ->
"Lesser General Public License".
2001-07-06 Andreas Jaeger <aj@suse.de>
* All files under GPL/LGPL version 2: Place under LGPL version
2.1.
|
|
2001-06-07 Mark Kettenis <kettenis@gnu.org>
* grp/initgroups.c (initgroups): Factor out re-usable code into...
(internal_getgrouplist): ... new function.
(getgrouplist): New function.
* grp/grp.h (getgrouplist): New prototype.
* grp/Versions [2.2.4]: Add getgrouplist.
2001-06-16 Ulrich Drepper <drepper@redhat.com>
* inet/netinet/ip6.h: Fix comments in ip6_hdr.
Patch by Pekka Savola <pekkas@netcore.fi>.
|
|
instead of the constant NGROUPS_MAX. That way, the limit can be
raised in the kernel configuration without having to recompile libc.
* sysdeps/posix/euidaccess.c: Don't #include <limits.h> or try to
define NGROUPS_MAX; we don't use it here.
|
|
* grp/initgroups.c (initgroups): Deallocate groups array.
Reported by jani.raiha@sonera.com [PR libc/1868].
|