diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2011-11-22 19:21:40 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2011-11-22 19:21:40 +0800 |
commit | 0848918776d84624a0b7f02594fbc8d3505ffa72 (patch) | |
tree | be65f00ea9ee744db22ace5da680735e0424e2d1 /net-im/telepathy-salut/files | |
parent | 4c9b1db3b664fd97e8c3a7b1e430051bf59b2b83 (diff) | |
download | marcuscom-ports-0848918776d84624a0b7f02594fbc8d3505ffa72.tar marcuscom-ports-0848918776d84624a0b7f02594fbc8d3505ffa72.tar.gz marcuscom-ports-0848918776d84624a0b7f02594fbc8d3505ffa72.tar.bz2 marcuscom-ports-0848918776d84624a0b7f02594fbc8d3505ffa72.tar.lz marcuscom-ports-0848918776d84624a0b7f02594fbc8d3505ffa72.tar.xz marcuscom-ports-0848918776d84624a0b7f02594fbc8d3505ffa72.tar.zst marcuscom-ports-0848918776d84624a0b7f02594fbc8d3505ffa72.zip |
Update to 0.6.0.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@16590 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'net-im/telepathy-salut/files')
4 files changed, 147 insertions, 0 deletions
diff --git a/net-im/telepathy-salut/files/patch-lib_gibber_gibber-bytestream-oob.h b/net-im/telepathy-salut/files/patch-lib_gibber_gibber-bytestream-oob.h new file mode 100644 index 000000000..22af230b1 --- /dev/null +++ b/net-im/telepathy-salut/files/patch-lib_gibber_gibber-bytestream-oob.h @@ -0,0 +1,10 @@ +--- lib/gibber/gibber-bytestream-oob.h.orig 2010-05-20 06:10:39.000000000 -0400 ++++ lib/gibber/gibber-bytestream-oob.h 2010-07-24 20:41:19.000000000 -0400 +@@ -20,6 +20,7 @@ + #ifndef __GIBBER_BYTESTREAM_OOB_H__ + #define __GIBBER_BYTESTREAM_OOB_H__ + ++#include <netinet/in.h> + #include <glib-object.h> + + #include "gibber-bytestream-iface.h" diff --git a/net-im/telepathy-salut/files/patch-lib_gibber_gibber-muc-connection.c b/net-im/telepathy-salut/files/patch-lib_gibber_gibber-muc-connection.c new file mode 100644 index 000000000..4d69b0f55 --- /dev/null +++ b/net-im/telepathy-salut/files/patch-lib_gibber_gibber-muc-connection.c @@ -0,0 +1,10 @@ +--- lib/gibber/gibber-muc-connection.c.orig Sun Jun 24 15:48:48 2007 ++++ lib/gibber/gibber-muc-connection.c Sun Jun 24 15:49:19 2007 +@@ -18,6 +18,7 @@ + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include <netinet/in.h> + + #include <stdio.h> + #include <stdlib.h> diff --git a/net-im/telepathy-salut/files/patch-lib_gibber_gibber-tcp-transport.c b/net-im/telepathy-salut/files/patch-lib_gibber_gibber-tcp-transport.c new file mode 100644 index 000000000..5711d4b29 --- /dev/null +++ b/net-im/telepathy-salut/files/patch-lib_gibber_gibber-tcp-transport.c @@ -0,0 +1,10 @@ +--- lib/gibber/gibber-tcp-transport.c.orig 2010-05-20 06:10:39.000000000 -0400 ++++ lib/gibber/gibber-tcp-transport.c 2010-07-24 20:42:16.000000000 -0400 +@@ -20,6 +20,7 @@ + + #include <config.h> + ++#include <netinet/in.h> + #include <stdio.h> + #include <stdlib.h> + diff --git a/net-im/telepathy-salut/files/patch-lib_gibber_gibber-unix-transport.c b/net-im/telepathy-salut/files/patch-lib_gibber_gibber-unix-transport.c new file mode 100644 index 000000000..4eb7a4849 --- /dev/null +++ b/net-im/telepathy-salut/files/patch-lib_gibber_gibber-unix-transport.c @@ -0,0 +1,117 @@ +--- lib/gibber/gibber-unix-transport.c.orig 2010-05-20 06:10:39.000000000 -0400 ++++ lib/gibber/gibber-unix-transport.c 2010-07-24 20:47:17.000000000 -0400 +@@ -217,11 +217,12 @@ gibber_unix_transport_send_credentials ( + gsize size) + { + int fd, ret; +- struct ucred *cred; + struct msghdr msg; +- struct cmsghdr *ch; + struct iovec iov; +- char buffer[CMSG_SPACE (sizeof (struct ucred))]; ++ union { ++ struct cmsghdr hdr; ++ char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; ++ } buffer; + + DEBUG ("send credentials"); + fd = GIBBER_FD_TRANSPORT (transport)->fd; +@@ -234,20 +235,14 @@ gibber_unix_transport_send_credentials ( + memset (&msg, 0, sizeof (msg)); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; +- msg.msg_control = buffer; +- msg.msg_controllen = sizeof (buffer); ++ msg.msg_control = (caddr_t) &buffer; ++ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); + memset (buffer, 0, sizeof (buffer)); + + /* Set the credentials */ +- ch = CMSG_FIRSTHDR (&msg); +- ch->cmsg_len = CMSG_LEN (sizeof (struct ucred)); +- ch->cmsg_level = SOL_SOCKET; +- ch->cmsg_type = SCM_CREDENTIALS; +- +- cred = (struct ucred *) CMSG_DATA (ch); +- cred->pid = getpid (); +- cred->uid = getuid (); +- cred->gid = getgid (); ++ buffer.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred)); ++ buffer.hdr.cmsg_level = SOL_SOCKET; ++ buffer.hdr.cmsg_type = SCM_CREDS; + + ret = sendmsg (fd, &msg, 0); + if (ret == -1) +@@ -274,10 +269,10 @@ gibber_unix_transport_read (GibberFdTran + GibberBuffer buf; + struct iovec iov; + struct msghdr msg; +- char control[CMSG_SPACE (sizeof (struct ucred))]; +- struct cmsghdr *ch; +- struct ucred *cred; +- int opt; ++ union { ++ struct cmsghdr hdr; ++ char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; ++ } control; + + if (priv->recv_creds_cb == NULL) + return gibber_fd_transport_read (transport, channel, error); +@@ -285,10 +280,6 @@ gibber_unix_transport_read (GibberFdTran + /* We are waiting for credentials */ + fd = transport->fd; + +- /* set SO_PASSCRED flag */ +- opt = 1; +- setsockopt (fd, SOL_SOCKET, SO_PASSCRED, &opt, sizeof (opt)); +- + memset (buffer, 0, sizeof (buffer)); + memset (&iov, 0, sizeof (iov)); + iov.iov_base = buffer; +@@ -297,8 +288,9 @@ gibber_unix_transport_read (GibberFdTran + memset (&msg, 0, sizeof (msg)); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; +- msg.msg_control = control; +- msg.msg_controllen = sizeof (control); ++ memset (&control, 0, sizeof (control)); ++ msg.msg_control = (caddr_t) &control; ++ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); + + bytes_read = recvmsg (fd, &msg, 0); + +@@ -317,16 +309,11 @@ gibber_unix_transport_read (GibberFdTran + return GIBBER_FD_IO_RESULT_ERROR; + } + +- /* unset SO_PASSCRED flag */ +- opt = 0; +- setsockopt (fd, SOL_SOCKET, SO_PASSCRED, &opt, sizeof (opt)); +- + buf.data = buffer; + buf.length = bytes_read; + + /* extract the credentials */ +- ch = CMSG_FIRSTHDR (&msg); +- if (ch == NULL) ++ if (control.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) || control.hdr.cmsg_type != SCM_CREDS) + { + GError *err = NULL; + +@@ -342,11 +329,12 @@ gibber_unix_transport_read (GibberFdTran + else + { + GibberCredentials credentials; ++ struct cmsgcred *cred; + +- cred = (struct ucred *) CMSG_DATA (ch); +- credentials.pid = cred->pid; +- credentials.uid = cred->uid; +- credentials.gid = cred->gid; ++ cred = (struct cmsgcred *) CMSG_DATA (&control); ++ credentials.pid = cred->cmcred_pid; ++ credentials.uid = cred->cmcred_uid; ++ credentials.gid = cred->cmcred_gid; + + priv->recv_creds_cb (self, &buf, &credentials, NULL, + priv->recv_creds_data); |