summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-09-09 21:13:16 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-09-09 21:13:16 +0000
commit8fe2922d46848c451b745d89582059deda35199a (patch)
tree3aeab664fa1c375de5cb7bb414995fdd504e56ad /sys-auth
parentUnmask qbittorrent-2.4.0 (diff)
downloadhistorical-8fe2922d46848c451b745d89582059deda35199a.tar.gz
historical-8fe2922d46848c451b745d89582059deda35199a.tar.bz2
historical-8fe2922d46848c451b745d89582059deda35199a.zip
Revert upstream "Only set sessions to be is-local=true if set by a trusted party" wrt #336634.
Package-Manager: portage-2.2_rc78/cvs/Linux x86_64
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/consolekit/ChangeLog9
-rw-r--r--sys-auth/consolekit/Manifest5
-rw-r--r--sys-auth/consolekit/consolekit-0.4.2-r1.ebuild (renamed from sys-auth/consolekit/consolekit-0.4.2.ebuild)5
-rw-r--r--sys-auth/consolekit/files/consolekit-0.4.2-revert.patch210
4 files changed, 224 insertions, 5 deletions
diff --git a/sys-auth/consolekit/ChangeLog b/sys-auth/consolekit/ChangeLog
index 89bd66bf8b17..5437779dfa20 100644
--- a/sys-auth/consolekit/ChangeLog
+++ b/sys-auth/consolekit/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-auth/consolekit
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/ChangeLog,v 1.75 2010/09/07 14:22:36 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/ChangeLog,v 1.76 2010/09/09 21:13:16 ssuominen Exp $
+
+*consolekit-0.4.2-r1 (09 Sep 2010)
+
+ 09 Sep 2010; Samuli Suominen <ssuominen@gentoo.org>
+ +consolekit-0.4.2-r1.ebuild, +files/consolekit-0.4.2-revert.patch:
+ Revert upstream "Only set sessions to be is-local=true if set by a trusted
+ party" wrt #336634.
*consolekit-0.4.2 (07 Sep 2010)
diff --git a/sys-auth/consolekit/Manifest b/sys-auth/consolekit/Manifest
index f478a8b05011..04b4abcc0e0d 100644
--- a/sys-auth/consolekit/Manifest
+++ b/sys-auth/consolekit/Manifest
@@ -12,6 +12,7 @@ AUX consolekit-0.4.0-polkit-automagic.patch 841 RMD160 59f6f8d13a6f030107908b592
AUX consolekit-0.4.1-nodaemon.patch 394 RMD160 7d04667e5a732766b0b40247b46ba38ec4055642 SHA1 51cc75ed833c758fc6b0efcd01d20280224a34d6 SHA256 d56d55379f22d3bcada56507c196b5c32c81b6cc8de5b5c4bc42ff6e53be2af1
AUX consolekit-0.4.1-reorder-initialization.patch 978 RMD160 718513d80720c0440b32ab2266f1ebface780848 SHA1 bce58460f1b4628aee6cd179615207057ae4ca32 SHA256 247af5462a1572c7ffc5b94c360ff8b9e9b3055f5da972f93fc8ceb230c1c7b4
AUX consolekit-0.4.1-shutdown-reboot-without-policies.patch 1166 RMD160 946969cbc2c86bf81f151cbefae022ea95971a57 SHA1 1db7f74e84146c738d5de4b5f835376a1a394280 SHA256 78e7e3b71c34c9a0b2eef58c55c8ac6e34fd4ee0ddb03d20c9adf138d2dafbc9
+AUX consolekit-0.4.2-revert.patch 7922 RMD160 be17663041306968e37a01fa495c962e79c87221 SHA1 6657e06fba5a36efbfa8bafcdc60383141dc8ff1 SHA256 bddb247c8be45c1e674d3a8990b74bd07ac9ca9656028c49e8fdcde87768e657
AUX pam-foreground-compat.ck 389 RMD160 b72a66d5fde612a825fb60f0f1402a0665cc6d81 SHA1 25c3e54e326606e6c476e0dbb9637e2e551a6ccc SHA256 0b5b22641e2b138f4e9dfff9790df9fedaf2f760cc3d878ee1e94c2fd52edea9
DIST ConsoleKit-0.3.0.tar.bz2 393694 RMD160 7a1ebd2f4bfb65690e70138c9923c3fd2fcaf671 SHA1 e3b6156622cc14ebca7382a55b8ed15f2f2bad98 SHA256 cbcfbb3df2dc76855c99c1cdff04a257ec5270fa62e1d21b0d057b08d88c0fd4
DIST ConsoleKit-0.4.1.tar.bz2 398080 RMD160 800076645134ad63d582ea9ffb3ada0113a32db1 SHA1 ab2b8643c1e696df4dc79d9ee0323bdc95aaa6a1 SHA256 f032adc6146d745034315054c5822a7a09f30e20a40d6e802221fa977354403e
@@ -19,6 +20,6 @@ DIST ConsoleKit-0.4.2.tar.bz2 412651 RMD160 cc76cfb1462a238754c7c1ecd7404a0db26c
EBUILD consolekit-0.3.0-r2.ebuild 3091 RMD160 b7d84d8821230e79b4a2a8da7267cd9c8941fc65 SHA1 b2ec7694f04547c6e57dad483e33d0d44d55cb65 SHA256 02670a963bf9188d307129b31da110686b83f17888188fb41eb17a14a6a47ba1
EBUILD consolekit-0.4.1-r1.ebuild 3094 RMD160 c4b754cf0fc9bb86af6842a7b4f5e431daaeb317 SHA1 ecc4a7b2f617951d369e6921c0f3f4694a32dbdb SHA256 c4c3f82ba600b012e7b4562576d492304a01d913fc565341da5d2a8c837adbb8
EBUILD consolekit-0.4.1.ebuild 2972 RMD160 1648925c2b711cf51bc874774ea7d5ea783ad60e SHA1 5992cd04c68009be7bf90a50e0d1bdb4899efd18 SHA256 79c062a5c916f369cc6d023024a1ee85f8515f7c36ea032d93e10b660bc1097f
-EBUILD consolekit-0.4.2.ebuild 2511 RMD160 fe2b47e3a27e8fa717b0f13b3528397fb7e1d420 SHA1 4f60638d0c9b73e58751463388290531287663d6 SHA256 cc24b349859cacbb83d0e773bd82c559271ddbbc2334820aaddb8225a0b4fa9c
-MISC ChangeLog 11186 RMD160 a2fa8cad1d511ef2f0ad2284e993787f32318d9b SHA1 7858a86ab00895f36b31c786099ff1622534b3ab SHA256 adc6f3bc3a63b5098fc3c8e3b2fa5c8df839c69ffd39386bd89a15f9f064f43c
+EBUILD consolekit-0.4.2-r1.ebuild 2557 RMD160 eb81a92e55110dc564fe523bc803c5b877a7e6b8 SHA1 b2a1f070c9165052ede192cf80b3d2c3e07c5cb6 SHA256 761e746972149273e34f057ef98e1dc58080823e2bb0254c3d7f11c4d86cf82d
+MISC ChangeLog 11445 RMD160 4f3d801646582ff827c8713efab0e90de99736c3 SHA1 3ce6695cae1d7fd937ec6871d3ed32c9b860bebe SHA256 a4c702774e30757da14d9c11c539a07544ddf82d84ff4483ded9f15d49f74a98
MISC metadata.xml 316 RMD160 0d18a4fee930a899bcd1eeff6fc7fe4de491f71b SHA1 0643d12b32e383861623f4f257f9d5b1446a90da SHA256 d026b12ac11b38e175987871769588146cf0c587a1462559cd1581ae05aaa83d
diff --git a/sys-auth/consolekit/consolekit-0.4.2.ebuild b/sys-auth/consolekit/consolekit-0.4.2-r1.ebuild
index bb126cb5b08c..93a222d3d8be 100644
--- a/sys-auth/consolekit/consolekit-0.4.2.ebuild
+++ b/sys-auth/consolekit/consolekit-0.4.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.4.2.ebuild,v 1.2 2010/09/07 14:37:30 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.4.2-r1.ebuild,v 1.1 2010/09/09 21:13:16 ssuominen Exp $
EAPI=3
inherit autotools eutils multilib pam
@@ -36,7 +36,8 @@ src_prepare() {
"${FILESDIR}"/${PN}-0.2.10-cleanup_console_tags.patch \
"${FILESDIR}"/${PN}-0.4.0-polkit-automagic.patch \
"${FILESDIR}"/${PN}-0.4.0-multilib.patch \
- "${FILESDIR}"/${PN}-0.4.1-shutdown-reboot-without-policies.patch
+ "${FILESDIR}"/${PN}-0.4.1-shutdown-reboot-without-policies.patch \
+ "${FILESDIR}"/${PN}-0.4.2-revert.patch
eautoreconf
}
diff --git a/sys-auth/consolekit/files/consolekit-0.4.2-revert.patch b/sys-auth/consolekit/files/consolekit-0.4.2-revert.patch
new file mode 100644
index 000000000000..cb1f461de94c
--- /dev/null
+++ b/sys-auth/consolekit/files/consolekit-0.4.2-revert.patch
@@ -0,0 +1,210 @@
+Revert upstream http://cgit.freedesktop.org/ConsoleKit/commit/?id=4f88228f31a63c026c424a92827f26ad7535275c
+which renders ConsoleKit unusable.
+
+diff -ur ConsoleKit-0.4.2.orig/src/ck-manager.c ConsoleKit-0.4.2/src/ck-manager.c
+--- ConsoleKit-0.4.2.orig/src/ck-manager.c 2010-09-03 16:54:31.000000000 +0300
++++ ConsoleKit-0.4.2/src/ck-manager.c 2010-09-10 00:02:32.000000000 +0300
+@@ -1660,175 +1660,12 @@
+ dbus_g_method_return (context, cookie);
+ }
+
+-enum {
+- PROP_STRING,
+- PROP_BOOLEAN,
+-};
+-
+-#define CK_TYPE_PARAMETER_STRUCT (dbus_g_type_get_struct ("GValueArray", \
+- G_TYPE_STRING, \
+- G_TYPE_VALUE, \
+- G_TYPE_INVALID))
+-
+-static gboolean
+-_get_parameter (GPtrArray *parameters,
+- const char *name,
+- int prop_type,
+- gpointer *value)
+-{
+- gboolean ret;
+- int i;
+-
+- if (parameters == NULL) {
+- return FALSE;
+- }
+-
+- ret = FALSE;
+-
+- for (i = 0; i < parameters->len && ret == FALSE; i++) {
+- gboolean res;
+- GValue val_struct = { 0, };
+- char *prop_name;
+- GValue *prop_val;
+-
+- g_value_init (&val_struct, CK_TYPE_PARAMETER_STRUCT);
+- g_value_set_static_boxed (&val_struct, g_ptr_array_index (parameters, i));
+-
+- res = dbus_g_type_struct_get (&val_struct,
+- 0, &prop_name,
+- 1, &prop_val,
+- G_MAXUINT);
+- if (! res) {
+- g_debug ("Unable to extract parameter input");
+- goto cont;
+- }
+-
+- if (prop_name == NULL) {
+- g_debug ("Skipping NULL parameter");
+- goto cont;
+- }
+-
+- if (strcmp (prop_name, name) != 0) {
+- goto cont;
+- }
+-
+- switch (prop_type) {
+- case PROP_STRING:
+- if (value != NULL) {
+- *value = g_value_dup_string (prop_val);
+- }
+- break;
+- case PROP_BOOLEAN:
+- if (value != NULL) {
+- *(gboolean *)value = g_value_get_boolean (prop_val);
+- }
+- break;
+- default:
+- g_assert_not_reached ();
+- break;
+- }
+-
+- ret = TRUE;
+-
+- cont:
+- g_free (prop_name);
+- if (prop_val != NULL) {
+- g_value_unset (prop_val);
+- g_free (prop_val);
+- }
+- }
+-
+- return ret;
+-}
+-
+-static gboolean
+-_verify_login_session_id_is_local (CkManager *manager,
+- const char *login_session_id)
+-{
+- GHashTableIter iter;
+- const char *id;
+- CkSession *session;
+-
+- g_return_val_if_fail (CK_IS_MANAGER (manager), FALSE);
+-
+- /* If any local session exists for the given login session id
+- then that means a trusted party has vouched for the
+- original login */
+-
+- g_debug ("Looking for local sessions for login-session-id=%s", login_session_id);
+-
+- session = NULL;
+- g_hash_table_iter_init (&iter, manager->priv->sessions);
+- while (g_hash_table_iter_next (&iter, (gpointer *)&id, (gpointer *)&session)) {
+- if (session != NULL) {
+- gboolean is_local;
+- char *sessid;
+-
+- sessid = NULL;
+- g_object_get (session,
+- "login-session-id", &sessid,
+- "is-local", &is_local,
+- NULL);
+- if (g_strcmp0 (sessid, login_session_id) == 0 && is_local) {
+- g_debug ("CkManager: found is-local=true on %s", id);
+- return TRUE;
+- }
+- }
+- }
+-
+- return FALSE;
+-}
+-
+-static void
+-add_param_boolean (GPtrArray *parameters,
+- const char *key,
+- gboolean value)
+-{
+- GValue val = { 0, };
+- GValue param_val = { 0, };
+-
+- g_value_init (&val, G_TYPE_BOOLEAN);
+- g_value_set_boolean (&val, value);
+- g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
+- g_value_take_boxed (&param_val,
+- dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
+- dbus_g_type_struct_set (&param_val,
+- 0, key,
+- 1, &val,
+- G_MAXUINT);
+- g_value_unset (&val);
+-
+- g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
+-}
+-
+ static void
+ verify_and_open_session_for_leader (CkManager *manager,
+ CkSessionLeader *leader,
+- GPtrArray *parameters,
++ const GPtrArray *parameters,
+ DBusGMethodInvocation *context)
+ {
+- /* Only allow a local session if originating from an existing
+- local session. Effectively this means that only trusted
+- parties can create local sessions. */
+-
+- g_debug ("CkManager: verifying session for leader");
+-
+- if (parameters != NULL && ! _get_parameter (parameters, "is-local", PROP_BOOLEAN, NULL)) {
+- gboolean is_local;
+- char *login_session_id;
+-
+- g_debug ("CkManager: is-local has not been set, will inherit from existing login-session-id if available");
+-
+- is_local = FALSE;
+-
+- if (_get_parameter (parameters, "login-session-id", PROP_STRING, (gpointer *) &login_session_id)) {
+- is_local = _verify_login_session_id_is_local (manager, login_session_id);
+- g_debug ("CkManager: found is-local=%s", is_local ? "true" : "false");
+- }
+-
+- add_param_boolean (parameters, "is-local", is_local);
+- }
+-
+ open_session_for_leader (manager,
+ leader,
+ parameters,
+diff -ur ConsoleKit-0.4.2.orig/tools/ck-collect-session-info.c ConsoleKit-0.4.2/tools/ck-collect-session-info.c
+--- ConsoleKit-0.4.2.orig/tools/ck-collect-session-info.c 2010-09-03 16:54:31.000000000 +0300
++++ ConsoleKit-0.4.2/tools/ck-collect-session-info.c 2010-09-10 00:06:30.000000000 +0300
+@@ -274,7 +274,8 @@
+ si->x11_display_device = ck_process_stat_get_tty (xorg_stat);
+ ck_process_stat_free (xorg_stat);
+
+- /* don't set is-local here - let the daemon do that */
++ si->is_local = TRUE;
++ si->is_local_is_set = TRUE;
+
+ g_free (si->remote_host_name);
+ si->remote_host_name = NULL;
+@@ -303,6 +304,13 @@
+
+ fill_x11_info (si);
+
++ if (! si->is_local_is_set) {
++ /* FIXME: how should we set this? */
++ /* non x11 sessions must be local I guess */
++ si->is_local = TRUE;
++ si->is_local_is_set = TRUE;
++ }
++
+ res = ck_unix_pid_get_login_session_id (si->pid, &si->login_session_id);
+ if (! res) {
+ si->login_session_id = NULL;