Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/libhack refuse should exit(3). Noted by joerg@



details:   https://anonhg.NetBSD.org/src/rev/93976f0d09bb
branches:  trunk
changeset: 983452:93976f0d09bb
user:      christos <christos%NetBSD.org@localhost>
date:      Mon May 24 21:34:06 2021 +0000

description:
refuse should exit(3). Noted by joerg@

diffstat:

 distrib/utils/libhack/wrap.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r e5338c55a11c -r 93976f0d09bb distrib/utils/libhack/wrap.c
--- a/distrib/utils/libhack/wrap.c      Mon May 24 21:00:12 2021 +0000
+++ b/distrib/utils/libhack/wrap.c      Mon May 24 21:34:06 2021 +0000
@@ -28,9 +28,10 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: wrap.c,v 1.1 2021/03/09 00:06:44 christos Exp $");
+__RCSID("$NetBSD: wrap.c,v 1.2 2021/05/24 21:34:06 christos Exp $");
 
 #include <tcpd.h>
+#include <stdlib.h>
 
 struct request_info *
 request_init(struct request_info *ri, ...)
@@ -53,4 +54,6 @@
 void
 refuse(struct request_info *ri)
 {
+       /* We don't need to wait for inetd, or eat the connection data here */
+       exit(EXIT_FAILURE);
 }



Home | Main Index | Thread Index | Old Index