aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap/ldapclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ypldap/ldapclient.c')
-rw-r--r--usr.sbin/ypldap/ldapclient.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ypldap/ldapclient.c b/usr.sbin/ypldap/ldapclient.c
index 897ceb2b090d..ff4abe336b4d 100644
--- a/usr.sbin/ypldap/ldapclient.c
+++ b/usr.sbin/ypldap/ldapclient.c
@@ -172,7 +172,7 @@ client_dispatch_dns(int fd, short events, void *p)
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 @@ client_dispatch_parent(int fd, short events, void *p)
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 @@ ldapclient(int pipe_main2client[2])
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");