From 9ce44039b77af935d7afc83d0d5e2a296e6d1209 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 24 Aug 2016 11:31:51 +0900 Subject: [PATCH 1/4] update .gitignore ignore auto-generated opal/mca/pmix/pmix112/pmix/include/pmix/autogen/config.h.in this is a one-off fix for the v2.x branch --- .gitignore | 1 + .../pmix/include/pmix/autogen/config.h.in | 658 ------------------ 2 files changed, 1 insertion(+), 658 deletions(-) delete mode 100644 opal/mca/pmix/pmix112/pmix/include/pmix/autogen/config.h.in diff --git a/.gitignore b/.gitignore index 79f2b994e0..1aeac80ae3 100644 --- a/.gitignore +++ b/.gitignore @@ -301,6 +301,7 @@ opal/mca/hwloc/hwloc*/hwloc/include/private/autogen/config.h opal/mca/installdirs/config/install_dirs.h opal/mca/pmix/pmix112/pmix/include/pmix/autogen/config.h +opal/mca/pmix/pmix112/pmix/include/pmix/autogen/config.h.in opal/mca/pmix/pmix112/pmix/include/pmix/pmix_common.h opal/mca/pmix/pmix112/pmix/include/private/autogen/config.h opal/mca/pmix/pmix112/pmix/include/private/autogen/config.h.in diff --git a/opal/mca/pmix/pmix112/pmix/include/pmix/autogen/config.h.in b/opal/mca/pmix/pmix112/pmix/include/pmix/autogen/config.h.in deleted file mode 100644 index 13eea08a19..0000000000 --- a/opal/mca/pmix/pmix112/pmix/include/pmix/autogen/config.h.in +++ /dev/null @@ -1,658 +0,0 @@ -/* include/pmix/autogen/config.h.in. Generated from configure.ac by autoheader. */ - -/* -*- c -*- - * - * Copyright (c) 2004-2005 The Trustees of Indiana University. - * All rights reserved. - * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. - * All rights reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved - * Copyright (c) 2016 IBM Corporation. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - * This file is automatically generated by configure. Edits will be lost - * the next time you run configure! - */ - -#ifndef PMIX_CONFIG_H -#define PMIX_CONFIG_H - -#include - - - -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Define to 1 if you have the `asprintf' function. */ -#undef HAVE_ASPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_CRT_EXTERNS_H - -/* Define to 1 if you have the declaration of `AF_INET6', and to 0 if you - don't. */ -#undef HAVE_DECL_AF_INET6 - -/* Define to 1 if you have the declaration of `AF_UNSPEC', and to 0 if you - don't. */ -#undef HAVE_DECL_AF_UNSPEC - -/* Define to 1 if you have the declaration of `PF_INET6', and to 0 if you - don't. */ -#undef HAVE_DECL_PF_INET6 - -/* Define to 1 if you have the declaration of `PF_UNSPEC', and to 0 if you - don't. */ -#undef HAVE_DECL_PF_UNSPEC - -/* Define to 1 if you have the declaration of `__func__', and to 0 if you - don't. */ -#undef HAVE_DECL___FUNC__ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_EVENT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `getpeereid' function. */ -#undef HAVE_GETPEEREID - -/* Define to 1 if you have the header file. */ -#undef HAVE_HOSTLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_HWLOC_H - -/* Define to 1 if the system has the type `int16_t'. */ -#undef HAVE_INT16_T - -/* Define to 1 if the system has the type `int32_t'. */ -#undef HAVE_INT32_T - -/* Define to 1 if the system has the type `int64_t'. */ -#undef HAVE_INT64_T - -/* Define to 1 if the system has the type `int8_t'. */ -#undef HAVE_INT8_T - -/* Define to 1 if the system has the type `intptr_t'. */ -#undef HAVE_INTPTR_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_IOLIB_H - -/* Define to 1 if you have the `event' library (-levent). */ -#undef HAVE_LIBEVENT - -/* Define to 1 if you have the `libevent_global_shutdown' function. */ -#undef HAVE_LIBEVENT_GLOBAL_SHUTDOWN - -/* Define to 1 if you have the `event_pthreads' library (-levent_pthreads). */ -#undef HAVE_LIBEVENT_PTHREADS - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBGEN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if the system has the type `long long'. */ -#undef HAVE_LONG_LONG - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MUNGE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NET_UIO_H - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#undef HAVE_PTRDIFF_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_SASL_SASL_H - -/* Define to 1 if `si_band' is a member of `siginfo_t'. */ -#undef HAVE_SIGINFO_T_SI_BAND - -/* Define to 1 if `si_fd' is a member of `siginfo_t'. */ -#undef HAVE_SIGINFO_T_SI_FD - -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the `socketpair' function. */ -#undef HAVE_SOCKETPAIR - -/* Define to 1 if the system has the type `socklen_t'. */ -#undef HAVE_SOCKLEN_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_SOCKLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDBOOL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strncpy_s' function. */ -#undef HAVE_STRNCPY_S - -/* Define to 1 if you have the `strsignal' function. */ -#undef HAVE_STRSIGNAL - -/* Define to 1 if `d_type' is a member of `struct dirent'. */ -#undef HAVE_STRUCT_DIRENT_D_TYPE - -/* Define to 1 if the system has the type `struct sockaddr_in'. */ -#undef HAVE_STRUCT_SOCKADDR_IN - -/* Define to 1 if the system has the type `struct sockaddr_in6'. */ -#undef HAVE_STRUCT_SOCKADDR_IN6 - -/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ -#undef HAVE_STRUCT_SOCKADDR_SA_LEN - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#undef HAVE_STRUCT_SOCKADDR_STORAGE - -/* Define to 1 if the system has the type `struct sockaddr_un'. */ -#undef HAVE_STRUCT_SOCKADDR_UN - -/* Define to 1 if `uid' is a member of `struct sockpeercred'. */ -#undef HAVE_STRUCT_SOCKPEERCRED_UID - -/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ -#undef HAVE_STRUCT_STATFS_F_FSTYPENAME - -/* Define to 1 if `f_type' is a member of `struct statfs'. */ -#undef HAVE_STRUCT_STATFS_F_TYPE - -/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ -#undef HAVE_STRUCT_STATVFS_F_BASETYPE - -/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ -#undef HAVE_STRUCT_STATVFS_F_FSTYPENAME - -/* Define to 1 if `cr_uid' is a member of `struct ucred'. */ -#undef HAVE_STRUCT_UCRED_CR_UID - -/* Define to 1 if `uid' is a member of `struct ucred'. */ -#undef HAVE_STRUCT_UCRED_UID - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TIME_H - -/* Define to 1 if the system has the type `uint16_t'. */ -#undef HAVE_UINT16_T - -/* Define to 1 if the system has the type `uint32_t'. */ -#undef HAVE_UINT32_T - -/* Define to 1 if the system has the type `uint64_t'. */ -#undef HAVE_UINT64_T - -/* Define to 1 if the system has the type `uint8_t'. */ -#undef HAVE_UINT8_T - -/* Define to 1 if the system has the type `uintptr_t'. */ -#undef HAVE_UINTPTR_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* whether unix byteswap routines -- htonl, htons, nothl, ntohs -- are - available */ -#undef HAVE_UNIX_BYTESWAP - -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the `vasprintf' function. */ -#undef HAVE_VASPRINTF - -/* Define to 1 if you have the `vsnprintf' function. */ -#undef HAVE_VSNPRINTF - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Alignment of type bool */ -#undef PMIX_ALIGNMENT_BOOL - -/* Alignment of type char */ -#undef PMIX_ALIGNMENT_CHAR - -/* Alignment of type double */ -#undef PMIX_ALIGNMENT_DOUBLE - -/* Alignment of type float */ -#undef PMIX_ALIGNMENT_FLOAT - -/* Alignment of type int */ -#undef PMIX_ALIGNMENT_INT - -/* Alignment of type int16_t */ -#undef PMIX_ALIGNMENT_INT16 - -/* Alignment of type int32_t */ -#undef PMIX_ALIGNMENT_INT32 - -/* Alignment of type int64_t */ -#undef PMIX_ALIGNMENT_INT64 - -/* Alignment of type int8_t */ -#undef PMIX_ALIGNMENT_INT8 - -/* Alignment of type long */ -#undef PMIX_ALIGNMENT_LONG - -/* Alignment of type long double */ -#undef PMIX_ALIGNMENT_LONG_DOUBLE - -/* Alignment of type long long */ -#undef PMIX_ALIGNMENT_LONG_LONG - -/* Alignment of type short */ -#undef PMIX_ALIGNMENT_SHORT - -/* Alignment of type size_t */ -#undef PMIX_ALIGNMENT_SIZE_T - -/* Alignment of type void * */ -#undef PMIX_ALIGNMENT_VOID_P - -/* Alignment of type wchar_t */ -#undef PMIX_ALIGNMENT_WCHAR - -/* The compiler $lower which PMIx was built with */ -#undef PMIX_BUILD_PLATFORM_COMPILER_FAMILYID - -/* The compiler $lower which PMIX was built with */ -#undef PMIX_BUILD_PLATFORM_COMPILER_FAMILYNAME - -/* The compiler $lower which PMIx was built with */ -#undef PMIX_BUILD_PLATFORM_COMPILER_VERSION - -/* The compiler $lower which PMIX was built with */ -#undef PMIX_BUILD_PLATFORM_COMPILER_VERSION_STR - -/* PMIx underlying C compiler */ -#undef PMIX_CC - -/* Use static const char[] strings for C files */ -#undef PMIX_CC_USE_CONST_CHAR_IDENT - -/* Use #ident strings for C files */ -#undef PMIX_CC_USE_IDENT - -/* Use #pragma comment for C files */ -#undef PMIX_CC_USE_PRAGMA_COMMENT - -/* Use #pragma ident strings for C files */ -#undef PMIX_CC_USE_PRAGMA_IDENT - -/* Whether C compiler supports __builtin_clz */ -#undef PMIX_C_HAVE_BUILTIN_CLZ - -/* Whether C compiler supports __builtin_expect */ -#undef PMIX_C_HAVE_BUILTIN_EXPECT - -/* Whether C compiler supports __builtin_prefetch */ -#undef PMIX_C_HAVE_BUILTIN_PREFETCH - -/* Whether C compiler supports symbol visibility or not */ -#undef PMIX_C_HAVE_VISIBILITY - -/* Whether we are in debugging mode or not */ -#undef PMIX_ENABLE_DEBUG - -/* Whether we want developer-level timing support or not */ -#undef PMIX_ENABLE_TIMING - -/* Location of event2/thread.h */ -#undef PMIX_EVENT2_THREAD_HEADER - -/* Location of event.h */ -#undef PMIX_EVENT_HEADER - -/* Whether your compiler has __attribute__ or not */ -#undef PMIX_HAVE_ATTRIBUTE - -/* Whether your compiler has __attribute__ aligned or not */ -#undef PMIX_HAVE_ATTRIBUTE_ALIGNED - -/* Whether your compiler has __attribute__ always_inline or not */ -#undef PMIX_HAVE_ATTRIBUTE_ALWAYS_INLINE - -/* Whether your compiler has __attribute__ cold or not */ -#undef PMIX_HAVE_ATTRIBUTE_COLD - -/* Whether your compiler has __attribute__ const or not */ -#undef PMIX_HAVE_ATTRIBUTE_CONST - -/* Whether your compiler has __attribute__ deprecated or not */ -#undef PMIX_HAVE_ATTRIBUTE_DEPRECATED - -/* Whether your compiler has __attribute__ deprecated with optional argument - */ -#undef PMIX_HAVE_ATTRIBUTE_DEPRECATED_ARGUMENT - -/* Whether your compiler has __attribute__ destructor or not */ -#undef PMIX_HAVE_ATTRIBUTE_DESTRUCTOR - -/* Whether your compiler has __attribute__ format or not */ -#undef PMIX_HAVE_ATTRIBUTE_FORMAT - -/* Whether your compiler has __attribute__ format and it works on function - pointers */ -#undef PMIX_HAVE_ATTRIBUTE_FORMAT_FUNCPTR - -/* Whether your compiler has __attribute__ hot or not */ -#undef PMIX_HAVE_ATTRIBUTE_HOT - -/* Whether your compiler has __attribute__ malloc or not */ -#undef PMIX_HAVE_ATTRIBUTE_MALLOC - -/* Whether your compiler has __attribute__ may_alias or not */ -#undef PMIX_HAVE_ATTRIBUTE_MAY_ALIAS - -/* Whether your compiler has __attribute__ nonnull or not */ -#undef PMIX_HAVE_ATTRIBUTE_NONNULL - -/* Whether your compiler has __attribute__ noreturn or not */ -#undef PMIX_HAVE_ATTRIBUTE_NORETURN - -/* Whether your compiler has __attribute__ noreturn and it works on function - pointers */ -#undef PMIX_HAVE_ATTRIBUTE_NORETURN_FUNCPTR - -/* Whether your compiler has __attribute__ no_instrument_function or not */ -#undef PMIX_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION - -/* Whether your compiler has __attribute__ packed or not */ -#undef PMIX_HAVE_ATTRIBUTE_PACKED - -/* Whether your compiler has __attribute__ pure or not */ -#undef PMIX_HAVE_ATTRIBUTE_PURE - -/* Whether your compiler has __attribute__ sentinel or not */ -#undef PMIX_HAVE_ATTRIBUTE_SENTINEL - -/* Whether your compiler has __attribute__ unused or not */ -#undef PMIX_HAVE_ATTRIBUTE_UNUSED - -/* Whether your compiler has __attribute__ visibility or not */ -#undef PMIX_HAVE_ATTRIBUTE_VISIBILITY - -/* Whether your compiler has __attribute__ warn unused result or not */ -#undef PMIX_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT - -/* Whether your compiler has __attribute__ weak alias or not */ -#undef PMIX_HAVE_ATTRIBUTE_WEAK_ALIAS - -/* whether qsort is broken or not */ -#undef PMIX_HAVE_BROKEN_QSORT - -/* whether ceil is found and available */ -#undef PMIX_HAVE_CEIL - -/* whether dirname is found and available */ -#undef PMIX_HAVE_DIRNAME - -/* Whether we have hwloc support or not */ -#undef PMIX_HAVE_HWLOC - -/* Whether we have sasl support or not */ -#undef PMIX_HAVE_SASL - -/* Whether we have SA_RESTART in or not */ -#undef PMIX_HAVE_SA_RESTART - -/* whether socket is found and available */ -#undef PMIX_HAVE_SOCKET - -/* Whether we have __va_copy or not */ -#undef PMIX_HAVE_UNDERSCORE_VA_COPY - -/* Whether we have va_copy or not */ -#undef PMIX_HAVE_VA_COPY - -/* Location of hwloc.h */ -#undef PMIX_HWLOC_HEADER - -/* ident string for PMIX */ -#undef PMIX_IDENT_STRING - -/* The library major version is always available, contrary to VERSION */ -#undef PMIX_MAJOR_VERSION - -/* The library minor version is always available, contrary to VERSION */ -#undef PMIX_MINOR_VERSION - -/* Whether the C compiler supports "bool" without any other help (such as - ) */ -#undef PMIX_NEED_C_BOOL - -/* type to use for ptrdiff_t */ -#undef PMIX_PTRDIFF_TYPE - -/* The library release version is always available, contrary to VERSION */ -#undef PMIX_RELEASE_VERSION - -/* The pmix symbol prefix */ -#undef PMIX_SYM_PREFIX - -/* The pmix symbol prefix in all caps */ -#undef PMIX_SYM_PREFIX_CAPS - -/* Whether we need to re-define all the pmix public symbols or not */ -#undef PMIX_SYM_TRANSFORM - -/* Whether to use or not */ -#undef PMIX_USE_STDBOOL_H - -/* The library version is always available, contrary to VERSION */ -#undef PMIX_VERSION - -/* Whether we want munge support or not */ -#undef PMIX_WANT_MUNGE - -/* if want pretty-print stack trace feature */ -#undef PMIX_WANT_PRETTY_PRINT_STACKTRACE - -/* The size of `char', as computed by sizeof. */ -#undef SIZEOF_CHAR - -/* The size of `double', as computed by sizeof. */ -#undef SIZEOF_DOUBLE - -/* The size of `float', as computed by sizeof. */ -#undef SIZEOF_FLOAT - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* The size of `pid_t', as computed by sizeof. */ -#undef SIZEOF_PID_T - -/* The size of `ptrdiff_t', as computed by sizeof. */ -#undef SIZEOF_PTRDIFF_T - -/* The size of `short', as computed by sizeof. */ -#undef SIZEOF_SHORT - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of `ssize_t', as computed by sizeof. */ -#undef SIZEOF_SSIZE_T - -/* The size of `void *', as computed by sizeof. */ -#undef SIZEOF_VOID_P - -/* The size of `wchar_t', as computed by sizeof. */ -#undef SIZEOF_WCHAR_T - -/* The size of `_Bool', as computed by sizeof. */ -#undef SIZEOF__BOOL - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif - -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - - -#include -#endif /* PMIX_CONFIG_H */ - From aa9c643d4409b91553929102765a7e34d8a02c3e Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 24 Aug 2016 11:16:20 +0900 Subject: [PATCH 2/4] pmix2x: sec/native: fix the pmix_native module under solaris by using getpeerucred() and fail with a user friendly message if no method is available: "sec: native cannot validate_cred on this system" (back-ported from upstream pmix/master@c474a1fc6072c96d2c0ee0222846dc64af0fcddf) (back-ported from commit open-mpi/ompi@c11e8163f8382a64fca7e283ba0a87530a3681e6) --- opal/mca/pmix/pmix112/pmix/config/pmix.m4 | 7 ++--- .../pmix/pmix112/pmix/src/sec/pmix_native.c | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/opal/mca/pmix/pmix112/pmix/config/pmix.m4 b/opal/mca/pmix/pmix112/pmix/config/pmix.m4 index f8830d2160..ac65f4e504 100644 --- a/opal/mca/pmix/pmix112/pmix/config/pmix.m4 +++ b/opal/mca/pmix/pmix112/pmix/config/pmix.m4 @@ -18,7 +18,7 @@ dnl reserved. dnl Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved. dnl Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved. dnl Copyright (c) 2013-2015 Intel, Inc. All rights reserved -dnl Copyright (c) 2015 Research Organization for Information Science +dnl Copyright (c) 2015-2016 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl Copyright (c) 2016 Mellanox Technologies, Inc. dnl All rights reserved. @@ -318,7 +318,8 @@ AC_DEFUN([PMIX_SETUP_CORE],[ sys/wait.h syslog.h \ time.h unistd.h \ crt_externs.h signal.h \ - ioLib.h sockLib.h hostLib.h limits.h]) + ioLib.h sockLib.h hostLib.h limits.h \ + ucred.h]) # Note that sometimes we have , but it doesn't work (e.g., # have both Portland and GNU installed; using pgcc will find GNU's @@ -495,7 +496,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[ # Darwin doesn't need -lm, as it's a symlink to libSystem.dylib PMIX_SEARCH_LIBS_CORE([ceil], [m]) - AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep getpeereid]) + AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep getpeereid getpeerucred]) # On some hosts, htonl is a define, so the AC_CHECK_FUNC will get # confused. On others, it's in the standard library, but stubbed with diff --git a/opal/mca/pmix/pmix112/pmix/src/sec/pmix_native.c b/opal/mca/pmix/pmix112/pmix/src/sec/pmix_native.c index 677a07dd45..8a23c6f32c 100644 --- a/opal/mca/pmix/pmix112/pmix/src/sec/pmix_native.c +++ b/opal/mca/pmix/pmix112/pmix/src/sec/pmix_native.c @@ -1,6 +1,9 @@ /* * Copyright (c) 2015 Intel, Inc. All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved. + * Copyright (c) 2016 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * * $COPYRIGHT$ * * Additional copyrights may follow @@ -22,6 +25,9 @@ #ifdef HAVE_SYS_TYPES_H #include #endif +#ifdef HAVE_UCRED_H +#include +#endif #include "pmix_sec.h" #include "pmix_native.h" @@ -63,6 +69,9 @@ static pmix_status_t validate_cred(pmix_peer_t *peer, char *cred) struct ucred ucred; #endif socklen_t crlen = sizeof (ucred); +#endif +#ifdef HAVE_GETPEERUCRED + ucred_t *ucred = NULL; #endif uid_t euid; gid_t gid; @@ -97,7 +106,24 @@ static pmix_status_t validate_cred(pmix_peer_t *peer, char *cred) strerror (pmix_socket_errno)); return PMIX_ERR_INVALID_CRED; } +#elif defined(HAVE_GETPEERUCRED) + pmix_output_verbose(2, pmix_globals.debug_output, + "sec:native checking getpeerucred for peer credentials"); + if (0 != getpeerucred(peer->sd, &ucred)) { + pmix_output_verbose(2, pmix_globals.debug_output, + "sec: getsockopt getpeerucred failed: %s", + strerror (pmix_socket_errno)); + pmix_output_verbose(2, pmix_globals.debug_output, + "sec: getsockopt getpeerucred failed: %s", + strerror (errno)); + return PMIX_ERR_INVALID_CRED; + } + euid = ucred_geteuid(ucred); + gid = ucred_getrgid(ucred); + ucred_free(ucred); #else + pmix_output_verbose(2, pmix_globals.debug_output, + "sec: native cannot validate_cred on this system"); return PMIX_ERR_NOT_SUPPORTED; #endif From 8e34d2225fc4e8593b47f5c8b27fcbaa9e5ce807 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 24 Aug 2016 10:26:13 +0900 Subject: [PATCH 3/4] opal/util: fix incorrect type casting in opal_path_df (cherry picked from commit open-mpi/ompi@a439afce5ba1bfb65f049bb2ba1113b2762feb46) --- opal/util/path.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opal/util/path.c b/opal/util/path.c index a1ca49a293..dece446d59 100644 --- a/opal/util/path.c +++ b/opal/util/path.c @@ -15,6 +15,8 @@ * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2016 University of Houston. All rights reserved. + * Copyright (c) 2016 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -702,7 +704,7 @@ opal_path_df(const char *path, /* now set the amount of free space available on path */ /* sometimes buf.f_bavail is negative */ - *out_avail = buf.f_bsize * ((int)buf.f_bavail < 0 ? 0 : buf.f_bavail); + *out_avail = buf.f_bsize * ((long)buf.f_bavail < 0 ? 0 : buf.f_bavail); OPAL_OUTPUT_VERBOSE((10, 2, "opal_path_df: stat(v)fs states " "path: %s has %"PRIu64 " B of free space.", From 0bd1495fddee82d18cd18acd9fd16fad64a71a6a Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 24 Aug 2016 12:50:15 +0900 Subject: [PATCH 4/4] opal/util: fix (again) incorrect type casting in opal_path_df this fixes previous commit open-mpi/ompi@a439afce5ba1bfb65f049bb2ba1113b2762feb46 (cherry picked from commit open-mpi/ompi@2eec8970ff63d61692182e0cad81a9bb820e11b6) --- opal/util/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opal/util/path.c b/opal/util/path.c index dece446d59..2b4bfa22ea 100644 --- a/opal/util/path.c +++ b/opal/util/path.c @@ -704,7 +704,7 @@ opal_path_df(const char *path, /* now set the amount of free space available on path */ /* sometimes buf.f_bavail is negative */ - *out_avail = buf.f_bsize * ((long)buf.f_bavail < 0 ? 0 : buf.f_bavail); + *out_avail = (uint64_t)buf.f_bsize * (uint64_t)(buf.f_bavail < 0 ? 0 : buf.f_bavail); OPAL_OUTPUT_VERBOSE((10, 2, "opal_path_df: stat(v)fs states " "path: %s has %"PRIu64 " B of free space.",