summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2011-06-07 08:17:08 +0000
committerPacho Ramos <pacho@gentoo.org>2011-06-07 08:17:08 +0000
commit4c6815b47c71708d07ffd7b9d50a53891bf1b1a1 (patch)
treea0805b18d2ba2a8d7ac9b8f9e337aa2231cad760 /gnome-extra
parentVersion Bump. (diff)
downloadgentoo-2-4c6815b47c71708d07ffd7b9d50a53891bf1b1a1.tar.gz
gentoo-2-4c6815b47c71708d07ffd7b9d50a53891bf1b1a1.tar.bz2
gentoo-2-4c6815b47c71708d07ffd7b9d50a53891bf1b1a1.zip
Fix sandbox violations with USE doc, bug #370013, upstream #651922.
(Portage version: 2.1.9.50/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra')
-rw-r--r--gnome-extra/libgda/ChangeLog6
-rw-r--r--gnome-extra/libgda/files/libgda-4.2.8-sandbox-fix.patch55
-rw-r--r--gnome-extra/libgda/libgda-4.2.8.ebuild5
3 files changed, 64 insertions, 2 deletions
diff --git a/gnome-extra/libgda/ChangeLog b/gnome-extra/libgda/ChangeLog
index f09ca11c7d70..d79467630348 100644
--- a/gnome-extra/libgda/ChangeLog
+++ b/gnome-extra/libgda/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for gnome-extra/libgda
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/ChangeLog,v 1.167 2011/06/06 14:36:43 angelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/ChangeLog,v 1.168 2011/06/07 08:17:07 pacho Exp $
+
+ 07 Jun 2011; Pacho Ramos <pacho@gentoo.org> libgda-4.2.8.ebuild,
+ +files/libgda-4.2.8-sandbox-fix.patch:
+ Fix sandbox violations with USE doc, bug #370013, upstream #651922.
06 Jun 2011; Christoph Mende <angelos@gentoo.org> libgda-4.2.8.ebuild,
+files/libgda-4.2.8-ldap.patch:
diff --git a/gnome-extra/libgda/files/libgda-4.2.8-sandbox-fix.patch b/gnome-extra/libgda/files/libgda-4.2.8-sandbox-fix.patch
new file mode 100644
index 000000000000..8d24430972d5
--- /dev/null
+++ b/gnome-extra/libgda/files/libgda-4.2.8-sandbox-fix.patch
@@ -0,0 +1,55 @@
+From 9c1a1809650321c3d752a143f87089d325c49237 Mon Sep 17 00:00:00 2001
+From: Vivien Malerba <malerba@gnome-db.org>
+Date: Mon, 06 Jun 2011 18:42:19 +0000
+Subject: Correction for bug #651922 - libgda-4.2.8 wants to write on /etc/libgda-4.0/config during compilation with --enable-gtk-doc
+
+---
+diff --git a/libgda/gda-config.c b/libgda/gda-config.c
+index e1b65c0..e0a51c7 100644
+--- a/libgda/gda-config.c
++++ b/libgda/gda-config.c
+@@ -20,6 +20,7 @@
+ * Boston, MA 02111-1307, USA.
+ */
+
++#include <unistd.h>
+ #include <stdio.h>
+ #include <gmodule.h>
+ #include <libgda/gda-config.h>
+@@ -630,12 +631,34 @@ gda_config_constructor (GType type,
+ LIBGDA_ABI_NAME, "config", NULL);
+ unique_instance->priv->system_config_allowed = FALSE;
+ if (unique_instance->priv->system_file) {
++#ifdef G_OS_WIN32
++
+ FILE *file;
+ file = fopen (unique_instance->priv->system_file, "a"); /* Flawfinder: ignore */
+ if (file) {
+ unique_instance->priv->system_config_allowed = TRUE;
+ fclose (file);
+ }
++#else
++ struct stat stbuf;
++ if (stat (unique_instance->priv->system_file, &stbuf) == 0) {
++ /* use effective user and group IDs */
++ uid_t euid;
++ gid_t egid;
++ euid = geteuid ();
++ egid = getegid ();
++ if (euid == stbuf.st_uid) {
++ if ((stbuf.st_mode & S_IWUSR) && (stbuf.st_mode & S_IRUSR))
++ unique_instance->priv->system_config_allowed = TRUE;
++ }
++ else if (egid == stbuf.st_gid) {
++ if ((stbuf.st_mode & S_IWGRP) && (stbuf.st_mode & S_IRGRP))
++ unique_instance->priv->system_config_allowed = TRUE;
++ }
++ else if ((stbuf.st_mode & S_IWOTH) && (stbuf.st_mode & S_IROTH))
++ unique_instance->priv->system_config_allowed = TRUE;
++ }
++#endif
+ }
+
+ /* Setup file monitoring */
+--
+cgit v0.9
diff --git a/gnome-extra/libgda/libgda-4.2.8.ebuild b/gnome-extra/libgda/libgda-4.2.8.ebuild
index 93d5e61721e5..68e206675e6b 100644
--- a/gnome-extra/libgda/libgda-4.2.8.ebuild
+++ b/gnome-extra/libgda/libgda-4.2.8.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/libgda-4.2.8.ebuild,v 1.2 2011/06/06 14:36:43 angelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/libgda-4.2.8.ebuild,v 1.3 2011/06/07 08:17:07 pacho Exp $
EAPI="4"
GCONF_DEBUG="yes"
@@ -121,6 +121,9 @@ src_prepare() {
# Fix compilation without ldap, bug #370233, upstream #651713
epatch "${FILESDIR}/${P}-ldap.patch"
+ # Fix sandbox violations with USE doc, bug #370013, upstream #651922
+ epatch "${FILESDIR}/${P}-sandbox-fix.patch"
+
intltoolize --force --copy --automake || die
eautoreconf
}