aboutsummaryrefslogtreecommitdiff
path: root/security/gnome-keyring/files
diff options
context:
space:
mode:
Diffstat (limited to 'security/gnome-keyring/files')
-rw-r--r--security/gnome-keyring/files/patch-gnome-keyring-daemon-io.c53
-rw-r--r--security/gnome-keyring/files/patch-gnome-keyring-daemon.c34
-rw-r--r--security/gnome-keyring/files/patch-gnome-keyring.c92
3 files changed, 0 insertions, 179 deletions
diff --git a/security/gnome-keyring/files/patch-gnome-keyring-daemon-io.c b/security/gnome-keyring/files/patch-gnome-keyring-daemon-io.c
deleted file mode 100644
index 9a283741317c..000000000000
--- a/security/gnome-keyring/files/patch-gnome-keyring-daemon-io.c
+++ /dev/null
@@ -1,53 +0,0 @@
---- 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-daemon.c b/security/gnome-keyring/files/patch-gnome-keyring-daemon.c
deleted file mode 100644
index 293df59b976f..000000000000
--- a/security/gnome-keyring/files/patch-gnome-keyring-daemon.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- gnome-keyring-daemon.c.orig Tue Jul 20 22:41:27 2004
-+++ gnome-keyring-daemon.c Tue Jul 20 22:43:03 2004
-@@ -121,7 +121,7 @@
- int i;
-
- got_random = FALSE;
--#ifdef __linux__
-+#if defined(__linux__) || defined(__FreeBSD__)
- {
- int fd;
-
-@@ -352,6 +352,22 @@
- app_ref->pathname[len] = 0;
- }
-
-+ }
-+#elif defined(__FreeBSD__)
-+ {
-+ char buffer[1024];
-+ int len;
-+ char *path;
-+
-+ path = g_strdup_printf ("/proc/%d/file", pid);
-+ len = readlink (path, buffer, sizeof (buffer));
-+ g_free (path);
-+
-+ if (len > 0) {
-+ app_ref->pathname = g_malloc (len + 1);
-+ memcpy (app_ref->pathname, buffer, len);
-+ app_ref->pathname[len] = 0;
-+ }
- }
- #endif
-
diff --git a/security/gnome-keyring/files/patch-gnome-keyring.c b/security/gnome-keyring/files/patch-gnome-keyring.c
deleted file mode 100644
index ebac2c91d812..000000000000
--- a/security/gnome-keyring/files/patch-gnome-keyring.c
+++ /dev/null
@@ -1,92 +0,0 @@
---- 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>
-
-@@ -253,11 +254,39 @@
- {
- char buf;
- int bytes_written;
-+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
-+ struct {
-+ struct cmsghdr hdr;
-+ struct cmsgcred cred;
-+ } cmsg;
-+ struct iovec iov;
-+ struct msghdr msg;
-+#endif
-+
-+ buf = 0;
-+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
-+ iov.iov_base = &buf;
-+ iov.iov_len = 1;
-+
-+ memset (&msg, 0, sizeof (msg));
-+ msg.msg_iov = &iov;
-+ msg.msg_iovlen = 1;
-+
-+ 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:
-
-- buf = 0;
-+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
-+ bytes_written = sendmsg (socket, &msg, 0);
-+#else
- bytes_written = write (socket, &buf, 1);
-+#endif
-
- if (bytes_written < 0 && errno == EINTR)
- goto again;
-@@ -275,11 +304,39 @@
- {
- char buf;
- int bytes_written;
-+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
-+ struct {
-+ struct cmsghdr hdr;
-+ struct cmsgcred cred;
-+ } cmsg;
-+ struct iovec iov;
-+ struct msghdr msg;
-+#endif
-+
-+ buf = 0;
-+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
-+ iov.iov_base = &buf;
-+ iov.iov_len = 1;
-+
-+ memset (&msg, 0, sizeof (msg));
-+ msg.msg_iov = &iov;
-+ msg.msg_iovlen = 1;
-+
-+ 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:
-
-- buf = 0;
-+#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
-+ bytes_written = sendmsg (op->socket, &msg, 0);
-+#else
- bytes_written = write (op->socket, &buf, 1);
-+#endif
-
- if (bytes_written < 0 && errno == EINTR)
- goto again;