summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/radiusd/radiusd_bsdauth.c5
-rw-r--r--usr.sbin/radiusd/radiusd_module.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/radiusd/radiusd_bsdauth.c b/usr.sbin/radiusd/radiusd_bsdauth.c
index 02bf77016e8..fe85ac514a9 100644
--- a/usr.sbin/radiusd/radiusd_bsdauth.c
+++ b/usr.sbin/radiusd/radiusd_bsdauth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radiusd_bsdauth.c,v 1.6 2015/10/19 22:07:37 yasuoka Exp $ */
+/* $OpenBSD: radiusd_bsdauth.c,v 1.7 2015/12/05 13:22:32 claudio Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -24,6 +24,7 @@
#include <bsd_auth.h>
#include <err.h>
+#include <errno.h>
#include <grp.h>
#include <imsg.h>
#include <login_cap.h>
@@ -99,7 +100,7 @@ main(int argc, char *argv[])
err(EXIT_FAILURE, "pledge");
for (;;) {
- if ((n = imsg_read(&ibuf)) <= 0)
+ if ((n = imsg_read(&ibuf)) <= 0 && errno != EAGAIN)
break;
for (;;) {
if ((n = imsg_get(&ibuf, &imsg)) == -1)
diff --git a/usr.sbin/radiusd/radiusd_module.c b/usr.sbin/radiusd/radiusd_module.c
index d3889583e6f..a7968a9337a 100644
--- a/usr.sbin/radiusd/radiusd_module.c
+++ b/usr.sbin/radiusd/radiusd_module.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radiusd_module.c,v 1.8 2015/12/01 18:21:24 mmcc Exp $ */
+/* $OpenBSD: radiusd_module.c,v 1.9 2015/12/05 13:22:32 claudio Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -300,7 +300,7 @@ module_recv_imsg(struct module_base *base)
ssize_t n;
struct imsg imsg;
- if ((n = imsg_read(&base->ibuf)) == -1 || n == 0) {
+ if (((n = imsg_read(&base->ibuf)) == -1 && errno != EAGAIN) || n == 0) {
if (n != 0)
syslog(LOG_ERR, "%s: imsg_read(): %m", __func__);
module_stop(base);