lib: Fix blank line endings
[Samba.git] / testsuite / nsswitch / bigfd.c
blob99e402e0f3381b78fda694c51fd560eeced80606
1 /*
2 * Test maximum number of file descriptors winbind daemon can handle
3 */
5 #include <stdio.h>
6 #include <string.h>
7 #include <pwd.h>
8 #include <sys/types.h>
10 int main(int argc, char **argv)
12 struct passwd *pw;
13 int i;
15 while(1) {
17 /* Start getpwent until we get an NT user. This way we know we
18 have at least opened a connection to the winbind daemon */
20 setpwent();
22 while((pw = getpwent()) != NULL) {
23 if (strchr(pw->pw_name, '/') != NULL) {
24 break;
28 if (pw != NULL) {
29 i++;
30 printf("got pwent handle %d\n", i);
31 } else {
32 printf("winbind daemon not running?\n");
33 exit(1);
36 sleep(1);