Page MenuHomeFreeBSD

D4547.id11223.diff
No OneTemporary

D4547.id11223.diff

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;

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 28, 4:20 AM (2 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32250258
Default Alt Text
D4547.id11223.diff (2 KB)

Event Timeline