Răsfoiți Sursa

Changes for Solaris 10 vs Solaris 11 checking

John C. Frickson 9 ani în urmă
părinte
comite
7804bec833
5 a modificat fișierele cu 18 adăugiri și 8 ștergeri
  1. 5 0
      configure
  2. 4 0
      configure.ac
  3. 5 2
      include/config.h.in
  4. 2 3
      src/check_nrpe.c
  5. 2 3
      src/nrpe.c

+ 5 - 0
configure

@@ -3857,6 +3857,11 @@ $as_echo "$src_inetd" >&6; }
 
 
 
+if test x${opsys} = xsolaris -a x${init_type} != xsmf11; then
+	$as_echo "#define SOLARIS_10 yes" >>confdefs.h
+
+fi
+
 if test x${showdirs_only} = xyes; then
 	ac_config_files="$ac_config_files paths"
 

+ 4 - 0
configure.ac

@@ -90,6 +90,10 @@ AC_NAGIOS_GET_INETD
 AC_NAGIOS_GET_PATHS
 AC_NAGIOS_GET_FILES
 
+if test x${opsys} = xsolaris -a x${init_type} != xsmf11; then
+	AC_DEFINE(SOLARIS_10,yes)
+fi
+
 dnl Do they just want to see where things will go?
 if test x${showdirs_only} = xyes; then
 	AC_CONFIG_FILES([paths])

+ 5 - 2
include/config.h.in

@@ -40,7 +40,7 @@
 #undef STDC_HEADERS
 #undef HAVE_STRDUP
 #undef HAVE_STRSTR
-#undef HAVE_STRTOUL 
+#undef HAVE_STRTOUL
 #undef HAVE_STRTOK_R
 #undef HAVE_INITGROUPS
 #undef HAVE_CLOSESOCKET
@@ -108,6 +108,9 @@ typedef int int32_t;
 /* Use seteuid() or setresuid() depending on the platform */
 #undef SETEUID
 
+/* Is this a Solaris 10 machine? */
+#undef SOLARIS_10
+
 #undef HAVE_GETOPT_H
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>
@@ -227,7 +230,7 @@ typedef int int32_t;
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
- 
+
 #undef HAVE_GRP_H
 #ifdef HAVE_GRP_H
 #include <grp.h>

+ 2 - 3
src/check_nrpe.c

@@ -46,8 +46,7 @@ int show_version = FALSE;
 int packet_ver = NRPE_PACKET_VERSION_3;
 
 #ifdef HAVE_SSL
-/* # if (defined(__sun) && defined(__SunOS_5_10)) || defined(_AIX) || defined(__hpux) */
-# if defined(__sun) || defined(_AIX) || defined(__hpux)
+# if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux)
 SSL_METHOD *meth;
 # else
 const SSL_METHOD *meth;
@@ -680,7 +679,7 @@ int connect_to_remote()
 			syslog(LOG_NOTICE, "Remote %s - SSL Version: %s", rem_host, SSL_get_version(ssl));
 
 		if (sslprm.log_opts & SSL_LogCipher) {
-# if defined(__sun) || defined(_AIX) || defined(__hpux)
+# if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux)
 			SSL_CIPHER *c = SSL_get_current_cipher(ssl);
 # else
 			const SSL_CIPHER *c = SSL_get_current_cipher(ssl);

+ 2 - 3
src/nrpe.c

@@ -49,8 +49,7 @@ int       rfc931_timeout=15;
 #endif
 
 #ifdef HAVE_SSL
-/* # if (defined(__sun) && defined(__SunOS_5_10)) || defined(_AIX) || defined(__hpux) */
-# if defined(__sun) || defined(_AIX) || defined(__hpux)
+# if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux)
 SSL_METHOD *meth;
 # else
 const SSL_METHOD *meth;
@@ -1728,7 +1727,7 @@ void init_handle_conn(void)
 int handle_conn_ssl(int sock, void *ssl_ptr)
 {
 #ifdef HAVE_SSL
-#if defined(__sun) || defined(_AIX) || defined(__hpux)
+# if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux)
 	SSL_CIPHER *c;
 #else
 	const SSL_CIPHER *c;