[Midnightbsd-cvs] mports [18108] U trunk/sysutils/consolekit/files/ patch-tools_ck-log-system-start.c: consolekit 0.4.5

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Mar 12 18:48:09 EDT 2015


Revision: 18108
          http://svnweb.midnightbsd.org/mports/?rev=18108
Author:   laffer1
Date:     2015-03-12 18:48:08 -0400 (Thu, 12 Mar 2015)
Log Message:
-----------
consolekit 0.4.5

Modified Paths:
--------------
    trunk/sysutils/consolekit/Makefile
    trunk/sysutils/consolekit/distinfo
    trunk/sysutils/consolekit/files/patch-tools_ck-collect-session-info.c

Added Paths:
-----------
    trunk/sysutils/consolekit/files/patch-src_ck-manager.c
    trunk/sysutils/consolekit/files/patch-tools_ck-history.c

Property Changed:
----------------
    trunk/sysutils/consolekit/files/ck-get-x11-display-device
    trunk/sysutils/consolekit/files/ck-get-x11-server-pid
    trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c
    trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-unix.c
    trunk/sysutils/consolekit/files/patch-src_main.c
    trunk/sysutils/consolekit/files/patch-src_test-vt-monitor.c
    trunk/sysutils/consolekit/files/patch-tools_Makefile.in
    trunk/sysutils/consolekit/files/patch-tools_ck-collect-session-info.c
    trunk/sysutils/consolekit/files/patch-tools_ck-log-system-start.c

Modified: trunk/sysutils/consolekit/Makefile
===================================================================
--- trunk/sysutils/consolekit/Makefile	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/Makefile	2015-03-12 22:48:08 UTC (rev 18108)
@@ -1,8 +1,8 @@
 # $MidnightBSD$
 
 PORTNAME=	consolekit
-PORTVERSION=	0.4.3
-PORTREVISION=	4
+PORTVERSION=	0.4.5
+PORTREVISION=	0
 CATEGORIES=	sysutils gnome
 MASTER_SITES=	http://www.freedesktop.org/software/ConsoleKit/dist/
 DISTFILES=	ConsoleKit-${PORTVERSION}${EXTRACT_SUFX}
@@ -23,6 +23,8 @@
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 CONFIGURE_ARGS=	--with-pid-file=/var/run/${PORTNAME}.pid \
+		--enable-pam-module \
+		--with-pam-module-dir=${PREFIX}/lib \
 		--localstatedir=/var
 INSTALL_TARGET=	install-strip
 

Modified: trunk/sysutils/consolekit/distinfo
===================================================================
--- trunk/sysutils/consolekit/distinfo	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/distinfo	2015-03-12 22:48:08 UTC (rev 18108)
@@ -1,2 +1,2 @@
-SHA256 (ConsoleKit-0.4.3.tar.bz2) = fe02aca2b4c21df59aa5fbe6f28ea3ea4b3c9dd64c48c50634e9a53cf9c0dcc5
-SIZE (ConsoleKit-0.4.3.tar.bz2) = 413205
+SHA256 (ConsoleKit-0.4.5.tar.bz2) = 43e0780c53078e125efcec3f847e484dc3533e49b408ce6a0ab1b223686b9c38
+SIZE (ConsoleKit-0.4.5.tar.bz2) = 425423

Index: trunk/sysutils/consolekit/files/ck-get-x11-display-device
===================================================================
--- trunk/sysutils/consolekit/files/ck-get-x11-display-device	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/ck-get-x11-display-device	2015-03-12 22:48:08 UTC (rev 18108)

Property changes on: trunk/sysutils/consolekit/files/ck-get-x11-display-device
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Index: trunk/sysutils/consolekit/files/ck-get-x11-server-pid
===================================================================
--- trunk/sysutils/consolekit/files/ck-get-x11-server-pid	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/ck-get-x11-server-pid	2015-03-12 22:48:08 UTC (rev 18108)

Property changes on: trunk/sysutils/consolekit/files/ck-get-x11-server-pid
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Added: trunk/sysutils/consolekit/files/patch-src_ck-manager.c
===================================================================
--- trunk/sysutils/consolekit/files/patch-src_ck-manager.c	                        (rev 0)
+++ trunk/sysutils/consolekit/files/patch-src_ck-manager.c	2015-03-12 22:48:08 UTC (rev 18108)
@@ -0,0 +1,186 @@
+$OpenBSD: patch-src_ck-manager_c,v 1.3 2011/04/28 13:08:33 ajacoutot Exp $
+
+XXX revert 4f88228f31a63c026c424a92827f26ad7535275c
+The Kit people assume the world runs Linux and PAM, see
+https://bugs.freedesktop.org/show_bug.cgi?id=28377
+
+--- src/ck-manager.c.orig	Tue Oct 26 16:34:03 2010
++++ src/ck-manager.c	Sat Dec  4 12:18:29 2010
+@@ -1659,175 +1659,13 @@ open_session_for_leader (CkManager             *manage
+         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);
+-        }
+-
++        /* for now don't bother verifying since we protect OpenSessionWithParameters */
+         open_session_for_leader (manager,
+                                  leader,
+                                  parameters,


Property changes on: trunk/sysutils/consolekit/files/patch-src_ck-manager.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c
===================================================================
--- trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c	2015-03-12 22:48:08 UTC (rev 18108)

Property changes on: trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-unix.c
===================================================================
--- trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-unix.c	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-unix.c	2015-03-12 22:48:08 UTC (rev 18108)

Property changes on: trunk/sysutils/consolekit/files/patch-src_ck-sysdeps-unix.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/sysutils/consolekit/files/patch-src_main.c
===================================================================
--- trunk/sysutils/consolekit/files/patch-src_main.c	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/patch-src_main.c	2015-03-12 22:48:08 UTC (rev 18108)

Property changes on: trunk/sysutils/consolekit/files/patch-src_main.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/sysutils/consolekit/files/patch-src_test-vt-monitor.c
===================================================================
--- trunk/sysutils/consolekit/files/patch-src_test-vt-monitor.c	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/patch-src_test-vt-monitor.c	2015-03-12 22:48:08 UTC (rev 18108)

Property changes on: trunk/sysutils/consolekit/files/patch-src_test-vt-monitor.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/sysutils/consolekit/files/patch-tools_Makefile.in
===================================================================
--- trunk/sysutils/consolekit/files/patch-tools_Makefile.in	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/patch-tools_Makefile.in	2015-03-12 22:48:08 UTC (rev 18108)

Property changes on: trunk/sysutils/consolekit/files/patch-tools_Makefile.in
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Modified: trunk/sysutils/consolekit/files/patch-tools_ck-collect-session-info.c
===================================================================
--- trunk/sysutils/consolekit/files/patch-tools_ck-collect-session-info.c	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/patch-tools_ck-collect-session-info.c	2015-03-12 22:48:08 UTC (rev 18108)
@@ -1,5 +1,10 @@
---- tools/ck-collect-session-info.c.orig	2009-04-29 15:07:29.000000000 -0400
-+++ tools/ck-collect-session-info.c	2010-07-12 23:55:13.000000000 -0400
+$OpenBSD: patch-tools_ck-collect-session-info_c,v 1.1 2011/04/28 13:08:33 ajacoutot Exp $
+
+XXX revert 4f88228f31a63c026c424a92827f26ad7535275c
+The Kit people assume the world runs Linux and PAM, see
+https://bugs.freedesktop.org/show_bug.cgi?id=28377
+--- tools/ck-collect-session-info.c.orig	2013-08-10 20:47:52.000000000 +0200
++++ tools/ck-collect-session-info.c	2013-08-10 20:47:33.000000000 +0200
 @@ -226,6 +226,12 @@ fill_x11_info (SessionInfo *si)
          gboolean       res;
          CkProcessStat *xorg_stat;
@@ -13,7 +18,7 @@
  
          /* assume this is true then check it */
          si->x11_display = ck_unix_pid_get_env (si->pid, "DISPLAY");
-@@ -272,6 +278,52 @@ fill_x11_info (SessionInfo *si)
+@@ -272,9 +278,56 @@ fill_x11_info (SessionInfo *si)
          }
  
          si->x11_display_device = ck_process_stat_get_tty (xorg_stat);
@@ -65,11 +70,23 @@
 +gotit:
          ck_process_stat_free (xorg_stat);
  
-         si->is_local = TRUE;
-@@ -410,5 +462,5 @@ main (int    argc,
+-        /* don't set is-local here - let the daemon do that */
++        si->is_local = TRUE;
++        si->is_local_is_set = TRUE;
  
-         ret = collect_session_info (user_id, process_id);
+         g_free (si->remote_host_name);
+         si->remote_host_name = NULL;
+@@ -303,6 +356,13 @@ fill_session_info (SessionInfo *si)
  
--	return ret != TRUE;
-+        return ret != TRUE;
- }
+         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;


Property changes on: trunk/sysutils/consolekit/files/patch-tools_ck-collect-session-info.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Added: trunk/sysutils/consolekit/files/patch-tools_ck-history.c
===================================================================
--- trunk/sysutils/consolekit/files/patch-tools_ck-history.c	                        (rev 0)
+++ trunk/sysutils/consolekit/files/patch-tools_ck-history.c	2015-03-12 22:48:08 UTC (rev 18108)
@@ -0,0 +1,20 @@
+--- tools/ck-history.c.orig	2010-09-03 15:54:31.000000000 +0200
++++ tools/ck-history.c	2013-08-10 20:56:36.000000000 +0200
+@@ -511,7 +511,7 @@
+         char                       *session_type;
+         char                       *session_id;
+         char                       *seat_id;
+-        CkLogSeatSessionAddedEvent *e;
++        CkLogSeatSessionAddedEvent *e = NULL;
+         CkLogEvent                 *remove_event;
+         RecordStatus                status;
+ 
+@@ -804,7 +804,7 @@
+                 data = user_counts->data;
+ 
+                 username = get_user_name_for_uid (data->uid);
+-                g_print ("%-8.8s %u\n", username, data->count);
++                g_print ("%-8s %u\n", username, data->count);
+                 g_free (data);
+                 user_counts = g_list_delete_link (user_counts, user_counts);
+                 g_free (username);


Property changes on: trunk/sysutils/consolekit/files/patch-tools_ck-history.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/sysutils/consolekit/files/patch-tools_ck-log-system-start.c
===================================================================
--- trunk/sysutils/consolekit/files/patch-tools_ck-log-system-start.c	2015-03-12 22:41:32 UTC (rev 18107)
+++ trunk/sysutils/consolekit/files/patch-tools_ck-log-system-start.c	2015-03-12 22:48:08 UTC (rev 18108)

Property changes on: trunk/sysutils/consolekit/files/patch-tools_ck-log-system-start.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list