8 if conf
.CHECK_NSS_WRAPPER():
9 conf
.DEFINE('USING_SYSTEM_NSS_WRAPPER', 1)
10 libnss_wrapper_so_path
= 'libnss_wrapper.so'
12 conf
.CHECK_HEADERS('nss.h')
14 if conf
.CONFIG_SET("HAVE___THREAD"):
15 conf
.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1)
17 # check HAVE_ATTRIBUTE_PRINTF_FORMAT
19 void log_fn(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
25 'HAVE_ATTRIBUTE_PRINTF_FORMAT',
28 msg
='Checking for printf format validation support')
30 conf
.CHECK_FUNCS('gethostbyaddr_r gethostbyname_r')
32 conf
.CHECK_FUNCS('__posix_getpwnam_r __posix_getpwuid_r')
33 conf
.CHECK_FUNCS('__posix_getgrgid_r __posix_getgrnam_r')
35 conf
.CHECK_FUNCS_IN('nsl',
41 conf
.CHECK_C_PROTOTYPE('getpwent_r',
42 'struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)',
43 define
='HAVE_SOLARIS_GETPWENT_R', headers
='unistd.h pwd.h')
44 conf
.CHECK_C_PROTOTYPE('getpwnam_r',
45 'int getpwnam_r(const char *name, struct passwd *pwd, char *buf, int buflen, struct passwd **ppwd)',
46 define
='HAVE_SOLARIS_GETPWNAM_R', headers
='unistd.h pwd.h')
47 conf
.CHECK_C_PROTOTYPE('getpwuid_r',
48 'int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, int buflen, struct passwd **ppwd)',
49 define
='HAVE_SOLARIS_GETPWUID_R', headers
='unistd.h pwd.h')
50 conf
.CHECK_C_PROTOTYPE('getgrent_r',
51 'struct group *getgrent_r(struct group *src, char *buf, int buflen)',
52 define
='HAVE_SOLARIS_GETGRENT_R', headers
='unistd.h grp.h')
53 conf
.CHECK_C_PROTOTYPE('getgrnam_r',
54 'int getgrnam_r(const char *name, struct group *grp, char *buf, int buflen, struct group **pgrp)',
55 define
='HAVE_SOLARIS_GETGRNAM_R', headers
='unistd.h grp.h')
56 conf
.CHECK_C_PROTOTYPE('getgrgid_r',
57 'int getgrgid_r(gid_t gid, struct group *grp, char *buf, int buflen, struct group **pgrp)',
58 define
='HAVE_SOLARIS_GETGRGID_R', headers
='unistd.h grp.h')
59 conf
.CHECK_C_PROTOTYPE('sethostent',
60 'int sethostent(int stayopen)',
61 define
='HAVE_SOLARIS_SETHOSTENT', headers
='unistd.h netdb.h')
62 conf
.CHECK_C_PROTOTYPE('endhostent',
63 'int endhostent(void)',
64 define
='HAVE_SOLARIS_ENDHOSTENT', headers
='unistd.h netdb.h')
65 conf
.CHECK_C_PROTOTYPE('gethostname',
66 'int gethostname(char *name, int len)',
67 define
='HAVE_SOLARIS_GETHOSTNAME', headers
='unistd.h netdb.h')
68 conf
.CHECK_C_PROTOTYPE('setgrent',
70 define
='HAVE_BSD_SETGRENT', headers
='unistd.h grp.h')
71 conf
.CHECK_C_PROTOTYPE('getnameinfo',
72 'int getnameinfo (const struct sockaddr *sa, socklen_t salen, char *host, socklen_t __hostlen, char *serv, socklen_t servlen, int flags)',
73 define
='HAVE_LINUX_GETNAMEINFO', headers
='unistd.h netdb.h')
74 conf
.CHECK_C_PROTOTYPE('getnameinfo',
75 'int getnameinfo (const struct sockaddr *sa, socklen_t salen, char *host, socklen_t __hostlen, char *serv, socklen_t servlen, unsigned int flags)',
76 define
='HAVE_LINUX_GETNAMEINFO_UNSIGNED', headers
='unistd.h netdb.h')
78 # Create full path to nss_wrapper
79 blddir
= os
.path
.realpath(conf
.bldnode
.abspath())
80 libnss_wrapper_so_path
= blddir
+ '/default/third_party/nss_wrapper/libnss-wrapper.so'
82 conf
.DEFINE('LIBNSS_WRAPPER_SO_PATH', libnss_wrapper_so_path
)
83 conf
.DEFINE('NSS_WRAPPER', 1)
86 if bld
.CONFIG_SET("HAVE_NSS_H") and not bld
.CONFIG_SET("USING_SYSTEM_NSS_WRAPPER"):
87 # We need to do it this way or the library wont work.
88 # Using private_library=True will add symbol version which
90 bld
.SAMBA_LIBRARY('nss_wrapper',
91 source
='nss_wrapper.c',
94 realname
='libnss-wrapper.so')