diff --git a/configure.ac b/configure.ac index 52902e87..650f646a 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,7 @@ AC_CHECK_PROGS([PKGCONFIG], [pkg-config]) AC_CHECK_LIB([dl], [dlopen]) AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_LIB([c], [getpeereid]) +AC_CHECK_LIB([c], [getpeerucred]) AC_CHECK_LIB([socket], [socket]) AC_CHECK_LIB([nsl], [t_open]) AC_CHECK_LIB([rt], [sched_getscheduler]) diff --git a/exec/coroipcs.c b/exec/coroipcs.c index 5057e587..8c6c9afb 100644 --- a/exec/coroipcs.c +++ b/exec/coroipcs.c @@ -623,21 +623,7 @@ req_setup_recv ( msg_recv.msg_controllen = sizeof (cmsg_cred); #endif -#ifdef PORTABILITY_WORK_TODO #ifdef COROSYNC_SOLARIS - msg_recv.msg_flags = 0; - uid_t euid; - gid_t egid; - - euid = -1; - egid = -1; - if (getpeereid(conn_info->fd, &euid, &egid) != -1 && - (api->security_valid (euid, egid)) { - if (conn_info->state == CONN_IO_STATE_INITIALIZING) { - api->log_printf ("Invalid security authentication\n"); - return (-1); - } - } msg_recv.msg_accrights = 0; msg_recv.msg_accrightslen = 0; #else /* COROSYNC_SOLARIS */ @@ -666,8 +652,6 @@ req_setup_recv ( #endif /* HAVE_GETPEERUCRED */ #endif /* COROSYNC_SOLARIS */ -#endif - iov_recv.iov_base = &conn_info->setup_msg[conn_info->setup_bytes_read]; iov_recv.iov_len = sizeof (mar_req_setup_t) - conn_info->setup_bytes_read; #ifdef COROSYNC_LINUX @@ -780,7 +764,11 @@ extern void coroipcs_ipc_init ( /* * Create socket for IPC clients, name socket, listen for connections */ +#if defined(COROSYNC_SOLARIS) + server_fd = socket (PF_UNIX, SOCK_STREAM, 0); +#else server_fd = socket (PF_LOCAL, SOCK_STREAM, 0); +#endif if (server_fd == -1) { api->log_printf ("Cannot create client connections socket.\n"); api->fatal_error ("Can't create library listen socket"); diff --git a/lib/coroipcc.c b/lib/coroipcc.c index c30fad7b..022f57e0 100644 --- a/lib/coroipcc.c +++ b/lib/coroipcc.c @@ -127,6 +127,9 @@ socket_send ( msg_send.msg_control = 0; msg_send.msg_controllen = 0; msg_send.msg_flags = 0; +#else + msg_send.msg_accrights = NULL; + msg_send.msg_accrightslen = 0; #endif retry_send: @@ -180,8 +183,12 @@ socket_recv ( msg_recv.msg_control = 0; msg_recv.msg_controllen = 0; msg_recv.msg_flags = 0; +#else + msg_recv.msg_accrights = NULL; + msg_recv.msg_accrightslen = 0; #endif + retry_recv: iov_recv.iov_base = (void *)&rbuf[processed]; iov_recv.iov_len = len - processed;