gnome-keyring r1144 - in trunk: . common
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1144 - in trunk: . common
- Date: Sun, 18 May 2008 13:16:53 +0000 (UTC)
Author: nnielsen
Date: Sun May 18 13:16:53 2008
New Revision: 1144
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1144&view=rev
Log:
* common/gkr-unix-credentials.c: Add socket credential support
for OpenBSD. Patch by Antoine Jacoutot. Fixes bug #532143
Modified:
trunk/ChangeLog
trunk/common/gkr-unix-credentials.c
trunk/configure.in
Modified: trunk/common/gkr-unix-credentials.c
==============================================================================
--- trunk/common/gkr-unix-credentials.c (original)
+++ trunk/common/gkr-unix-credentials.c Sun May 18 13:16:53 2008
@@ -127,6 +127,17 @@
*pid = 0;
*uid = cred->sc_euid;
set_local_creds(sock, FALSE);
+#elif defined(HAVE_GETPEEREID) /* OpenBSD */
+ uid_t euid;
+ gid_t egid;
+ *pid = 0;
+
+ if (getpeereid (fd, &euid, &egid) == 0) {
+ *uid = euid;
+ } else {
+ g_warning ("getpeereid() failed: %s", strerror (errno));
+ return FALSE;
+ }
#elif defined(HAVE_GETPEERUCRED)
ucred_t *uc = NULL;
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Sun May 18 13:16:53 2008
@@ -142,6 +142,12 @@
AC_CHECK_FUNCS(getpeerucred, AC_DEFINE(HAVE_GETPEERUCRED,1,[Have getpeerucred]))
# --------------------------------------------------------------------
+# Check for getpeereid
+#
+
+AC_CHECK_FUNCS(getpeereid, AC_DEFINE(HAVE_GETPEEREID, 1, [Have getpeereid function]))
+
+# --------------------------------------------------------------------
# Check for flock
#
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]