diff options
author | marcus <marcus@FreeBSD.org> | 2005-04-26 14:02:40 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2005-04-26 14:02:40 +0800 |
commit | 6ebd761cd21471ed3df205b78dc1c5c5b77431ca (patch) | |
tree | 2622d897b508326dff4e18c280b63a9973a88085 /security/gnomekeyring | |
parent | d8a167ff92cc9cdfdd3095ed7a148d9dbfd1e85a (diff) | |
download | freebsd-ports-gnome-6ebd761cd21471ed3df205b78dc1c5c5b77431ca.tar.gz freebsd-ports-gnome-6ebd761cd21471ed3df205b78dc1c5c5b77431ca.tar.zst freebsd-ports-gnome-6ebd761cd21471ed3df205b78dc1c5c5b77431ca.zip |
Fix dbus and gnomekeyring on -CURRENT by not using LOCAL_CREDS. While it
works, it does not provide the pid information that the cmsgcred structure
gives us. Dbus and gnomekeyring will now behave the same way on all versions
of FreeBSD.
Diffstat (limited to 'security/gnomekeyring')
-rw-r--r-- | security/gnomekeyring/Makefile | 1 | ||||
-rw-r--r-- | security/gnomekeyring/files/patch-gnome-keyring-daemon-io.c | 19 | ||||
-rw-r--r-- | security/gnomekeyring/files/patch-gnome-keyring.c | 20 |
3 files changed, 24 insertions, 16 deletions
diff --git a/security/gnomekeyring/Makefile b/security/gnomekeyring/Makefile index 3687f5f00afc..f2f30d13b6fa 100644 --- a/security/gnomekeyring/Makefile +++ b/security/gnomekeyring/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnomekeyring PORTVERSION= 0.4.2 +PORTREVISION= 1 CATEGORIES= security gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-keyring/0.4 diff --git a/security/gnomekeyring/files/patch-gnome-keyring-daemon-io.c b/security/gnomekeyring/files/patch-gnome-keyring-daemon-io.c index 9a283741317c..c89df802497b 100644 --- a/security/gnomekeyring/files/patch-gnome-keyring-daemon-io.c +++ b/security/gnomekeyring/files/patch-gnome-keyring-daemon-io.c @@ -1,6 +1,6 @@ ---- 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 @@ +--- gnome-keyring-daemon-io.c.orig Mon Feb 21 02:50:03 2005 ++++ gnome-keyring-daemon-io.c Tue Apr 26 01:56:16 2005 +@@ -100,14 +100,16 @@ read_unix_socket_credentials (int fd, char buf; #ifdef HAVE_CMSGCRED @@ -13,7 +13,14 @@ #endif *pid = 0; -@@ -126,9 +128,9 @@ + *uid = 0; + +-#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) ++#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__) + /* Set the socket to receive credentials on the next message */ + { + int on = 1; +@@ -126,9 +128,9 @@ read_unix_socket_credentials (int fd, msg.msg_iovlen = 1; #ifdef HAVE_CMSGCRED @@ -26,7 +33,7 @@ #endif again: -@@ -147,7 +149,8 @@ +@@ -147,7 +149,8 @@ read_unix_socket_credentials (int fd, } #ifdef HAVE_CMSGCRED @@ -36,7 +43,7 @@ g_warning ("Message from recvmsg() was not SCM_CREDS\n"); return FALSE; } -@@ -168,12 +171,8 @@ +@@ -168,12 +171,8 @@ read_unix_socket_credentials (int fd, return FALSE; } #elif defined(HAVE_CMSGCRED) diff --git a/security/gnomekeyring/files/patch-gnome-keyring.c b/security/gnomekeyring/files/patch-gnome-keyring.c index ebac2c91d812..a6f5995515e9 100644 --- a/security/gnomekeyring/files/patch-gnome-keyring.c +++ b/security/gnomekeyring/files/patch-gnome-keyring.c @@ -1,5 +1,5 @@ ---- gnome-keyring.c.orig Tue Sep 7 00:05:37 2004 -+++ gnome-keyring.c Fri Dec 17 10:06:11 2004 +--- gnome-keyring.c.orig Mon Feb 21 02:50:29 2005 ++++ gnome-keyring.c Tue Apr 26 01:57:25 2005 @@ -36,6 +36,7 @@ #include <string.h> #include <sys/types.h> @@ -8,11 +8,11 @@ #include <sys/un.h> #include <stdarg.h> -@@ -253,11 +254,39 @@ +@@ -253,11 +254,39 @@ write_credentials_byte_sync (int socket) { char buf; int bytes_written; -+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) ++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) + struct { + struct cmsghdr hdr; + struct cmsgcred cred; @@ -22,7 +22,7 @@ +#endif + + buf = 0; -+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) ++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) + iov.iov_base = &buf; + iov.iov_len = 1; + @@ -41,7 +41,7 @@ again: - buf = 0; -+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) ++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) + bytes_written = sendmsg (socket, &msg, 0); +#else bytes_written = write (socket, &buf, 1); @@ -49,11 +49,11 @@ if (bytes_written < 0 && errno == EINTR) goto again; -@@ -275,11 +304,39 @@ +@@ -275,11 +304,39 @@ write_credentials_byte (GnomeKeyringOper { char buf; int bytes_written; -+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) ++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) + struct { + struct cmsghdr hdr; + struct cmsgcred cred; @@ -63,7 +63,7 @@ +#endif + + buf = 0; -+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) ++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) + iov.iov_base = &buf; + iov.iov_len = 1; + @@ -82,7 +82,7 @@ again: - buf = 0; -+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) ++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) + bytes_written = sendmsg (op->socket, &msg, 0); +#else bytes_written = write (op->socket, &buf, 1); |