View | Details | Raw Unified | Return to bug 202269 | Differences between
and this patch

Collapse All | Expand All

(-)MOVED (+1 lines)
Lines 9069-9071 Link Here
9069
math/R-cran-SuppDists||2017-02-08|Has expired: Broken for more than 6 months
9069
math/R-cran-SuppDists||2017-02-08|Has expired: Broken for more than 6 months
9070
devel/py-re2||2017-02-08|Has expired: Broken for more than 6 months
9070
devel/py-re2||2017-02-08|Has expired: Broken for more than 6 months
9071
net-p2p/digitalcoin||2017-02-08|Has expired: Broken for more than 6 months
9071
net-p2p/digitalcoin||2017-02-08|Has expired: Broken for more than 6 months
9072
sysutils/consolekit|sysutils/consolekit2|2017-02-13|Original FSF project no longer maintained, forked
(-)sysutils/Makefile (-1 / +1 lines)
Lines 176-182 Link Here
176
    SUBDIR += conky
176
    SUBDIR += conky
177
    SUBDIR += conky-awesome
177
    SUBDIR += conky-awesome
178
    SUBDIR += consolehm
178
    SUBDIR += consolehm
179
    SUBDIR += consolekit
179
    SUBDIR += consolekit2
180
    SUBDIR += consul
180
    SUBDIR += consul
181
    SUBDIR += consul-alerts
181
    SUBDIR += consul-alerts
182
    SUBDIR += contractor
182
    SUBDIR += contractor
(-)sysutils/consolekit2/Makefile (-16 / +30 lines)
Lines 1-37 Link Here
1
# Created by: FreeBSD GNOME Team <gnome@freebsd.org>
1
# Created by: FreeBSD GNOME Team <gnome@freebsd.org>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	consolekit
4
PORTNAME=	consolekit2
5
PORTVERSION=	0.4.5
5
PORTVERSION=	1.0.2
6
PORTREVISION=	4
7
CATEGORIES=	sysutils gnome
6
CATEGORIES=	sysutils gnome
8
MASTER_SITES=	http://www.freedesktop.org/software/ConsoleKit/dist/
9
DISTFILES=	ConsoleKit-${PORTVERSION}${EXTRACT_SUFX}
10
7
11
MAINTAINER=	gnome@FreeBSD.org
8
MAINTAINER=	gnome@FreeBSD.org
12
COMMENT=	Framework for defining and tracking users
9
COMMENT=	Framework for defining and tracking users
13
10
14
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
11
LICENSE=	GPLv2
12
LICENSE_FILE=	${WRKSRC}/COPYING
13
14
LIB_DEPENDS=	libdbus-1.so:devel/dbus \
15
		libdbus-glib-1.so:devel/dbus-glib \
15
		libpolkit-gobject-1.so:sysutils/polkit
16
		libpolkit-gobject-1.so:sysutils/polkit
16
17
17
WRKSRC=		${WRKDIR}/ConsoleKit-${PORTVERSION}
18
USE_GITHUB=	yes
18
USES=		gettext gmake libtool pathfix pkgconfig tar:bzip2
19
GH_ACCOUNT=	ConsoleKit2
20
GH_PROJECT=	ConsoleKit2
21
22
CONFLICTS_INSTALL=	consolekit-*
23
24
# Include some fixes made to GitHub master since last release
25
PATCHFILES=		9dab562ffd7bd281dfb076f583f99831ebf26fe1.patch \
26
			9d4ea51d480c5271372b688aacbcd17d35f71478.patch \
27
			f9d978fa342c54a327ce169dd6eef426a8d77cee.patch
28
PATCH_SITES=		https://github.com/ConsoleKit2/ConsoleKit2/commit/
29
PATCH_DIST_STRIP=	-p1
30
31
USES=		autoreconf gettext gmake libtool localbase pathfix pkgconfig tar:bzip2
19
USE_XORG=	x11
32
USE_XORG=	x11
33
USE_GNOME=	glib20
20
GNU_CONFIGURE=	yes
34
GNU_CONFIGURE=	yes
21
USE_LDCONFIG=	yes
35
USE_LDCONFIG=	yes
22
CPPFLAGS+=	-I${LOCALBASE}/include
36
LDFLAGS+=	-lprocstat
23
LDFLAGS+=	-L${LOCALBASE}/lib
24
CONFIGURE_ARGS=	--with-pid-file=/var/run/${PORTNAME}.pid \
37
CONFIGURE_ARGS=	--with-pid-file=/var/run/${PORTNAME}.pid \
25
		--enable-pam-module \
38
		--enable-pam-module \
26
		--with-pam-module-dir=${PREFIX}/lib \
39
		--with-pam-module-dir=${PREFIX}/lib \
27
		--localstatedir=/var
40
		--localstatedir=/var \
41
		--enable-polkit \
42
		--disable-udev-acl \
43
		--without-systemdsystemunitdir
28
INSTALL_TARGET=	install-strip
44
INSTALL_TARGET=	install-strip
29
45
30
post-install:
46
post-install:
31
	${INSTALL_SCRIPT} ${FILESDIR}/ck-get-x11-display-device \
47
	${MKDIR} ${STAGEDIR}/var/log/ConsoleKit
32
		${STAGEDIR}${PREFIX}/libexec/ck-get-x11-display-device
48
	${INSTALL_DATA} ${FILESDIR}/50-shutdown.rules \
33
	${INSTALL_SCRIPT} ${FILESDIR}/ck-get-x11-server-pid \
49
		${STAGEDIR}${LOCALBASE}/etc/polkit-1/rules.d
34
		${STAGEDIR}${PREFIX}/libexec/ck-get-x11-server-pid
35
	@${MKDIR} ${STAGEDIR}/var/log/ConsoleKit
36
50
37
.include <bsd.port.mk>
51
.include <bsd.port.mk>
(-)sysutils/consolekit2/distinfo (-2 / +9 lines)
Lines 1-2 Link Here
1
SHA256 (ConsoleKit-0.4.5.tar.bz2) = 43e0780c53078e125efcec3f847e484dc3533e49b408ce6a0ab1b223686b9c38
1
TIMESTAMP = 1486825297
2
SIZE (ConsoleKit-0.4.5.tar.bz2) = 425423
2
SHA256 (ConsoleKit2-ConsoleKit2-1.0.2_GH0.tar.gz) = 2d1e1cae2c88adb15e1628f8172f3ecb0091c051e83c98a1c7a3d350191c3219
3
SIZE (ConsoleKit2-ConsoleKit2-1.0.2_GH0.tar.gz) = 205101
4
SHA256 (9dab562ffd7bd281dfb076f583f99831ebf26fe1.patch) = 92481896b3f4f2a55d7bc1d6b462f7fe8d897e4267d7f913406e9ba9108f9d65
5
SIZE (9dab562ffd7bd281dfb076f583f99831ebf26fe1.patch) = 3383
6
SHA256 (9d4ea51d480c5271372b688aacbcd17d35f71478.patch) = 048e585a76f13091220230067fcde79de5d4baeb9a39579d78874edb834f70ef
7
SIZE (9d4ea51d480c5271372b688aacbcd17d35f71478.patch) = 1618
8
SHA256 (f9d978fa342c54a327ce169dd6eef426a8d77cee.patch) = ea8be2c7bb13ba2fe1eb526247d4d2fb4f8d3aae6963c46a90cfe64c6c8f1e40
9
SIZE (f9d978fa342c54a327ce169dd6eef426a8d77cee.patch) = 1101
(-)sysutils/consolekit2/files/50-shutdown.rules (+9 lines)
Line 0 Link Here
1
polkit.addRule(function (action, subject) {
2
	if ((action.id == "org.freedesktop.consolekit.system.restart" ||
3
	    action.id == "org.freedesktop.consolekit.system.stop" ||
4
	    action.id == "org.freedesktop.consolekit.system.suspend" ||
5
	    action.id == "org.freedesktop.consolekit.system.hibernate") &&
6
	    subject.isInGroup("operator")) {
7
		return polkit.Result.YES;
8
	}
9
});
(-)sysutils/consolekit2/pkg-descr (-5 / +19 lines)
Lines 1-6 Link Here
1
ConsoleKit is a framework for defining and tracking users, login
1
ConsoleKit2 is a framework for defining and tracking users, login
2
sessions, and seats.  The primary motivations for this framework are to
2
sessions, and seats. It allows multiple users to be logged in at the
3
facilitate fast-user-switching and multi-seat capabilities, and to
3
same time and share hardware for their graphical session. ConsoleKit2
4
enable more sophisticated policy decisions for desktop sessions.
4
will keep track of those resources and whichever session is active
5
will have use of the hardware at that time.
5
6
6
WWW: http://www.freedesktop.org/wiki/Software/ConsoleKit
7
What is a seat?
8
===============
9
A seat is a collection of sessions and a set of hardware (usually at
10
least a keyboard and mouse).  Only one session may be active on a
11
seat at a time.
12
13
What is a session?
14
==================
15
A session is a collection of all processes that originate from a single
16
common ancestor and retain knowledge of a secret.  As an implementation
17
detail, this secret may be stored in the process environment by the
18
login manager under the name XDG_SESSION_COOKIE.
19
20
WWW: https://github.com/ConsoleKit2/ConsoleKit2
(-)sysutils/consolekit2/pkg-plist (-9 / +24 lines)
Lines 1-14 Link Here
1
bin/ck-history
1
bin/ck-history
2
bin/ck-launch-session
2
bin/ck-launch-session
3
bin/ck-list-sessions
3
bin/ck-list-sessions
4
sbin/ck-log-system-restart
5
sbin/ck-log-system-start
6
sbin/ck-log-system-stop
7
etc/ConsoleKit/seats.d/00-primary.seat
4
etc/ConsoleKit/seats.d/00-primary.seat
5
etc/X11/xinit/xinitrc.d/90-consolekit
8
etc/dbus-1/system.d/ConsoleKit.conf
6
etc/dbus-1/system.d/ConsoleKit.conf
7
etc/logrotate.d/consolekit
8
etc/polkit-1/rules.d/50-shutdown.rules
9
include/ConsoleKit/ck-connector/ck-connector.h
9
include/ConsoleKit/ck-connector/ck-connector.h
10
lib/ConsoleKit/scripts/ck-get-x11-display-device
11
lib/ConsoleKit/scripts/ck-get-x11-server-pid
12
lib/ConsoleKit/scripts/ck-system-hibernate
13
lib/ConsoleKit/scripts/ck-system-hybridsleep
10
lib/ConsoleKit/scripts/ck-system-restart
14
lib/ConsoleKit/scripts/ck-system-restart
11
lib/ConsoleKit/scripts/ck-system-stop
15
lib/ConsoleKit/scripts/ck-system-stop
16
lib/ConsoleKit/scripts/ck-system-suspend
12
lib/libck-connector.so
17
lib/libck-connector.so
13
lib/libck-connector.so.0
18
lib/libck-connector.so.0
14
lib/libck-connector.so.0.0.0
19
lib/libck-connector.so.0.0.0
Lines 15-35 Link Here
15
lib/pam_ck_connector.so
20
lib/pam_ck_connector.so
16
libdata/pkgconfig/ck-connector.pc
21
libdata/pkgconfig/ck-connector.pc
17
libexec/ck-collect-session-info
22
libexec/ck-collect-session-info
18
libexec/ck-get-x11-display-device
23
@(,,6555) libexec/ck-get-x11-display-device
19
libexec/ck-get-x11-server-pid
24
libexec/ck-get-x11-server-pid
25
man/man1/ck-history.1.gz
26
man/man1/ck-launch-session.1.gz
27
man/man1/ck-list-sessions.1.gz
28
man/man1/console-kit-daemon.1m.gz
20
man/man8/pam_ck_connector.8.gz
29
man/man8/pam_ck_connector.8.gz
30
sbin/ck-log-system-restart
31
sbin/ck-log-system-start
32
sbin/ck-log-system-stop
21
sbin/console-kit-daemon
33
sbin/console-kit-daemon
22
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Manager.xml
34
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Manager.xml
23
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Seat.xml
35
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Seat.xml
24
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Session.xml
36
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Session.xml
25
share/dbus-1/system-services/org.freedesktop.ConsoleKit.service
37
share/dbus-1/system-services/org.freedesktop.ConsoleKit.service
38
share/locale/bg/LC_MESSAGES/ConsoleKit2.mo
39
share/locale/es/LC_MESSAGES/ConsoleKit2.mo
40
share/locale/es_419/LC_MESSAGES/ConsoleKit2.mo
41
share/locale/ru/LC_MESSAGES/ConsoleKit2.mo
26
share/polkit-1/actions/org.freedesktop.consolekit.policy
42
share/polkit-1/actions/org.freedesktop.consolekit.policy
27
@dir /var/run/ConsoleKit
28
@dir /var/log/ConsoleKit
29
@postexec /usr/bin/touch /var/log/ConsoleKit/history
30
@rmtry /var/log/ConsoleKit/history
31
@dir etc/ConsoleKit/run-seat.d
43
@dir etc/ConsoleKit/run-seat.d
32
@dir etc/ConsoleKit/run-session.d
44
@dir etc/ConsoleKit/run-session.d
33
@dir lib/ConsoleKit/run-seat.d
45
@dir lib/ConsoleKit/run-seat.d
34
@dir lib/ConsoleKit/run-session.d
46
@dir lib/ConsoleKit/run-session.d
35
47
@dir /var/log/ConsoleKit
48
@postexec /usr/bin/touch /var/log/ConsoleKit/history
49
@rmtry /var/log/ConsoleKit/history
50
@dir /var/run/ConsoleKit
(-)sysutils/consolekit/Makefile (-37 lines)
Lines 1-37 Link Here
1
# Created by: FreeBSD GNOME Team <gnome@freebsd.org>
2
# $FreeBSD$
3
4
PORTNAME=	consolekit
5
PORTVERSION=	0.4.5
6
PORTREVISION=	4
7
CATEGORIES=	sysutils gnome
8
MASTER_SITES=	http://www.freedesktop.org/software/ConsoleKit/dist/
9
DISTFILES=	ConsoleKit-${PORTVERSION}${EXTRACT_SUFX}
10
11
MAINTAINER=	gnome@FreeBSD.org
12
COMMENT=	Framework for defining and tracking users
13
14
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
15
		libpolkit-gobject-1.so:sysutils/polkit
16
17
WRKSRC=		${WRKDIR}/ConsoleKit-${PORTVERSION}
18
USES=		gettext gmake libtool pathfix pkgconfig tar:bzip2
19
USE_XORG=	x11
20
GNU_CONFIGURE=	yes
21
USE_LDCONFIG=	yes
22
CPPFLAGS+=	-I${LOCALBASE}/include
23
LDFLAGS+=	-L${LOCALBASE}/lib
24
CONFIGURE_ARGS=	--with-pid-file=/var/run/${PORTNAME}.pid \
25
		--enable-pam-module \
26
		--with-pam-module-dir=${PREFIX}/lib \
27
		--localstatedir=/var
28
INSTALL_TARGET=	install-strip
29
30
post-install:
31
	${INSTALL_SCRIPT} ${FILESDIR}/ck-get-x11-display-device \
32
		${STAGEDIR}${PREFIX}/libexec/ck-get-x11-display-device
33
	${INSTALL_SCRIPT} ${FILESDIR}/ck-get-x11-server-pid \
34
		${STAGEDIR}${PREFIX}/libexec/ck-get-x11-server-pid
35
	@${MKDIR} ${STAGEDIR}/var/log/ConsoleKit
36
37
.include <bsd.port.mk>
(-)sysutils/consolekit/distinfo (-2 lines)
Lines 1-2 Link Here
1
SHA256 (ConsoleKit-0.4.5.tar.bz2) = 43e0780c53078e125efcec3f847e484dc3533e49b408ce6a0ab1b223686b9c38
2
SIZE (ConsoleKit-0.4.5.tar.bz2) = 425423
(-)sysutils/consolekit/files/ck-get-x11-display-device (-46 lines)
Lines 1-46 Link Here
1
#!/bin/sh
2
3
FSTAT="/usr/bin/fstat"
4
GREP="/usr/bin/grep"
5
AWK="/usr/bin/awk"
6
SED="/usr/bin/sed"
7
CAT="/bin/cat"
8
9
dispnum=0
10
if [ x"$1" = x"--display" ]; then
11
    if [ $# != 2 ]; then
12
	echo "usage: $0 [--display DISPLAY]"
13
	exit 1
14
    fi
15
    DISPLAY=$2
16
fi
17
if [ ! -z "${DISPLAY}" ]; then
18
    dispnum=$(echo ${DISPLAY} | ${SED} -E -e 's|:([0-9]+).*|\1|')
19
fi
20
21
if [ ! -f "/tmp/.X${dispnum}-lock" ]; then
22
    echo "ERROR: Failed to find X lock file for display ${dispnum}"
23
    exit 1
24
fi
25
pid=$(${CAT} "/tmp/.X${dispnum}-lock")
26
27
device=$(${FSTAT} -p ${pid} | ${GREP} ttyv | ${AWK} '{print $8}')
28
29
if [ -z "${device}" -a -f "/var/log/Xorg.$dispnum.log" ]; then
30
	device=$(awk '/using VT number/ { print "ttyv" ($7 - 1); }' \
31
	    "/var/log/Xorg.$dispnum.log")
32
fi
33
34
if [ -z "${device}" ]; then
35
    echo "ERROR: Failed to find TTY device for X server on display ${dispnum}"
36
    exit 1
37
fi
38
39
ret=""
40
for dev in ${device}; do
41
    if [ "${dev}" \> "${ret}" ]; then
42
	ret=${dev}
43
    fi
44
done
45
46
echo "/dev/${dev}"
(-)sysutils/consolekit/files/ck-get-x11-server-pid (-17 lines)
Lines 1-17 Link Here
1
#!/bin/sh
2
3
SED="/usr/bin/sed"
4
CAT="/bin/cat"
5
6
dispnum=0
7
if [ ! -z "${DISPLAY}" ]; then
8
    dispnum=$(echo ${DISPLAY} | ${SED} -E -e 's|:([0-9]+).*|\1|')
9
fi
10
11
if [ ! -f "/tmp/.X${dispnum}-lock" ]; then
12
    echo "ERROR: Failed to find X lock file for display ${dispnum}"
13
    exit 1
14
fi
15
pid=$(${CAT} "/tmp/.X${dispnum}-lock")
16
17
echo ${pid}
(-)sysutils/consolekit/files/patch-src_ck-manager.c (-186 lines)
Lines 1-186 Link Here
1
$OpenBSD: patch-src_ck-manager_c,v 1.3 2011/04/28 13:08:33 ajacoutot Exp $
2
3
XXX revert 4f88228f31a63c026c424a92827f26ad7535275c
4
The Kit people assume the world runs Linux and PAM, see
5
https://bugs.freedesktop.org/show_bug.cgi?id=28377
6
7
--- src/ck-manager.c.orig	Tue Oct 26 16:34:03 2010
8
+++ src/ck-manager.c	Sat Dec  4 12:18:29 2010
9
@@ -1659,175 +1659,13 @@ open_session_for_leader (CkManager             *manage
10
         dbus_g_method_return (context, cookie);
11
 }
12
 
13
-enum {
14
-        PROP_STRING,
15
-        PROP_BOOLEAN,
16
-};
17
-
18
-#define CK_TYPE_PARAMETER_STRUCT (dbus_g_type_get_struct ("GValueArray", \
19
-                                                          G_TYPE_STRING,  \
20
-                                                          G_TYPE_VALUE, \
21
-                                                          G_TYPE_INVALID))
22
-
23
-static gboolean
24
-_get_parameter (GPtrArray  *parameters,
25
-                const char *name,
26
-                int         prop_type,
27
-                gpointer   *value)
28
-{
29
-        gboolean ret;
30
-        int      i;
31
-
32
-        if (parameters == NULL) {
33
-                return FALSE;
34
-        }
35
-
36
-        ret = FALSE;
37
-
38
-        for (i = 0; i < parameters->len && ret == FALSE; i++) {
39
-                gboolean    res;
40
-                GValue      val_struct = { 0, };
41
-                char       *prop_name;
42
-                GValue     *prop_val;
43
-
44
-                g_value_init (&val_struct, CK_TYPE_PARAMETER_STRUCT);
45
-                g_value_set_static_boxed (&val_struct, g_ptr_array_index (parameters, i));
46
-
47
-                res = dbus_g_type_struct_get (&val_struct,
48
-                                              0, &prop_name,
49
-                                              1, &prop_val,
50
-                                              G_MAXUINT);
51
-                if (! res) {
52
-                        g_debug ("Unable to extract parameter input");
53
-                        goto cont;
54
-                }
55
-
56
-                if (prop_name == NULL) {
57
-                        g_debug ("Skipping NULL parameter");
58
-                        goto cont;
59
-                }
60
-
61
-                if (strcmp (prop_name, name) != 0) {
62
-                        goto cont;
63
-                }
64
-
65
-                switch (prop_type) {
66
-                case PROP_STRING:
67
-                        if (value != NULL) {
68
-                                *value = g_value_dup_string (prop_val);
69
-                        }
70
-                        break;
71
-                case PROP_BOOLEAN:
72
-                        if (value != NULL) {
73
-                                *(gboolean *)value = g_value_get_boolean (prop_val);
74
-                        }
75
-                        break;
76
-                default:
77
-                        g_assert_not_reached ();
78
-                        break;
79
-                }
80
-
81
-                ret = TRUE;
82
-
83
-        cont:
84
-                g_free (prop_name);
85
-                if (prop_val != NULL) {
86
-                        g_value_unset (prop_val);
87
-                        g_free (prop_val);
88
-                }
89
-        }
90
-
91
-        return ret;
92
-}
93
-
94
-static gboolean
95
-_verify_login_session_id_is_local (CkManager  *manager,
96
-                                   const char *login_session_id)
97
-{
98
-        GHashTableIter iter;
99
-        const char    *id;
100
-        CkSession     *session;
101
-
102
-        g_return_val_if_fail (CK_IS_MANAGER (manager), FALSE);
103
-
104
-        /* If any local session exists for the given login session id
105
-           then that means a trusted party has vouched for the
106
-           original login */
107
-
108
-        g_debug ("Looking for local sessions for login-session-id=%s", login_session_id);
109
-
110
-        session = NULL;
111
-        g_hash_table_iter_init (&iter, manager->priv->sessions);
112
-        while (g_hash_table_iter_next (&iter, (gpointer *)&id, (gpointer *)&session)) {
113
-                if (session != NULL) {
114
-                        gboolean is_local;
115
-                        char    *sessid;
116
-
117
-                        sessid = NULL;
118
-                        g_object_get (session,
119
-                                      "login-session-id", &sessid,
120
-                                      "is-local", &is_local,
121
-                                      NULL);
122
-                        if (g_strcmp0 (sessid, login_session_id) == 0 && is_local) {
123
-                                g_debug ("CkManager: found is-local=true on %s", id);
124
-                                return TRUE;
125
-                        }
126
-                }
127
-        }
128
-
129
-        return FALSE;
130
-}
131
-
132
 static void
133
-add_param_boolean (GPtrArray  *parameters,
134
-                   const char *key,
135
-                   gboolean    value)
136
-{
137
-        GValue   val = { 0, };
138
-        GValue   param_val = { 0, };
139
-
140
-        g_value_init (&val, G_TYPE_BOOLEAN);
141
-        g_value_set_boolean (&val, value);
142
-        g_value_init (&param_val, CK_TYPE_PARAMETER_STRUCT);
143
-        g_value_take_boxed (&param_val,
144
-                            dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT));
145
-        dbus_g_type_struct_set (&param_val,
146
-                                0, key,
147
-                                1, &val,
148
-                                G_MAXUINT);
149
-        g_value_unset (&val);
150
-
151
-        g_ptr_array_add (parameters, g_value_get_boxed (&param_val));
152
-}
153
-
154
-static void
155
 verify_and_open_session_for_leader (CkManager             *manager,
156
                                     CkSessionLeader       *leader,
157
-                                    GPtrArray             *parameters,
158
+                                    const GPtrArray       *parameters,
159
                                     DBusGMethodInvocation *context)
160
 {
161
-        /* Only allow a local session if originating from an existing
162
-           local session.  Effectively this means that only trusted
163
-           parties can create local sessions. */
164
-
165
-        g_debug ("CkManager: verifying session for leader");
166
-
167
-        if (parameters != NULL && ! _get_parameter (parameters, "is-local", PROP_BOOLEAN, NULL)) {
168
-                gboolean is_local;
169
-                char    *login_session_id;
170
-
171
-                g_debug ("CkManager: is-local has not been set, will inherit from existing login-session-id if available");
172
-
173
-                is_local = FALSE;
174
-
175
-                if (_get_parameter (parameters, "login-session-id", PROP_STRING, (gpointer *) &login_session_id)) {
176
-                        is_local = _verify_login_session_id_is_local (manager, login_session_id);
177
-                        g_debug ("CkManager: found is-local=%s", is_local ? "true" : "false");
178
-                }
179
-
180
-                add_param_boolean (parameters, "is-local", is_local);
181
-        }
182
-
183
+        /* for now don't bother verifying since we protect OpenSessionWithParameters */
184
         open_session_for_leader (manager,
185
                                  leader,
186
                                  parameters,
(-)sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c (-208 lines)
Lines 1-208 Link Here
1
--- src/ck-sysdeps-freebsd.c.orig	2010-09-03 15:54:31.000000000 +0200
2
+++ src/ck-sysdeps-freebsd.c	2015-03-23 09:28:20.476513000 +0100
3
@@ -27,6 +27,7 @@
4
 #include <unistd.h>
5
 #include <string.h>
6
 #include <errno.h>
7
+#include <glob.h>
8
 #include <paths.h>
9
 #include <ttyent.h>
10
 #include <kvm.h>
11
@@ -202,7 +203,6 @@ ck_process_stat_new_for_unix_pid (pid_t 
12
                                   GError        **error)
13
 {
14
         gboolean       res;
15
-        GError        *local_error;
16
         CkProcessStat *proc;
17
 
18
         g_return_val_if_fail (pid > 1, FALSE);
19
@@ -217,7 +217,6 @@ ck_process_stat_new_for_unix_pid (pid_t 
20
         if (res) {
21
                 *stat = proc;
22
         } else {
23
-                g_propagate_error (error, local_error);
24
                 *stat = NULL;
25
         }
26
 
27
@@ -233,24 +232,28 @@ ck_process_stat_free (CkProcessStat *sta
28
 GHashTable *
29
 ck_unix_pid_get_env_hash (pid_t pid)
30
 {
31
-        GHashTable       *hash;
32
+        GHashTable       *hash = NULL;
33
         char            **penv;
34
+        char              errbuf[_POSIX2_LINE_MAX];
35
         kvm_t            *kd;
36
         struct kinfo_proc p;
37
         int               i;
38
 
39
-        kd = kvm_openfiles (_PATH_DEVNULL, _PATH_DEVNULL, NULL, O_RDONLY, NULL);
40
+        kd = kvm_openfiles (_PATH_DEVNULL, _PATH_DEVNULL, NULL, O_RDONLY, errbuf);
41
         if (kd == NULL) {
42
+                g_warning ("kvm_openfiles failed: %s", errbuf);
43
                 return NULL;
44
         }
45
 
46
         if (! get_kinfo_proc (pid, &p)) {
47
-                return NULL;
48
+                g_warning ("get_kinfo_proc failed: %s", g_strerror (errno));
49
+                goto fail;
50
         }
51
 
52
         penv = kvm_getenvv (kd, &p, 0);
53
         if (penv == NULL) {
54
-                return NULL;
55
+                g_warning ("kvm_getenvv failed: %s", kvm_geterr (kd));
56
+                goto fail;
57
         }
58
 
59
         hash = g_hash_table_new_full (g_str_hash,
60
@@ -261,6 +264,9 @@ ck_unix_pid_get_env_hash (pid_t pid)
61
         for (i = 0; penv[i] != NULL; i++) {
62
                 char **vals;
63
 
64
+	        if (!penv[i][0])
65
+	                continue;
66
+
67
                 vals = g_strsplit (penv[i], "=", 2);
68
                 if (vals != NULL) {
69
                         g_hash_table_insert (hash,
70
@@ -270,6 +276,7 @@ ck_unix_pid_get_env_hash (pid_t pid)
71
                 }
72
         }
73
 
74
+fail:
75
         kvm_close (kd);
76
 
77
         return hash;
78
@@ -280,7 +287,7 @@ ck_unix_pid_get_env (pid_t       pid,
79
                      const char *var)
80
 {
81
         GHashTable *hash;
82
-        char       *val;
83
+        char       *val = NULL;
84
 
85
         /*
86
          * Would probably be more efficient to just loop through the
87
@@ -288,6 +295,8 @@ ck_unix_pid_get_env (pid_t       pid,
88
          * table, but this works for now.
89
          */
90
         hash = ck_unix_pid_get_env_hash (pid);
91
+        if (hash == NULL)
92
+                return val;
93
         val  = g_strdup (g_hash_table_lookup (hash, var));
94
         g_hash_table_destroy (hash);
95
 
96
@@ -327,38 +336,38 @@ gboolean
97
 ck_get_max_num_consoles (guint *num)
98
 {
99
         int      max_consoles;
100
-        int      res;
101
-        gboolean ret;
102
-        struct ttyent *t;
103
+        int      i;
104
+        glob_t   g;
105
 
106
-        ret = FALSE;
107
         max_consoles = 0;
108
 
109
-        res = setttyent ();
110
-        if (res == 0) {
111
-                goto done;
112
-        }
113
+        g.gl_offs = 0;
114
+        glob ("/dev/ttyv*", GLOB_DOOFFS | GLOB_NOSORT, NULL, &g);
115
+        for (i = 0; i < g.gl_pathc && g.gl_pathv[i] != NULL; i++) {
116
+                struct stat sb;
117
+                char *cdev;
118
 
119
-        while ((t = getttyent ()) != NULL) {
120
-                if (t->ty_status & TTY_ON && strncmp (t->ty_name, "ttyv", 4) == 0)
121
+                cdev = g.gl_pathv[i];
122
+                if (stat (cdev, &sb) > -1 && S_ISCHR (sb.st_mode)) {
123
                         max_consoles++;
124
+                } else {
125
+                        break;
126
+                }
127
         }
128
 
129
-        /* Increment one more so that all consoles are properly counted
130
+        globfree (&g);
131
+
132
+        /*
133
+         * Increment one more so that all consoles are properly counted
134
          * this is arguable a bug in vt_add_watches().
135
          */
136
         max_consoles++;
137
 
138
-        ret = TRUE;
139
-
140
-        endttyent ();
141
-
142
-done:
143
         if (num != NULL) {
144
                 *num = max_consoles;
145
         }
146
 
147
-        return ret;
148
+        return TRUE;
149
 }
150
 
151
 gboolean
152
@@ -375,7 +384,12 @@ ck_get_console_device_for_num (guint num
153
         /* The device number is always one less than the VT number. */
154
         num--;
155
 
156
-        device = g_strdup_printf ("/dev/ttyv%u", num);
157
+        if (num < 10)
158
+                device = g_strdup_printf ("/dev/ttyv%i", num);
159
+        else if (num < 32)
160
+                device = g_strdup_printf ("/dev/ttyv%c", num - 10 + 'a');
161
+        else
162
+                device = NULL;
163
 
164
         return device;
165
 }
166
@@ -385,6 +399,7 @@ ck_get_console_num_from_device (const ch
167
                                 guint      *num)
168
 {
169
         guint    n;
170
+        char     c;
171
         gboolean ret;
172
 
173
         n = 0;
174
@@ -394,7 +409,11 @@ ck_get_console_num_from_device (const ch
175
                 return FALSE;
176
         }
177
 
178
-        if (sscanf (device, "/dev/ttyv%u", &n) == 1) {
179
+        if (sscanf (device, "/dev/ttyv%c", &c) == 1) {
180
+                if (c < 58)
181
+                        n = c - 48;
182
+                else
183
+                        n = c - 'a' + 10;
184
                 /* The VT number is always one more than the device number. */
185
                 n++;
186
                 ret = TRUE;
187
@@ -414,6 +433,7 @@ ck_get_active_console_num (int    consol
188
         gboolean ret;
189
         int      res;
190
         int      active;
191
+        char      ttyn;
192
 
193
         g_assert (console_fd != -1);
194
 
195
@@ -426,7 +446,12 @@ ck_get_active_console_num (int    consol
196
                 goto out;
197
         }
198
 
199
-        g_debug ("Active VT is: %d (ttyv%d)", active, active - 1);
200
+        if (active - 1 < 10)
201
+                ttyn = active - 1 + '0';
202
+        else
203
+                ttyn = active - 11 + 'a';
204
+
205
+        g_debug ("Active VT is: %d (ttyv%c)", active, ttyn);
206
         ret = TRUE;
207
 
208
  out:
(-)sysutils/consolekit/files/patch-src_ck-sysdeps-unix.c (-18 lines)
Lines 1-18 Link Here
1
--- src/ck-sysdeps-unix.c.orig	2008-02-06 22:59:55.000000000 -0500
2
+++ src/ck-sysdeps-unix.c	2008-02-06 22:52:34.000000000 -0500
3
@@ -172,6 +172,15 @@ ck_get_a_console_fd (void)
4
 
5
         fd = -1;
6
 
7
+#ifdef __FreeBSD__
8
+	/* On FreeBSD, try /dev/consolectl first as this will survive
9
+	 * /etc/ttys initialization. */
10
+	fd = open_a_console ("/dev/consolectl");
11
+	if (fd >= 0) {
12
+		goto done;
13
+	}
14
+#endif
15
+
16
 #ifdef __sun
17
         /* On Solaris, first try Sun VT device. */
18
         fd = open_a_console ("/dev/vt/active");
(-)sysutils/consolekit/files/patch-src_main.c (-33 lines)
Lines 1-33 Link Here
1
--- src/main.c.orig        2007-11-08 15:05:55.000000000 -0500
2
+++ src/main.c        2007-11-08 15:07:39.000000000 -0500
3
@@ -226,6 +226,21 @@ sigusr1_handler (int sig)
4
 }
5
 
6
 static void
7
+setup_termination_signals (void)
8
+{
9
+        struct sigaction sa;
10
+
11
+        sa.sa_handler = SIG_DFL;
12
+        sigemptyset (&sa.sa_mask);
13
+        sa.sa_flags = 0;
14
+
15
+        sigaction (SIGTERM, &sa, NULL);
16
+        sigaction (SIGQUIT, &sa, NULL);
17
+        sigaction (SIGINT, &sa, NULL);
18
+        sigaction (SIGHUP, &sa, NULL);
19
+}
20
+
21
+static void
22
 setup_debug_log_signals (void)
23
 {
24
         struct sigaction sa;
25
@@ -300,6 +315,8 @@ main (int    argc,
26
 
27
         setup_debug_log (debug);
28
 
29
+        setup_termination_signals ();
30
+
31
         connection = get_system_bus ();
32
         if (connection == NULL) {
33
                 goto out;
(-)sysutils/consolekit/files/patch-src_test-vt-monitor.c (-33 lines)
Lines 1-33 Link Here
1
--- src/test-vt-monitor.c.orig	2007-08-17 13:08:55.000000000 -0400
2
+++ src/test-vt-monitor.c	2007-11-08 15:11:37.000000000 -0500
3
@@ -31,6 +31,7 @@
4
 #include <pwd.h>
5
 #include <string.h>
6
 #include <errno.h>
7
+#include <signal.h>
8
 
9
 #include <locale.h>
10
 
11
@@ -55,12 +56,22 @@ main (int argc, char **argv)
12
         GError           *error;
13
         guint             num;
14
         gboolean          res;
15
+	struct sigaction  sa;
16
 
17
         if (! g_thread_supported ()) {
18
                 g_thread_init (NULL);
19
         }
20
         g_type_init ();
21
 
22
+	sa.sa_handler = SIG_DFL;
23
+	sigemptyset (&sa.sa_mask);
24
+	sa.sa_flags = 0;
25
+
26
+	sigaction (SIGINT,  &sa, NULL);
27
+	sigaction (SIGTERM, &sa, NULL);
28
+	sigaction (SIGQUIT, &sa, NULL);
29
+	sigaction (SIGHUP,  &sa, NULL);
30
+
31
         if (! ck_is_root_user ()) {
32
                 g_warning ("Must be run as root");
33
                 exit (1);
(-)sysutils/consolekit/files/patch-tools_Makefile.in (-77 lines)
Lines 1-77 Link Here
1
--- tools/Makefile.in.orig	2010-10-23 11:29:43.000000000 +0200
2
+++ tools/Makefile.in	2010-10-23 11:32:41.000000000 +0200
3
@@ -43,8 +43,7 @@ sbin_PROGRAMS = ck-log-system-start$(EXE
4
 	ck-log-system-restart$(EXEEXT) ck-log-system-stop$(EXEEXT) \
5
 	$(am__EXEEXT_1)
6
 libexec_PROGRAMS = ck-collect-session-info$(EXEEXT) \
7
-	ck-get-x11-server-pid$(EXEEXT) \
8
-	ck-get-x11-display-device$(EXEEXT) $(am__EXEEXT_1)
9
+	$(am__EXEEXT_1)
10
 subdir = tools
11
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
12
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
13
@@ -71,17 +70,6 @@ ck_collect_session_info_DEPENDENCIES = $
14
 AM_V_lt = $(am__v_lt_$(V))
15
 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
16
 am__v_lt_0 = --silent
17
-am_ck_get_x11_display_device_OBJECTS =  \
18
-	ck-get-x11-display-device.$(OBJEXT) $(am__objects_1)
19
-ck_get_x11_display_device_OBJECTS =  \
20
-	$(am_ck_get_x11_display_device_OBJECTS)
21
-ck_get_x11_display_device_DEPENDENCIES = $(am__DEPENDENCIES_1) \
22
-	$(top_builddir)/src/libck.la $(am__DEPENDENCIES_1)
23
-am_ck_get_x11_server_pid_OBJECTS = ck-get-x11-server-pid.$(OBJEXT) \
24
-	$(am__objects_1)
25
-ck_get_x11_server_pid_OBJECTS = $(am_ck_get_x11_server_pid_OBJECTS)
26
-ck_get_x11_server_pid_DEPENDENCIES = $(am__DEPENDENCIES_1) \
27
-	$(top_builddir)/src/libck.la $(am__DEPENDENCIES_1)
28
 am_ck_history_OBJECTS = ck-history.$(OBJEXT) $(am__objects_1)
29
 ck_history_OBJECTS = $(am_ck_history_OBJECTS)
30
 ck_history_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
31
@@ -441,24 +429,6 @@ ck_collect_session_info_LDADD = \
32
 	$(top_builddir)/src/libck.la	\
33
 	$(NULL)
34
 
35
-ck_get_x11_server_pid_SOURCES = \
36
-	ck-get-x11-server-pid.c		\
37
-	$(NULL)
38
-
39
-ck_get_x11_server_pid_LDADD = \
40
-	$(TOOLS_LIBS)			\
41
-	$(top_builddir)/src/libck.la	\
42
-	$(NULL)
43
-
44
-ck_get_x11_display_device_SOURCES = \
45
-	ck-get-x11-display-device.c	\
46
-	$(NULL)
47
-
48
-ck_get_x11_display_device_LDADD = \
49
-	$(TOOLS_LIBS)			\
50
-	$(top_builddir)/src/libck.la	\
51
-	$(NULL)
52
-
53
 EXTRA_DIST = \
54
 	$(NULL)
55
 
56
@@ -632,12 +602,6 @@ clean-sbinPROGRAMS:
57
 ck-collect-session-info$(EXEEXT): $(ck_collect_session_info_OBJECTS) $(ck_collect_session_info_DEPENDENCIES) 
58
 	@rm -f ck-collect-session-info$(EXEEXT)
59
 	$(AM_V_CCLD)$(LINK) $(ck_collect_session_info_OBJECTS) $(ck_collect_session_info_LDADD) $(LIBS)
60
-ck-get-x11-display-device$(EXEEXT): $(ck_get_x11_display_device_OBJECTS) $(ck_get_x11_display_device_DEPENDENCIES) 
61
-	@rm -f ck-get-x11-display-device$(EXEEXT)
62
-	$(AM_V_CCLD)$(LINK) $(ck_get_x11_display_device_OBJECTS) $(ck_get_x11_display_device_LDADD) $(LIBS)
63
-ck-get-x11-server-pid$(EXEEXT): $(ck_get_x11_server_pid_OBJECTS) $(ck_get_x11_server_pid_DEPENDENCIES) 
64
-	@rm -f ck-get-x11-server-pid$(EXEEXT)
65
-	$(AM_V_CCLD)$(LINK) $(ck_get_x11_server_pid_OBJECTS) $(ck_get_x11_server_pid_LDADD) $(LIBS)
66
 ck-history$(EXEEXT): $(ck_history_OBJECTS) $(ck_history_DEPENDENCIES) 
67
 	@rm -f ck-history$(EXEEXT)
68
 	$(AM_V_CCLD)$(LINK) $(ck_history_OBJECTS) $(ck_history_LDADD) $(LIBS)
69
@@ -664,8 +628,6 @@ distclean-compile:
70
 	-rm -f *.tab.c
71
 
72
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-collect-session-info.Po@am__quote@
73
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-get-x11-display-device.Po@am__quote@
74
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-get-x11-server-pid.Po@am__quote@
75
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-history.Po@am__quote@
76
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-launch-session.Po@am__quote@
77
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-log-system-restart.Po@am__quote@
(-)sysutils/consolekit/files/patch-tools_ck-collect-session-info.c (-92 lines)
Lines 1-92 Link Here
1
$OpenBSD: patch-tools_ck-collect-session-info_c,v 1.1 2011/04/28 13:08:33 ajacoutot Exp $
2
3
XXX revert 4f88228f31a63c026c424a92827f26ad7535275c
4
The Kit people assume the world runs Linux and PAM, see
5
https://bugs.freedesktop.org/show_bug.cgi?id=28377
6
--- tools/ck-collect-session-info.c.orig	2013-08-10 20:47:52.000000000 +0200
7
+++ tools/ck-collect-session-info.c	2013-08-10 20:47:33.000000000 +0200
8
@@ -226,6 +226,12 @@ fill_x11_info (SessionInfo *si)
9
         gboolean       res;
10
         CkProcessStat *xorg_stat;
11
         GError        *error;
12
+        char          *err;
13
+        char          *out;
14
+        int            status;
15
+        int            i;
16
+        char          *argv[4];
17
+        GPtrArray     *env;
18
 
19
         /* assume this is true then check it */
20
         si->x11_display = ck_unix_pid_get_env (si->pid, "DISPLAY");
21
@@ -272,9 +278,56 @@ fill_x11_info (SessionInfo *si)
22
         }
23
 
24
         si->x11_display_device = ck_process_stat_get_tty (xorg_stat);
25
+        if (g_strcmp0 (si->x11_display_device, si->display_device) != 0) {
26
+                goto gotit;
27
+        }
28
+
29
+        g_free (si->x11_display_device);
30
+
31
+        /* get the applicable environment */
32
+        env = get_filtered_environment (si->pid);
33
+
34
+        argv[0] = LIBEXECDIR "/ck-get-x11-display-device";
35
+        argv[1] = NULL;
36
+
37
+        error = NULL;
38
+        out = NULL;
39
+        err = NULL;
40
+        status = -1;
41
+        res = g_spawn_sync (NULL,
42
+                            argv,
43
+                            (char **)env->pdata,
44
+                            0,
45
+                            (GSpawnChildSetupFunc)setuid_child_setup_func,
46
+                            si,
47
+                            &out,
48
+                            &err,
49
+                            &status,
50
+                            &error);
51
+        for (i = 0; i < env->len; i++) {
52
+                g_free (g_ptr_array_index (env, i));
53
+        }
54
+        g_ptr_array_free (env, TRUE);
55
+
56
+        if (error != NULL) {
57
+                g_warning ("Unable to get display device for x11 server: %s", error->message);
58
+                g_error_free (error);
59
+        }
60
+
61
+        if (status == 0) {
62
+                if (res && out != NULL) {
63
+                        si->x11_display_device = g_strstrip (out);
64
+                        goto gotit;
65
+                }
66
+        }
67
+
68
+        si->x11_display_device = ck_process_stat_get_tty (xorg_stat);
69
+
70
+gotit:
71
         ck_process_stat_free (xorg_stat);
72
 
73
-        /* don't set is-local here - let the daemon do that */
74
+        si->is_local = TRUE;
75
+        si->is_local_is_set = TRUE;
76
 
77
         g_free (si->remote_host_name);
78
         si->remote_host_name = NULL;
79
@@ -303,6 +356,13 @@ fill_session_info (SessionInfo *si)
80
 
81
         fill_x11_info (si);
82
 
83
+        if (! si->is_local_is_set) {
84
+                /* FIXME: how should we set this? */
85
+                /* non x11 sessions must be local I guess */
86
+                si->is_local = TRUE;
87
+                si->is_local_is_set = TRUE;
88
+        }
89
+
90
         res = ck_unix_pid_get_login_session_id (si->pid, &si->login_session_id);
91
         if (! res) {
92
                 si->login_session_id = NULL;
(-)sysutils/consolekit/files/patch-tools_ck-history.c (-20 lines)
Lines 1-20 Link Here
1
--- tools/ck-history.c.orig	2010-09-03 15:54:31.000000000 +0200
2
+++ tools/ck-history.c	2013-08-10 20:56:36.000000000 +0200
3
@@ -511,7 +511,7 @@
4
         char                       *session_type;
5
         char                       *session_id;
6
         char                       *seat_id;
7
-        CkLogSeatSessionAddedEvent *e;
8
+        CkLogSeatSessionAddedEvent *e = NULL;
9
         CkLogEvent                 *remove_event;
10
         RecordStatus                status;
11
 
12
@@ -804,7 +804,7 @@
13
                 data = user_counts->data;
14
 
15
                 username = get_user_name_for_uid (data->uid);
16
-                g_print ("%-8.8s %u\n", username, data->count);
17
+                g_print ("%-8s %u\n", username, data->count);
18
                 g_free (data);
19
                 user_counts = g_list_delete_link (user_counts, user_counts);
20
                 g_free (username);
(-)sysutils/consolekit/files/patch-tools_ck-log-system-start.c (-60 lines)
Lines 1-60 Link Here
1
--- tools/ck-log-system-start.c.orig	2009-09-14 20:08:10.000000000 -0400
2
+++ tools/ck-log-system-start.c	2009-09-26 01:35:37.000000000 -0400
3
@@ -26,6 +26,9 @@
4
 #include <unistd.h>
5
 #include <errno.h>
6
 #include <fcntl.h>
7
+#ifdef __FreeBSD__
8
+#include <kenv.h>
9
+#endif
10
 #include <sys/types.h>
11
 #include <sys/stat.h>
12
 #include <sys/utsname.h>
13
@@ -41,7 +44,9 @@
14
 
15
 #define DEFAULT_LOG_FILENAME LOCALSTATEDIR "/log/ConsoleKit/history"
16
 
17
+#ifdef __linux__
18
 #define LINUX_KERNEL_CMDLINE "/proc/cmdline"
19
+#endif
20
 
21
 /* Adapted from auditd auditd-event.c */
22
 static gboolean
23
@@ -162,6 +167,7 @@ write_log_for_event (CkLogEvent *event)
24
 static char *
25
 get_boot_arguments (void)
26
 {
27
+#if defined(__linux__)
28
         char *contents;
29
         gboolean res;
30
 
31
@@ -178,6 +184,29 @@ get_boot_arguments (void)
32
         }
33
 
34
         return contents;
35
+#elif defined(__FreeBSD__)
36
+        char kern_name[1024], root[1024], mopts[1024];
37
+        char *options;
38
+
39
+        options = NULL;
40
+        if (kenv(KENV_GET, "kernelname", kern_name, sizeof (kern_name)) == -1) {
41
+                return options;
42
+        }
43
+
44
+        if (kenv(KENV_GET, "vfs.root.mountfrom.options", mopts, sizeof (mopts)) == -1) {
45
+                g_strlcpy (mopts, "ro", sizeof (mopts));
46
+        }
47
+
48
+        if (kenv(KENV_GET, "vfs.root.mountfrom", root, sizeof (root)) == -1) {
49
+                g_strlcpy (root, "/", sizeof (root));
50
+        }
51
+
52
+        options = g_strdup_printf ("%s %s root=%s", mopts, kern_name, root);
53
+
54
+        return options;
55
+#else
56
+        return NULL;
57
+#endif
58
 }
59
 
60
 int
(-)sysutils/consolekit/pkg-descr (-6 lines)
Lines 1-6 Link Here
1
ConsoleKit is a framework for defining and tracking users, login
2
sessions, and seats.  The primary motivations for this framework are to
3
facilitate fast-user-switching and multi-seat capabilities, and to
4
enable more sophisticated policy decisions for desktop sessions.
5
6
WWW: http://www.freedesktop.org/wiki/Software/ConsoleKit
(-)sysutils/consolekit/pkg-plist (-35 lines)
Lines 1-35 Link Here
1
bin/ck-history
2
bin/ck-launch-session
3
bin/ck-list-sessions
4
sbin/ck-log-system-restart
5
sbin/ck-log-system-start
6
sbin/ck-log-system-stop
7
etc/ConsoleKit/seats.d/00-primary.seat
8
etc/dbus-1/system.d/ConsoleKit.conf
9
include/ConsoleKit/ck-connector/ck-connector.h
10
lib/ConsoleKit/scripts/ck-system-restart
11
lib/ConsoleKit/scripts/ck-system-stop
12
lib/libck-connector.so
13
lib/libck-connector.so.0
14
lib/libck-connector.so.0.0.0
15
lib/pam_ck_connector.so
16
libdata/pkgconfig/ck-connector.pc
17
libexec/ck-collect-session-info
18
libexec/ck-get-x11-display-device
19
libexec/ck-get-x11-server-pid
20
man/man8/pam_ck_connector.8.gz
21
sbin/console-kit-daemon
22
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Manager.xml
23
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Seat.xml
24
share/dbus-1/interfaces/org.freedesktop.ConsoleKit.Session.xml
25
share/dbus-1/system-services/org.freedesktop.ConsoleKit.service
26
share/polkit-1/actions/org.freedesktop.consolekit.policy
27
@dir /var/run/ConsoleKit
28
@dir /var/log/ConsoleKit
29
@postexec /usr/bin/touch /var/log/ConsoleKit/history
30
@rmtry /var/log/ConsoleKit/history
31
@dir etc/ConsoleKit/run-seat.d
32
@dir etc/ConsoleKit/run-session.d
33
@dir lib/ConsoleKit/run-seat.d
34
@dir lib/ConsoleKit/run-session.d
35
(-)audio/pulseaudio/Makefile (-1 / +2 lines)
Lines 6-11 Link Here
6
6
7
PORTNAME=	pulseaudio
7
PORTNAME=	pulseaudio
8
PORTVERSION=	10.0
8
PORTVERSION=	10.0
9
PORTREVISION=	1
9
CATEGORIES=	audio
10
CATEGORIES=	audio
10
MASTER_SITES=	http://freedesktop.org/software/pulseaudio/releases/
11
MASTER_SITES=	http://freedesktop.org/software/pulseaudio/releases/
11
12
Lines 20-26 Link Here
20
		libfftw3f.so:math/fftw3-float \
21
		libfftw3f.so:math/fftw3-float \
21
		libdbus-1.so:devel/dbus \
22
		libdbus-1.so:devel/dbus \
22
		libltdl.so:devel/libltdl \
23
		libltdl.so:devel/libltdl \
23
		libck-connector.so:sysutils/consolekit
24
		libck-connector.so:sysutils/consolekit2
24
25
25
USE_GNOME=	glib20 intltool
26
USE_GNOME=	glib20 intltool
26
USE_XORG=	ice sm x11 xcb xtst
27
USE_XORG=	ice sm x11 xcb xtst
(-)ports-mgmt/packagekit/Makefile (-2 / +2 lines)
Lines 4-10 Link Here
4
4
5
PORTNAME=	PackageKit
5
PORTNAME=	PackageKit
6
PORTVERSION=	0.6.11
6
PORTVERSION=	0.6.11
7
PORTREVISION?=	8
7
PORTREVISION?=	9
8
CATEGORIES=	ports-mgmt sysutils
8
CATEGORIES=	ports-mgmt sysutils
9
MASTER_SITES=	http://www.packagekit.org/releases/
9
MASTER_SITES=	http://www.packagekit.org/releases/
10
10
Lines 14-20 Link Here
14
BUILD_DEPENDS=	${LOCALBASE}/bin/docbook2man:textproc/docbook-utils
14
BUILD_DEPENDS=	${LOCALBASE}/bin/docbook2man:textproc/docbook-utils
15
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
15
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
16
		libpolkit-gobject-1.so:sysutils/polkit \
16
		libpolkit-gobject-1.so:sysutils/polkit \
17
		libck-connector.so:sysutils/consolekit
17
		libck-connector.so:sysutils/consolekit2
18
RUN_DEPENDS=	lsof:sysutils/lsof \
18
RUN_DEPENDS=	lsof:sysutils/lsof \
19
		bash:shells/bash
19
		bash:shells/bash
20
20
(-)sysutils/hal/Makefile (-2 / +2 lines)
Lines 4-10 Link Here
4
4
5
PORTNAME=	hal
5
PORTNAME=	hal
6
DISTVERSION=	0.5.14
6
DISTVERSION=	0.5.14
7
PORTREVISION=	31
7
PORTREVISION=	32
8
CATEGORIES=	sysutils
8
CATEGORIES=	sysutils
9
MASTER_SITES=	http://hal.freedesktop.org/releases/
9
MASTER_SITES=	http://hal.freedesktop.org/releases/
10
10
Lines 15-21 Link Here
15
# keep shlib version, to prevent confusion with polkit-* from sysutils/polkit
15
# keep shlib version, to prevent confusion with polkit-* from sysutils/polkit
16
LIB_DEPENDS=	libpolkit.so.2:sysutils/policykit \
16
LIB_DEPENDS=	libpolkit.so.2:sysutils/policykit \
17
		libvolume_id.so:devel/libvolume_id \
17
		libvolume_id.so:devel/libvolume_id \
18
		libck-connector.so:sysutils/consolekit
18
		libck-connector.so:sysutils/consolekit2
19
RUN_DEPENDS=	${LOCALBASE}/share/pciids/pci.ids:misc/pciids
19
RUN_DEPENDS=	${LOCALBASE}/share/pciids/pci.ids:misc/pciids
20
20
21
USES=		gettext gmake libtool:keepla pathfix pkgconfig python shebangfix
21
USES=		gettext gmake libtool:keepla pathfix pkgconfig python shebangfix
(-)www/gnome-user-share/Makefile (-2 / +2 lines)
Lines 4-10 Link Here
4
4
5
PORTNAME=	gnome-user-share
5
PORTNAME=	gnome-user-share
6
PORTVERSION=	3.14.0
6
PORTVERSION=	3.14.0
7
PORTREVISION=	1
7
PORTREVISION=	2
8
CATEGORIES=	www deskutils gnome
8
CATEGORIES=	www deskutils gnome
9
MASTER_SITES=	GNOME
9
MASTER_SITES=	GNOME
10
DIST_SUBDIR=	gnome2
10
DIST_SUBDIR=	gnome2
Lines 18-24 Link Here
18
		libcanberra-gtk3.so:audio/libcanberra-gtk3 \
18
		libcanberra-gtk3.so:audio/libcanberra-gtk3 \
19
		libunique-1.0.so:x11-toolkits/unique
19
		libunique-1.0.so:x11-toolkits/unique
20
RUN_DEPENDS=	ap*-mod_dnssd>=0:www/mod_dnssd \
20
RUN_DEPENDS=	ap*-mod_dnssd>=0:www/mod_dnssd \
21
		console-kit-daemon:sysutils/consolekit
21
		console-kit-daemon:sysutils/consolekit2
22
22
23
USES=		gettext gmake libtool pkgconfig tar:xz
23
USES=		gettext gmake libtool pkgconfig tar:xz
24
USE_APACHE=	22+
24
USE_APACHE=	22+
(-)x11/mate-session-manager/Makefile (-1 / +2 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	mate-session-manager
4
PORTNAME=	mate-session-manager
5
PORTVERSION=	1.12.1
5
PORTVERSION=	1.12.1
6
PORTREVISION=	1
6
CATEGORIES=	x11 mate
7
CATEGORIES=	x11 mate
7
MASTER_SITES=	MATE
8
MASTER_SITES=	MATE
8
DIST_SUBDIR=	mate
9
DIST_SUBDIR=	mate
Lines 12-18 Link Here
12
13
13
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
14
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
14
		libupower-glib.so:sysutils/upower
15
		libupower-glib.so:sysutils/upower
15
RUN_DEPENDS=	${LOCALBASE}/sbin/console-kit-daemon:sysutils/consolekit \
16
RUN_DEPENDS=	${LOCALBASE}/sbin/console-kit-daemon:sysutils/consolekit2 \
16
		${LOCALBASE}/bin/xdpyinfo:x11/xdpyinfo
17
		${LOCALBASE}/bin/xdpyinfo:x11/xdpyinfo
17
18
18
PORTSCOUT=	limitw:1,even
19
PORTSCOUT=	limitw:1,even
(-)x11/kde4-workspace/Makefile (-2 / +2 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	kde-workspace
3
PORTNAME=	kde-workspace
4
PORTVERSION=	${KDE4_WORKSPACE_VERSION}
4
PORTVERSION=	${KDE4_WORKSPACE_VERSION}
5
PORTREVISION=	5
5
PORTREVISION=	6
6
CATEGORIES=	x11 kde
6
CATEGORIES=	x11 kde
7
MASTER_SITES=	KDE/${KDE4_APPLICATIONS_BRANCH}/applications/${KDE4_APPLICATIONS_VERSION}/src
7
MASTER_SITES=	KDE/${KDE4_APPLICATIONS_BRANCH}/applications/${KDE4_APPLICATIONS_VERSION}/src
8
DIST_SUBDIR=	KDE/${PORTVERSION}
8
DIST_SUBDIR=	KDE/${PORTVERSION}
Lines 11-17 Link Here
11
COMMENT=	KDE Plasma Desktop
11
COMMENT=	KDE Plasma Desktop
12
12
13
LIB_DEPENDS=	libdbus-1.so:devel/dbus \
13
LIB_DEPENDS=	libdbus-1.so:devel/dbus \
14
		libck-connector.so:sysutils/consolekit \
14
		libck-connector.so:sysutils/consolekit2 \
15
		libpci.so:devel/libpci \
15
		libpci.so:devel/libpci \
16
		libhal.so:sysutils/hal \
16
		libhal.so:sysutils/hal \
17
		libqalculate.so:math/libqalculate \
17
		libqalculate.so:math/libqalculate \
(-)x11/cinnamon-session/Makefile (-2 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	cinnamon-session
4
PORTNAME=	cinnamon-session
5
PORTVERSION=	2.4.3
5
PORTVERSION=	2.4.3
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	x11 gnome
7
CATEGORIES=	x11 gnome
8
DIST_SUBDIR=	gnome3
8
DIST_SUBDIR=	gnome3
9
9
Lines 15-21 Link Here
15
		libjson-glib-1.0.so:devel/json-glib \
15
		libjson-glib-1.0.so:devel/json-glib \
16
		libupower-glib.so:sysutils/upower \
16
		libupower-glib.so:sysutils/upower \
17
		libcanberra.so:audio/libcanberra
17
		libcanberra.so:audio/libcanberra
18
RUN_DEPENDS=	console-kit-daemon:sysutils/consolekit \
18
RUN_DEPENDS=	console-kit-daemon:sysutils/consolekit2 \
19
		xdpyinfo:x11/xdpyinfo
19
		xdpyinfo:x11/xdpyinfo
20
20
21
USES=		autoreconf:build execinfo gettext gmake libtool \
21
USES=		autoreconf:build execinfo gettext gmake libtool \
(-)x11/slim/Makefile (-2 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	slim
4
PORTNAME=	slim
5
PORTVERSION=	1.3.6
5
PORTVERSION=	1.3.6
6
PORTREVISION=	13
6
PORTREVISION=	14
7
CATEGORIES=	x11
7
CATEGORIES=	x11
8
MASTER_SITES=	ftp://ftp.berlios.de/pub/slim/ \
8
MASTER_SITES=	ftp://ftp.berlios.de/pub/slim/ \
9
		SF/slim.berlios
9
		SF/slim.berlios
Lines 45-51 Link Here
45
UTF8_EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-utf8
45
UTF8_EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-utf8
46
46
47
CONSOLEKIT_CMAKE_ON=	-DUSE_CONSOLEKIT=yes
47
CONSOLEKIT_CMAKE_ON=	-DUSE_CONSOLEKIT=yes
48
CONSOLEKIT_LIB_DEPENDS=	libck-connector.so:sysutils/consolekit
48
CONSOLEKIT_LIB_DEPENDS=	libck-connector.so:sysutils/consolekit2
49
CONSOLEKIT_CMAKE_OFF=	-DUSE_CONSOLEKIT=no
49
CONSOLEKIT_CMAKE_OFF=	-DUSE_CONSOLEKIT=no
50
50
51
post-patch:
51
post-patch:
(-)x11/gdm/Makefile (-2 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	gdm
4
PORTNAME=	gdm
5
PORTVERSION=	3.16.4
5
PORTVERSION=	3.16.4
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	x11 gnome
7
CATEGORIES=	x11 gnome
8
MASTER_SITES=	GNOME
8
MASTER_SITES=	GNOME
9
DIST_SUBDIR=	gnome3
9
DIST_SUBDIR=	gnome3
Lines 14-20 Link Here
14
BUILD_DEPENDS=	zenity>=3.0.0:x11/zenity \
14
BUILD_DEPENDS=	zenity>=3.0.0:x11/zenity \
15
		itstool:textproc/itstool \
15
		itstool:textproc/itstool \
16
		iso-codes>=0:misc/iso-codes
16
		iso-codes>=0:misc/iso-codes
17
LIB_DEPENDS=	libck-connector.so:sysutils/consolekit \
17
LIB_DEPENDS=	libck-connector.so:sysutils/consolekit2 \
18
		libdbus-glib-1.so:devel/dbus-glib \
18
		libdbus-glib-1.so:devel/dbus-glib \
19
		libupower-glib.so:sysutils/upower \
19
		libupower-glib.so:sysutils/upower \
20
		libnss3.so:security/nss \
20
		libnss3.so:security/nss \
(-)x11/gnome-session/Makefile (-1 / +2 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	gnome-session
4
PORTNAME=	gnome-session
5
PORTVERSION=	3.18.1.2
5
PORTVERSION=	3.18.1.2
6
PORTREVISION=	1
6
CATEGORIES=	x11 gnome
7
CATEGORIES=	x11 gnome
7
MASTER_SITES=	GNOME
8
MASTER_SITES=	GNOME
8
DIST_SUBDIR=	gnome3
9
DIST_SUBDIR=	gnome3
Lines 13-19 Link Here
13
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
14
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
14
		libjson-glib-1.0.so:devel/json-glib \
15
		libjson-glib-1.0.so:devel/json-glib \
15
		libupower-glib.so:sysutils/upower
16
		libupower-glib.so:sysutils/upower
16
RUN_DEPENDS=	${LOCALBASE}/sbin/console-kit-daemon:sysutils/consolekit \
17
RUN_DEPENDS=	${LOCALBASE}/sbin/console-kit-daemon:sysutils/consolekit2 \
17
		${LOCALBASE}/bin/xdpyinfo:x11/xdpyinfo
18
		${LOCALBASE}/bin/xdpyinfo:x11/xdpyinfo
18
19
19
PORTSCOUT=	limitw:1,even
20
PORTSCOUT=	limitw:1,even
(-)x11/lightdm/Makefile (-2 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	lightdm
4
PORTNAME=	lightdm
5
PORTVERSION=	1.20.0
5
PORTVERSION=	1.20.0
6
PORTREVISION=	3
6
PORTREVISION=	4
7
CATEGORIES=	x11
7
CATEGORIES=	x11
8
MASTER_SITES=	https://launchpad.net/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}/+download/
8
MASTER_SITES=	https://launchpad.net/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}/+download/
9
9
Lines 19-25 Link Here
19
19
20
BUILD_DEPENDS=	itstool:textproc/itstool
20
BUILD_DEPENDS=	itstool:textproc/itstool
21
LIB_DEPENDS=	libaccountsservice.so:sysutils/accountsservice \
21
LIB_DEPENDS=	libaccountsservice.so:sysutils/accountsservice \
22
		libck-connector.so:sysutils/consolekit \
22
		libck-connector.so:sysutils/consolekit2 \
23
		libgcrypt.so:security/libgcrypt \
23
		libgcrypt.so:security/libgcrypt \
24
		libxklavier.so:x11/libxklavier
24
		libxklavier.so:x11/libxklavier
25
25
(-)x11-wm/lxsession/Makefile (-1 / +2 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	lxsession
4
PORTNAME=	lxsession
5
PORTVERSION=	0.5.3
5
PORTVERSION=	0.5.3
6
PORTREVISION=	1
6
CATEGORIES=	x11-wm
7
CATEGORIES=	x11-wm
7
MASTER_SITES=	SF/lxde/LXSession%20%28session%20manager%29/LXSession%200.5.x/
8
MASTER_SITES=	SF/lxde/LXSession%20%28session%20manager%29/LXSession%200.5.x/
8
9
Lines 18-24 Link Here
18
		libfreetype.so:print/freetype2 \
19
		libfreetype.so:print/freetype2 \
19
		libunique-1.0.so:x11-toolkits/unique \
20
		libunique-1.0.so:x11-toolkits/unique \
20
		libpolkit-agent-1.so:sysutils/polkit \
21
		libpolkit-agent-1.so:sysutils/polkit \
21
		libck-connector.so:sysutils/consolekit
22
		libck-connector.so:sysutils/consolekit2
22
23
23
USES=		autoreconf gmake localbase pkgconfig tar:xz
24
USES=		autoreconf gmake localbase pkgconfig tar:xz
24
USE_GNOME=	glib20 gtk20 intltool cairo gdkpixbuf2 libxslt
25
USE_GNOME=	glib20 gtk20 intltool cairo gdkpixbuf2 libxslt
(-)x11-wm/xfce4-session/Makefile (-4 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	xfce4-session
4
PORTNAME=	xfce4-session
5
PORTVERSION=	4.12.1
5
PORTVERSION=	4.12.1
6
PORTREVISION=	3
6
PORTREVISION=	4
7
CATEGORIES=	x11-wm xfce
7
CATEGORIES=	x11-wm xfce
8
MASTER_SITES=	XFCE/src/xfce/${PORTNAME}/${PORTVERSION:R}
8
MASTER_SITES=	XFCE/src/xfce/${PORTNAME}/${PORTVERSION:R}
9
DIST_SUBDIR=	xfce4
9
DIST_SUBDIR=	xfce4
Lines 15-21 Link Here
15
15
16
BUILD_DEPENDS=	iceauth:x11/iceauth
16
BUILD_DEPENDS=	iceauth:x11/iceauth
17
RUN_DEPENDS=	iceauth:x11/iceauth \
17
RUN_DEPENDS=	iceauth:x11/iceauth \
18
		console-kit-daemon:sysutils/consolekit
18
		console-kit-daemon:sysutils/consolekit2
19
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
19
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
20
		libupower-glib.so:sysutils/upower \
20
		libupower-glib.so:sysutils/upower \
21
		libpolkit-gobject-1.so:sysutils/polkit
21
		libpolkit-gobject-1.so:sysutils/polkit
Lines 31-38 Link Here
31
CONFIGURE_ARGS+=--enable-legacy-sm \
31
CONFIGURE_ARGS+=--enable-legacy-sm \
32
		--with-xsession-prefix=${PREFIX}
32
		--with-xsession-prefix=${PREFIX}
33
33
34
SUB_FILES=	pkg-message
35
36
OPTIONS_DEFINE=	NLS
34
OPTIONS_DEFINE=	NLS
37
NLS_USES=	gettext-runtime
35
NLS_USES=	gettext-runtime
38
NLS_CONFIGURE_ENABLE=	nls
36
NLS_CONFIGURE_ENABLE=	nls
(-)x11-wm/xfce4-session/files/pkg-message.in (-20 lines)
Lines 1-20 Link Here
1
To be able to shutdown or reboot your system, you'll have to add .rules
2
files in %%LOCALBASE%%/etc/polkit-1/rules.d directory. Which looks
3
like this (replace PUTYOURGROUPHERE by your group):
4
5
polkit.addRule(function (action, subject) {
6
  if ((action.id == "org.freedesktop.consolekit.system.restart" ||
7
      action.id == "org.freedesktop.consolekit.system.stop")
8
      && subject.isInGroup("PUTYOURGROUPHERE")) {
9
    return polkit.Result.YES;
10
  }
11
});
12
13
For those who have working suspend/resume:
14
15
polkit.addRule(function (action, subject) {
16
  if (action.id == "org.freedesktop.consolekit.system.suspend"
17
      && subject.isInGroup("PUTYOURGROUPHERE")) {
18
    return polkit.Result.YES;
19
  }
20
});

Return to bug 202269