Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 347622 Details for
Bug 468910
kde-base/kdm: add multiseat systemd support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ignore consolekit if logind is running
0001-Detect-logind-at-runtime.patch (text/plain), 3.23 KB, created by
Fabio Erculiani (RETIRED)
on 2013-05-07 18:42:52 UTC
(
hide
)
Description:
ignore consolekit if logind is running
Filename:
MIME Type:
Creator:
Fabio Erculiani (RETIRED)
Created:
2013-05-07 18:42:52 UTC
Size:
3.23 KB
patch
obsolete
>From ebb778ff7053303e3ee68c77c9d7e6aaceaf86ab Mon Sep 17 00:00:00 2001 >From: Fabio Erculiani <lxnay@sabayon.org> >Date: Mon, 29 Apr 2013 10:46:23 +0100 >Subject: [PATCH] Detect logind at runtime > >--- > kdm/backend/client.c | 42 +++++++++++++++++++++++++----------------- > 1 file changed, 25 insertions(+), 17 deletions(-) > >diff --git a/kdm/backend/client.c b/kdm/backend/client.c >index bdff6da..a2760b6 100644 >--- a/kdm/backend/client.c >+++ b/kdm/backend/client.c >@@ -88,6 +88,9 @@ extern int loginsuccess(const char *User, const char *Host, const char *Tty, cha > #endif > #include <signal.h> > >+#include <unistd.h> >+#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0) >+ > /* > * Session data, mostly what struct verify_info was for > */ >@@ -1342,11 +1345,12 @@ startClient(volatile int *pid) > strcpy(curuser, p->pw_name); /* Use normalized login name. */ > > #ifdef HAVE_CKCONNECTOR >- if (!(ckConnector = ck_connector_new())) { >- logOutOfMem(); >- V_RET; >+ if (!LOGIND_RUNNING()) { >+ if (!(ckConnector = ck_connector_new())) { >+ logOutOfMem(); >+ V_RET; >+ } > } >- > # ifdef HAVE_VTS > if (td->serverVT > 0) > sprintf(ckDeviceBuf, "/dev/tty%d", td->serverVT); >@@ -1390,7 +1394,7 @@ startClient(volatile int *pid) > "Warning: Cannot open ConsoleKit session: %s", > error.message); > dbus_error_free(&error); >- } else { >+ } else if (!LOGIND_RUNNING()) { > logError("Cannot open ConsoleKit session, likely OOM\n"); > displayStr(V_MSG_ERR, > "Warning: Cannot open ConsoleKit session."); >@@ -1452,8 +1456,10 @@ startClient(volatile int *pid) > env = setEnv(env, "KRBTKFILE", krbtkfile); > #endif > #ifdef HAVE_CKCONNECTOR >- env = setEnv(env, "XDG_SESSION_COOKIE", >- ck_connector_get_cookie(ckConnector)); >+ if (!LOGIND_RUNNING()) { >+ env = setEnv(env, "XDG_SESSION_COOKIE", >+ ck_connector_get_cookie(ckConnector)); >+ } > #endif > userEnviron = inheritEnv(env, envvars); > env = systemEnv(0, curuser); >@@ -1949,18 +1955,20 @@ clientExited(void) > #endif > > #ifdef HAVE_CKCONNECTOR >- if (ckConnector) { >- dbus_error_init(&error); >- if (!ck_connector_close_session(ckConnector, &error)) { >- if (dbus_error_is_set(&error)) { >- logError("Cannot close ConsoleKit session: %s\n", error.message); >- dbus_error_free(&error); >- } else { >- logError("Cannot close ConsoleKit session, likely OOM\n"); >+ if (!LOGIND_RUNNING()) { >+ if (ckConnector) { >+ dbus_error_init(&error); >+ if (!ck_connector_close_session(ckConnector, &error)) { >+ if (dbus_error_is_set(&error)) { >+ logError("Cannot close ConsoleKit session: %s\n", error.message); >+ dbus_error_free(&error); >+ } else { >+ logError("Cannot close ConsoleKit session, likely OOM\n"); >+ } > } >+ ck_connector_unref(ckConnector); >+ ckConnector = 0; > } >- ck_connector_unref(ckConnector); >- ckConnector = 0; > } > #endif > } >-- >1.8.1.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 468910
:
347622
|
347624