Explorar o código

fix broken ssl_accept and update autoconf_macros with necessary line for nrpe

Bryan Heden %!s(int64=8) %!d(string=hai) anos
pai
achega
1715dcdfb2
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      configure.ac
  2. 2 2
      src/nrpe.c

+ 1 - 1
configure.ac

@@ -313,7 +313,7 @@ AC_ARG_WITH([need_dh],
 dnl Optional SSL library and include paths
 if test x$check_for_ssl = xyes; then
 	# need_dh should only be set for NRPE
-#	need_dh=yes
+	need_dh=yes
 	AC_NAGIOS_GET_SSL
 fi
 

+ 2 - 2
src/nrpe.c

@@ -1911,8 +1911,8 @@ int handle_conn_ssl(int sock, void *ssl_ptr)
 	SSL_set_fd(ssl, sock);
 
 	/* keep attempting the request if needed */
-	while ((rc = SSL_accept(ssl) != 1) 
-		   && SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ);
+	while (((rc = SSL_accept(ssl)) != 1)
+			&& (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ));
 
 	if (rc != 1) {
 		/* oops, got an unrecoverable error -- get out */