Index: usr.sbin/ypldap/ldapclient.c =================================================================== --- usr.sbin/ypldap/ldapclient.c +++ usr.sbin/ypldap/ldapclient.c @@ -172,7 +172,7 @@ fatalx("unknown event"); if (events & EV_READ) { - if ((n = imsg_read(ibuf)) == -1) + if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) fatal("imsg_read error"); if (n == 0) shut = 1; @@ -275,7 +275,7 @@ fatalx("unknown event"); if (events & EV_READ) { - if ((n = imsg_read(ibuf)) == -1) + if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) fatal("imsg_read error"); if (n == 0) shut = 1; @@ -377,8 +377,10 @@ bzero(&env, sizeof(env)); TAILQ_INIT(&env.sc_idms); - if ((pw = getpwnam(YPLDAP_USER)) == NULL) + if ((pw = getpwnam(YPLDAP_USER)) == NULL) { + printf("ldapclient.c error\n"); fatal("getpwnam"); + } if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_dns) == -1) fatal("socketpair"); @@ -386,12 +388,14 @@ close(pipe_dns[1]); #ifndef DEBUG +/* if (chroot(pw->pw_dir) == -1) fatal("chroot"); if (chdir("/") == -1) fatal("chdir"); +*/ #else -#warning disabling chrooting in DEBUG mode +//#warning disabling chrooting in DEBUG mode #endif setproctitle("ldap client"); ypldap_process = PROC_CLIENT; @@ -402,7 +406,7 @@ setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) fatal("cannot drop privileges"); #else -#warning disabling privilege revocation in DEBUG mode +//#warning disabling privilege revocation in DEBUG mode #endif event_init(); Index: usr.sbin/ypldap/ypldap.c =================================================================== --- usr.sbin/ypldap/ypldap.c +++ usr.sbin/ypldap/ypldap.c @@ -361,7 +361,7 @@ fatalx("unknown event"); if (events & EV_READ) { - if ((n = imsg_read(ibuf)) == -1) + if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) fatal("imsg_read error"); if (n == 0) shut = 1; Index: usr.sbin/ypldap/ypldap_dns.c =================================================================== --- usr.sbin/ypldap/ypldap_dns.c +++ usr.sbin/ypldap/ypldap_dns.c @@ -140,7 +140,7 @@ fatalx("unknown event"); if (events & EV_READ) { - if ((n = imsg_read(ibuf)) == -1) + if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) fatal("imsg_read error"); if (n == 0) shut = 1;