Blame SOURCES/audit-4.patch

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