summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Šimerda <psimerda@redhat.com>2014-05-23 12:58:57 +0200
committerThomas Haller <thaller@redhat.com>2014-05-23 16:11:29 +0200
commit5d22e1aa34a42ca706d37c1371ba6933da5671fb (patch)
tree31334c63c1204609b5a1ea400979616b84086dc6
parentb6a52b5e5ec846f0a7eab991d112ff350a66554e (diff)
downloadNetworkManager-5d22e1aa34a42ca706d37c1371ba6933da5671fb.tar.gz
fixup! core: runtime detect systemd-logind and fallback to ConsoleKit (bgo #686997)
treat no session tracking as fake, remove fake https://bugzilla.gnome.org/show_bug.cgi?id=686997#c35 Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--configure.ac12
-rw-r--r--src/nm-session-monitor.c8
2 files changed, 5 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 51f59a1530..a9237dc32b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -317,20 +317,14 @@ AC_ARG_WITH(systemd-logind, AS_HELP_STRING([--with-systemd-logind=yes|no],
[Support systemd session tracking]))
AC_ARG_WITH(consolekit, AS_HELP_STRING([--with-consolekit=yes|no],
[Support consolekit session tracking]))
-AC_ARG_WITH(fake-session, AS_HELP_STRING([--with-fake-session=yes|no],
- [Any user is assumed to have a session]))
# defaults
AS_IF([test -z "$with_systemd_logind"], [with_systemd_logind="yes"])
AS_IF([test -z "$with_consolekit"], [with_consolekit="yes"])
-AS_IF([test -z "$with_fake_session"], [with_fake_session="no"])
# backwards compatibility
AS_IF([test "$with_session_tracking" = "ck"], [with_consolekit="yes" with_systemd_login="no"])
AS_IF([test "$with_session_tracking" = "consolekit"], [with_consolekit="yes" with_systemd_login="no"])
AS_IF([test "$with_session_tracking" = "systemd"], [with_consolekit="no" with_systemd_login="yes"])
-AS_IF([test "$with_session_tracking" = "none"], [with_fake_session="yes"])
-AS_IF([test "$with_session_tracking" = "no"], [with_fake_session="yes"])
-# consistency
-AS_IF([test "$with_fake_session" = "yes"], [with_consolekit="no" with_systemd_login="no"])
+AS_IF([test "$with_session_tracking" = "none"], [with_consolekit="no" with_systemd_login="no"])
# output
session_tracking=
if test "$with_systemd_logind" = "yes"; then
@@ -345,10 +339,6 @@ if test "$with_consolekit" = "yes"; then
AC_DEFINE([CKDB_PATH], "/var/run/ConsoleKit/database", [Path to ConsoleKit database])
session_tracking="$session_tracking, consolekit"
fi
-if test "$with_fake_session" = "yes"; then
- AC_DEFINE([SESSION_TRACKING_FAKE], 1, [Define to 1 if fake session tracking is used])
- session_tracking="$session_tracking, fake"
-fi
session_tracking=${session_tracking:2}
AC_ARG_WITH(suspend-resume, AS_HELP_STRING([--with-suspend-resume=upower|systemd], [Build NetworkManager with specific suspend/resume support]))
diff --git a/src/nm-session-monitor.c b/src/nm-session-monitor.c
index d836c7f978..12d54d7632 100644
--- a/src/nm-session-monitor.c
+++ b/src/nm-session-monitor.c
@@ -549,11 +549,11 @@ nm_session_monitor_lookup (NMSessionMonitor *monitor, uid_t uid, gboolean active
return nm_session_monitor_lookup_consolekit (monitor, uid, active, error);
#endif
-#ifdef SESSION_TRACKING_FAKE
+ /* If no session tracking method is available, always give a positive
+ * answer. Please note that this means session tracking cannot be used
+ * for security purposes.
+ */
return TRUE;
-#endif
-
- return FALSE;
}
/**