diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:16:25 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:16:25 +0000 |
commit | 8d59503b977070aaa4e504e8d6dcb7da3711893e (patch) | |
tree | 8272c9c2cce43afa4fe4d8d92c269a6435242661 /grp/initgroups.c | |
parent | 76a7dc16fab8853ef9230447fa98c70a3619dc6d (diff) | |
parent | bcea9593527d90b9f9ff3817e3fbf0fbc3d01fa7 (diff) |
Merge commit 'refs/top-bases/t/gsync-libc-merge' into t/gsync-libc-merge
Diffstat (limited to 'grp/initgroups.c')
-rw-r--r-- | grp/initgroups.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/grp/initgroups.c b/grp/initgroups.c index 3242aee04e..f056fbf5aa 100644 --- a/grp/initgroups.c +++ b/grp/initgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1991-2016 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1991-2018 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 @@ -26,23 +26,22 @@ #include <sys/types.h> #include <nsswitch.h> #include <scratch_buffer.h> +#include <config.h> #include "../nscd/nscd-client.h" #include "../nscd/nscd_proto.h" +#ifdef LINK_OBSOLETE_NSL +# define DEFAULT_CONFIG "compat [NOTFOUND=return] files" +#else +# define DEFAULT_CONFIG "files" +#endif /* Type of the lookup function. */ typedef enum nss_status (*initgroups_dyn_function) (const char *, gid_t, long int *, long int *, gid_t **, long int, int *); -/* The lookup function for the first entry of this service. */ -extern int __nss_group_lookup (service_user **nip, const char *name, - void **fctp); -extern void *__nss_lookup_function (service_user *ni, const char *fct_name); - -extern service_user *__nss_group_database attribute_hidden; -service_user *__nss_initgroups_database; static bool use_initgroups_entry; @@ -84,7 +83,7 @@ internal_getgrouplist (const char *user, gid_t group, long int *size, &__nss_initgroups_database) < 0) { if (__nss_group_database == NULL) - no_more = __nss_database_lookup ("group", NULL, "compat files", + no_more = __nss_database_lookup ("group", NULL, DEFAULT_CONFIG, &__nss_group_database); __nss_initgroups_database = __nss_group_database; |