Obsolete pow10 functions.
[glibc.git] / nss / nss_files / files-init.c
blob9243d86cc94c1016ce7fb513d672ab2156f9eeb4
1 /* Initialization in nss_files module.
2 Copyright (C) 2011-2017 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifdef USE_NSCD
21 #include <string.h>
22 #include <nscd/nscd.h>
24 #define PWD_FILENAME "/etc/passwd"
25 define_traced_file (pwd, PWD_FILENAME);
27 #define GRP_FILENAME "/etc/group"
28 define_traced_file (grp, GRP_FILENAME);
30 #define HST_FILENAME "/etc/hosts"
31 define_traced_file (hst, HST_FILENAME);
33 #define RESOLV_FILENAME "/etc/resolv.conf"
34 define_traced_file (resolv, RESOLV_FILENAME);
36 #define SERV_FILENAME "/etc/services"
37 define_traced_file (serv, SERV_FILENAME);
39 #define NETGR_FILENAME "/etc/netgroup"
40 define_traced_file (netgr, NETGR_FILENAME);
42 void
43 _nss_files_init (void (*cb) (size_t, struct traced_file *))
45 init_traced_file (&pwd_traced_file.file, PWD_FILENAME, 0);
46 cb (pwddb, &pwd_traced_file.file);
48 init_traced_file (&grp_traced_file.file, GRP_FILENAME, 0);
49 cb (grpdb, &grp_traced_file.file);
51 init_traced_file (&hst_traced_file.file, HST_FILENAME, 0);
52 cb (hstdb, &hst_traced_file.file);
54 init_traced_file (&resolv_traced_file.file, RESOLV_FILENAME, 1);
55 cb (hstdb, &resolv_traced_file.file);
57 init_traced_file (&serv_traced_file.file, SERV_FILENAME, 0);
58 cb (servdb, &serv_traced_file.file);
60 init_traced_file (&netgr_traced_file.file, NETGR_FILENAME, 0);
61 cb (netgrdb, &netgr_traced_file.file);
64 #endif