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",
21 "_nss_winbind_initgroups",
27 int main(int argc, char **argv)
35 printf("FAIL: usage '%s sharedlibname'\n", argv[0]);
39 handle = dlopen(argv[1], RTLD_NOW);
42 printf("FAIL: could not dlopen library: %s\n", dlerror());
48 for (i = 0; symlist[i] != NULL; i++) {
49 sym = dlsym(handle, symlist[i]);
51 printf("FAIL: could not resolve symbol '%s': %s\n",
52 symlist[i], dlerror());
55 printf("loaded symbol '%s' ok\n", symlist[i]);