summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rwhod/rwhod.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rwhod/rwhod.c')
-rw-r--r--usr.sbin/rwhod/rwhod.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c
index 26b0500..d6a597f 100644
--- a/usr.sbin/rwhod/rwhod.c
+++ b/usr.sbin/rwhod/rwhod.c
@@ -274,6 +274,15 @@ main(int argc, char *argv[])
exit(1);
if (!quiet_mode) {
pid_child_receiver = pdfork(&fdp, 0);
+ if (pid_child_receiver == -1) {
+ if (errno != ENOSYS) {
+ syslog(LOG_ERR, "pdfork: %m");
+ exit(1);
+ } else {
+ pid_child_receiver = fork();
+ fdp = -1;
+ }
+ }
if (pid_child_receiver == 0) {
receiver_process();
} else if (pid_child_receiver > 0) {
@@ -328,7 +337,7 @@ verify(char *name, int maxlen)
size = 0;
while (*name != '\0' && size < maxlen - 1) {
- if (!isascii(*name) || !isalnum(*name) || ispunct(*name))
+ if (!isascii(*name) || !(isalnum(*name) || ispunct(*name)))
return (0);
name++;
size++;
OpenPOWER on IntegriCloud