mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-06 01:31:29 +00:00
Port of coroipc system to Solaris.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2238 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
13f3f6214d
commit
0389b65725
@ -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])
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user