|
|
75a7a3 |
From 328f7544bf77891b76af091af8e179f4e003050a Mon Sep 17 00:00:00 2001
|
|
|
1e501a |
From: Ray Strode <rstrode@redhat.com>
|
|
|
1e501a |
Date: Fri, 3 Jul 2015 14:39:33 -0400
|
|
|
1e501a |
Subject: [PATCH] server: add -audit 4 to default flags
|
|
|
1e501a |
|
|
|
1e501a |
---
|
|
|
75a7a3 |
daemon/gdm-server.c | 2 +-
|
|
|
75a7a3 |
daemon/gdm-x-session.c | 2 ++
|
|
|
75a7a3 |
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
|
1e501a |
|
|
|
1e501a |
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
|
|
|
75a7a3 |
index 6357d344..2e8c0562 100644
|
|
|
1e501a |
--- a/daemon/gdm-server.c
|
|
|
1e501a |
+++ b/daemon/gdm-server.c
|
|
|
75a7a3 |
@@ -199,61 +199,61 @@ gdm_server_launch_sigusr1_thread_if_needed (void)
|
|
|
1e501a |
static GThread *sigusr1_thread;
|
|
|
1e501a |
|
|
|
1e501a |
if (sigusr1_thread == NULL) {
|
|
|
1e501a |
sigusr1_thread = g_thread_new ("gdm SIGUSR1 catcher", sigusr1_thread_main, NULL);
|
|
|
1e501a |
|
|
|
1e501a |
g_mutex_lock (&sigusr1_thread_mutex);
|
|
|
1e501a |
while (!sigusr1_thread_running)
|
|
|
1e501a |
g_cond_wait (&sigusr1_thread_cond, &sigusr1_thread_mutex);
|
|
|
1e501a |
g_mutex_unlock (&sigusr1_thread_mutex);
|
|
|
1e501a |
}
|
|
|
1e501a |
}
|
|
|
1e501a |
|
|
|
1e501a |
static void
|
|
|
1e501a |
gdm_server_init_command (GdmServer *server)
|
|
|
1e501a |
{
|
|
|
1e501a |
gboolean debug = FALSE;
|
|
|
1e501a |
const char *debug_options;
|
|
|
1e501a |
const char *verbosity = "";
|
|
|
1e501a |
|
|
|
1e501a |
if (server->priv->command != NULL) {
|
|
|
1e501a |
return;
|
|
|
1e501a |
}
|
|
|
1e501a |
|
|
|
1e501a |
gdm_settings_direct_get_boolean (GDM_KEY_DEBUG, &debug);
|
|
|
1e501a |
if (debug) {
|
|
|
1e501a |
debug_options = " -logverbose 7 -core ";
|
|
|
1e501a |
} else {
|
|
|
1e501a |
debug_options = "";
|
|
|
1e501a |
}
|
|
|
1e501a |
|
|
|
1e501a |
-#define X_SERVER_ARG_FORMAT " -background none -noreset -verbose %s%s"
|
|
|
1e501a |
+#define X_SERVER_ARG_FORMAT " -background none -noreset -audit 4 -verbose %s%s"
|
|
|
1e501a |
|
|
|
1e501a |
/* This is a temporary hack to work around the fact that XOrg
|
|
|
1e501a |
* currently lacks support for multi-seat hotplugging for
|
|
|
1e501a |
* display devices. This bit should be removed as soon as XOrg
|
|
|
1e501a |
* gains native support for automatically enumerating usb
|
|
|
1e501a |
* based graphics adapters at start-up via udev. */
|
|
|
1e501a |
|
|
|
1e501a |
/* systemd ships an X server wrapper tool which simply invokes
|
|
|
1e501a |
* the usual X but ensures it only uses the display devices of
|
|
|
1e501a |
* the seat. */
|
|
|
1e501a |
|
|
|
1e501a |
/* We do not rely on this wrapper server if, a) the machine
|
|
|
1e501a |
* wasn't booted using systemd, or b) the wrapper tool is
|
|
|
1e501a |
* missing, or c) we are running for the main seat 'seat0'. */
|
|
|
1e501a |
|
|
|
1e501a |
#ifdef ENABLE_SYSTEMD_JOURNAL
|
|
|
1e501a |
/* For systemd, we don't have a log file but instead log to stdout,
|
|
|
1e501a |
so set it to the xserver's built-in default verbosity */
|
|
|
1e501a |
if (debug)
|
|
|
1e501a |
verbosity = "7 -logfile /dev/null";
|
|
|
1e501a |
else
|
|
|
1e501a |
verbosity = "3 -logfile /dev/null";
|
|
|
1e501a |
#endif
|
|
|
1e501a |
|
|
|
75a7a3 |
if (g_access (SYSTEMD_X_SERVER, X_OK) < 0) {
|
|
|
75a7a3 |
goto fallback;
|
|
|
75a7a3 |
}
|
|
|
75a7a3 |
|
|
|
75a7a3 |
if (server->priv->display_seat_id == NULL ||
|
|
|
75a7a3 |
strcmp (server->priv->display_seat_id, "seat0") == 0) {
|
|
|
75a7a3 |
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
|
|
|
75a7a3 |
index b919e6e9..80fc09b8 100644
|
|
|
75a7a3 |
--- a/daemon/gdm-x-session.c
|
|
|
75a7a3 |
+++ b/daemon/gdm-x-session.c
|
|
|
75a7a3 |
@@ -247,60 +247,62 @@ spawn_x_server (State *state,
|
|
|
75a7a3 |
}
|
|
|
75a7a3 |
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-displayfd");
|
|
|
75a7a3 |
g_ptr_array_add (arguments, display_fd_string);
|
|
|
75a7a3 |
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-auth");
|
|
|
75a7a3 |
g_ptr_array_add (arguments, auth_file);
|
|
|
75a7a3 |
|
|
|
75a7a3 |
/* If we were compiled with Xserver >= 1.17 we need to specify
|
|
|
75a7a3 |
* '-listen tcp' as the X server dosen't listen on tcp sockets
|
|
|
75a7a3 |
* by default anymore. In older versions we need to pass
|
|
|
75a7a3 |
* -nolisten tcp to disable listening on tcp sockets.
|
|
|
75a7a3 |
*/
|
|
|
75a7a3 |
#ifdef HAVE_XSERVER_THAT_DEFAULTS_TO_LOCAL_ONLY
|
|
|
75a7a3 |
if (allow_remote_connections) {
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-listen");
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "tcp");
|
|
|
75a7a3 |
}
|
|
|
75a7a3 |
#else
|
|
|
75a7a3 |
if (!allow_remote_connections) {
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-nolisten");
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "tcp");
|
|
|
75a7a3 |
}
|
|
|
75a7a3 |
#endif
|
|
|
75a7a3 |
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-background");
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "none");
|
|
|
75a7a3 |
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-noreset");
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-keeptty");
|
|
|
75a7a3 |
+ g_ptr_array_add (arguments, "-audit");
|
|
|
75a7a3 |
+ g_ptr_array_add (arguments, "4");
|
|
|
75a7a3 |
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-verbose");
|
|
|
75a7a3 |
if (state->debug_enabled) {
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "7");
|
|
|
75a7a3 |
} else {
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "3");
|
|
|
75a7a3 |
}
|
|
|
75a7a3 |
|
|
|
75a7a3 |
if (state->debug_enabled) {
|
|
|
75a7a3 |
g_ptr_array_add (arguments, "-core");
|
|
|
75a7a3 |
}
|
|
|
75a7a3 |
g_ptr_array_add (arguments, NULL);
|
|
|
75a7a3 |
|
|
|
75a7a3 |
subprocess = g_subprocess_launcher_spawnv (launcher,
|
|
|
75a7a3 |
(const char * const *) arguments->pdata,
|
|
|
75a7a3 |
&error);
|
|
|
75a7a3 |
g_free (display_fd_string);
|
|
|
75a7a3 |
g_clear_object (&launcher);
|
|
|
75a7a3 |
g_ptr_array_free (arguments, TRUE);
|
|
|
75a7a3 |
|
|
|
75a7a3 |
if (subprocess == NULL) {
|
|
|
75a7a3 |
g_debug ("could not start X server: %s", error->message);
|
|
|
75a7a3 |
goto out;
|
|
|
75a7a3 |
}
|
|
|
75a7a3 |
|
|
|
75a7a3 |
input_stream = g_unix_input_stream_new (pipe_fds[0], TRUE);
|
|
|
75a7a3 |
data_stream = g_data_input_stream_new (input_stream);
|
|
|
75a7a3 |
g_clear_object (&input_stream);
|
|
|
75a7a3 |
|
|
|
75a7a3 |
display_number = g_data_input_stream_read_line (data_stream,
|
|
|
1e501a |
--
|
|
|
75a7a3 |
2.11.1
|
|
|
1e501a |
|