2 * Test required functions are exported from the libnss_winbind.so library
8 /* Symbol list to check */
10 static char *symlist[] = {
11 "_nss_winbind_getgrent_r",
12 "_nss_winbind_endgrent",
13 "_nss_winbind_endpwent",
14 "_nss_winbind_getgrgid_r",
15 "_nss_winbind_getgrnam_r",
16 "_nss_winbind_getpwent_r",
17 "_nss_winbind_getpwnam_r",
18 "_nss_winbind_getpwuid_r",
19 "_nss_winbind_setgrent",
20 "_nss_winbind_setpwent",
26 int main(int argc, char **argv)
34 printf("FAIL: usage '%s sharedlibname'\n", argv[0]);
38 handle = dlopen(argv[1], RTLD_NOW);
41 printf("FAIL: could not dlopen library: %s\n", dlerror());
47 for (i = 0; symlist[i] != NULL; i++) {
48 sym = dlsym(handle, symlist[i]);
50 printf("FAIL: could not resolve symbol '%s': %s\n",
51 symlist[i], dlerror());
54 printf("loaded symbol '%s' ok\n", symlist[i]);