diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2004-12-18 00:27:02 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2004-12-18 00:27:02 +0000 |
commit | 502885d8afae12b0aaef82e8a094c98ec4a9ddca (patch) | |
tree | c2a69a197f4076a372cea7f3109285a46a5e80f1 /security/gnome-keyring | |
parent | 7e98cf0203fb2515f19ecd22d8766d026d7d1b2f (diff) | |
download | ports-502885d8afae12b0aaef82e8a094c98ec4a9ddca.tar.gz ports-502885d8afae12b0aaef82e8a094c98ec4a9ddca.zip |
Notes
Diffstat (limited to 'security/gnome-keyring')
-rw-r--r-- | security/gnome-keyring/Makefile | 1 | ||||
-rw-r--r-- | security/gnome-keyring/files/patch-gnome-keyring-daemon-io.c | 53 | ||||
-rw-r--r-- | security/gnome-keyring/files/patch-gnome-keyring.c | 48 |
3 files changed, 80 insertions, 22 deletions
diff --git a/security/gnome-keyring/Makefile b/security/gnome-keyring/Makefile index 697617e18a58..23bf40e3f30b 100644 --- a/security/gnome-keyring/Makefile +++ b/security/gnome-keyring/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnomekeyring PORTVERSION= 0.4.0 +PORTREVISION= 1 CATEGORIES= security gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-keyring/0.4 diff --git a/security/gnome-keyring/files/patch-gnome-keyring-daemon-io.c b/security/gnome-keyring/files/patch-gnome-keyring-daemon-io.c new file mode 100644 index 000000000000..9a283741317c --- /dev/null +++ b/security/gnome-keyring/files/patch-gnome-keyring-daemon-io.c @@ -0,0 +1,53 @@ +--- gnome-keyring-daemon-io.c.orig Tue Jan 13 05:29:02 2004 ++++ gnome-keyring-daemon-io.c Fri Dec 17 00:44:55 2004 +@@ -100,8 +100,10 @@ + char buf; + + #ifdef HAVE_CMSGCRED +- char cmsgmem[CMSG_SPACE (sizeof (struct cmsgcred))]; +- struct cmsghdr *cmsg = (struct cmsghdr *) cmsgmem; ++ struct { ++ struct cmsghdr hdr; ++ struct cmsgcred cred; ++ } cmsg; + #endif + + *pid = 0; +@@ -126,9 +128,9 @@ + msg.msg_iovlen = 1; + + #ifdef HAVE_CMSGCRED +- memset (cmsgmem, 0, sizeof (cmsgmem)); +- msg.msg_control = cmsgmem; +- msg.msg_controllen = sizeof (cmsgmem); ++ memset (&cmsg, 0, sizeof (cmsg)); ++ msg.msg_control = &cmsg; ++ msg.msg_controllen = sizeof (cmsg); + #endif + + again: +@@ -147,7 +149,8 @@ + } + + #ifdef HAVE_CMSGCRED +- if (cmsg->cmsg_len < sizeof (cmsgmem) || cmsg->cmsg_type != SCM_CREDS) { ++ if (cmsg.hdr.cmsg_len < sizeof (cmsg) || ++ cmsg.hdr.cmsg_type != SCM_CREDS) { + g_warning ("Message from recvmsg() was not SCM_CREDS\n"); + return FALSE; + } +@@ -168,12 +171,8 @@ + return FALSE; + } + #elif defined(HAVE_CMSGCRED) +- struct cmsgcred *cred; +- +- cred = (struct cmsgcred *) CMSG_DATA (cmsg); +- +- *pid = cred->cmcred_pid; +- *uid = cred->cmcred_euid; ++ *pid = cmsg.cred.cmcred_pid; ++ *uid = cmsg.cred.cmcred_euid; + #else /* !SO_PEERCRED && !HAVE_CMSGCRED */ + g_warning ("Socket credentials not supported on this OS\n"); + return FALSE; diff --git a/security/gnome-keyring/files/patch-gnome-keyring.c b/security/gnome-keyring/files/patch-gnome-keyring.c index c1abd3a28283..ebac2c91d812 100644 --- a/security/gnome-keyring/files/patch-gnome-keyring.c +++ b/security/gnome-keyring/files/patch-gnome-keyring.c @@ -1,20 +1,22 @@ ---- gnome-keyring.c.orig Mon Jan 12 04:37:31 2004 -+++ gnome-keyring.c Tue May 11 20:59:40 2004 -@@ -35,6 +35,7 @@ - #include <stdio.h> +--- gnome-keyring.c.orig Tue Sep 7 00:05:37 2004 ++++ gnome-keyring.c Fri Dec 17 10:06:11 2004 +@@ -36,6 +36,7 @@ + #include <string.h> #include <sys/types.h> #include <sys/socket.h> +#include <sys/uio.h> #include <sys/un.h> #include <stdarg.h> -@@ -248,11 +249,37 @@ +@@ -253,11 +254,39 @@ { char buf; int bytes_written; +#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) -+ char cmsgmem[CMSG_SPACE (sizeof (struct cmsgcred))]; -+ struct cmsghdr *cmsg = (struct cmsghdr *) cmsgmem; ++ struct { ++ struct cmsghdr hdr; ++ struct cmsgcred cred; ++ } cmsg; + struct iovec iov; + struct msghdr msg; +#endif @@ -28,12 +30,12 @@ + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + -+ msg.msg_control = cmsg; -+ msg.msg_controllen = sizeof (cmsgmem); -+ memset (cmsg, 0, sizeof (cmsgmem)); -+ cmsg->cmsg_len = sizeof (cmsgmem); -+ cmsg->cmsg_level = SOL_SOCKET; -+ cmsg->cmsg_type = SCM_CREDS; ++ msg.msg_control = &cmsg; ++ msg.msg_controllen = sizeof (cmsg); ++ memset (&cmsg, 0, sizeof (cmsg)); ++ cmsg.hdr.cmsg_len = sizeof (cmsg); ++ cmsg.hdr.cmsg_level = SOL_SOCKET; ++ cmsg.hdr.cmsg_type = SCM_CREDS; +#endif again: @@ -47,13 +49,15 @@ if (bytes_written < 0 && errno == EINTR) goto again; -@@ -270,11 +297,37 @@ +@@ -275,11 +304,39 @@ { char buf; int bytes_written; +#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) -+ char cmsgmem[CMSG_SPACE (sizeof (struct cmsgcred))]; -+ struct cmsghdr *cmsg = (struct cmsghdr *) cmsgmem; ++ struct { ++ struct cmsghdr hdr; ++ struct cmsgcred cred; ++ } cmsg; + struct iovec iov; + struct msghdr msg; +#endif @@ -67,12 +71,12 @@ + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + -+ msg.msg_control = cmsg; -+ msg.msg_controllen = sizeof (cmsgmem); -+ memset (cmsg, 0, sizeof (cmsgmem)); -+ cmsg->cmsg_len = sizeof (cmsgmem); -+ cmsg->cmsg_level = SOL_SOCKET; -+ cmsg->cmsg_type = SCM_CREDS; ++ msg.msg_control = &cmsg; ++ msg.msg_controllen = sizeof (cmsg); ++ memset (&cmsg, 0, sizeof (cmsg)); ++ cmsg.hdr.cmsg_len = sizeof (cmsg); ++ cmsg.hdr.cmsg_level = SOL_SOCKET; ++ cmsg.hdr.cmsg_type = SCM_CREDS; +#endif again: |