File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -736,9 +736,7 @@ static void auditd_tcp_client_handler(struct ev_loop *loop,
736736 goto read_more ;
737737}
738738
739- #ifndef HAVE_LIBWRAP
740- #define auditd_tcpd_check (s ) ({ 0; })
741- #else
739+ #ifdef HAVE_LIBWRAP
742740int allow_severity = LOG_INFO , deny_severity = LOG_NOTICE ;
743741static int auditd_tcpd_check (int sock )
744742{
@@ -802,9 +800,9 @@ static void auditd_tcp_listen_handler( struct ev_loop *loop,
802800 return ;
803801 }
804802
803+ #ifdef HAVE_LIBWRAP
805804 if (use_libwrap ) {
806805 if (auditd_tcpd_check (afd )) {
807- #ifndef HAVE_LIBWRAP
808806 shutdown (afd , SHUT_RDWR );
809807 close (afd );
810808 audit_msg (LOG_ERR , "TCP connection from %s rejected" ,
@@ -815,9 +813,9 @@ static void auditd_tcp_listen_handler( struct ev_loop *loop,
815813 sockaddr_to_port (& aaddr ));
816814 send_audit_event (AUDIT_DAEMON_ACCEPT , emsg );
817815 return ;
818- #endif
819816 }
820817 }
818+ #endif
821819
822820 /* Verify it's coming from an authorized port. We assume the firewall
823821 * will block attempts from unauthorized machines. */
You can’t perform that action at this time.
0 commit comments