From 63b63a81a037248d6b523ebba06e7db9a68dd9285409e24be44f6126e7ea16d3 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 21 Nov 2008 14:18:48 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdm?expand=0&rev=66 --- gdm-fix-pam-auditing.patch | 93 ++++++++++++++++++++++++++++++++++++++ gdm-fix-xdmcp.patch | 28 ++++++++++++ gdm.changes | 7 +++ gdm.spec | 12 ++++- 4 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 gdm-fix-pam-auditing.patch create mode 100644 gdm-fix-xdmcp.patch diff --git a/gdm-fix-pam-auditing.patch b/gdm-fix-pam-auditing.patch new file mode 100644 index 0000000..7f6b8f9 --- /dev/null +++ b/gdm-fix-pam-auditing.patch @@ -0,0 +1,93 @@ +Index: daemon/gdm-session-linux-auditor.c +=================================================================== +--- daemon/gdm-session-linux-auditor.c (revision 6589) ++++ daemon/gdm-session-linux-auditor.c (revision 6593) +@@ -45,8 +45,9 @@ static void gdm_session_linux_auditor_fi + G_DEFINE_TYPE (GdmSessionLinuxAuditor, gdm_session_linux_auditor, GDM_TYPE_SESSION_AUDITOR) + + static void +-gdm_session_linux_auditor_report_login_attempt (GdmSessionAuditor *auditor, +- gboolean was_successful) ++log_user_message (GdmSessionAuditor *auditor, ++ gint type, ++ gint result) + { + GdmSessionLinuxAuditor *linux_auditor; + char buf[512]; +@@ -70,14 +71,14 @@ gdm_session_linux_auditor_report_login_a + + if (pw != NULL) { + g_snprintf (buf, sizeof (buf), "uid=%d", pw->pw_uid); +- audit_log_user_message (linux_auditor->priv->audit_fd, AUDIT_USER_LOGIN, ++ audit_log_user_message (linux_auditor->priv->audit_fd, type, + buf, hostname, NULL, display_device, +- was_successful != FALSE); ++ result); + } else { + g_snprintf (buf, sizeof (buf), "acct=%s", username); +- audit_log_user_message (linux_auditor->priv->audit_fd, AUDIT_USER_LOGIN, ++ audit_log_user_message (linux_auditor->priv->audit_fd, type, + buf, hostname, NULL, display_device, +- was_successful != FALSE); ++ result); + } + + g_free (username); +@@ -88,7 +89,7 @@ gdm_session_linux_auditor_report_login_a + static void + gdm_session_linux_auditor_report_login (GdmSessionAuditor *auditor) + { +- gdm_session_linux_auditor_report_login_attempt (auditor, TRUE); ++ log_user_message (auditor, AUDIT_USER_LOGIN, 1); + } + + static void +@@ -96,8 +97,13 @@ gdm_session_linux_auditor_report_login_f + int pam_error_code, + const char *pam_error_string) + { ++ log_user_message (auditor, AUDIT_USER_LOGIN, 0); ++} + +- gdm_session_linux_auditor_report_login_attempt (auditor, FALSE); ++static void ++gdm_session_linux_auditor_report_logout (GdmSessionAuditor *auditor) ++{ ++ log_user_message (auditor, AUDIT_USER_LOGOUT, 1); + } + + static void +@@ -113,6 +119,7 @@ gdm_session_linux_auditor_class_init (Gd + + auditor_class->report_login = gdm_session_linux_auditor_report_login; + auditor_class->report_login_failure = gdm_session_linux_auditor_report_login_failure; ++ auditor_class->report_logout = gdm_session_linux_auditor_report_logout; + + g_type_class_add_private (auditor_class, sizeof (GdmSessionLinuxAuditorPrivate)); + } +Index: daemon/gdm-session-worker.c +=================================================================== +--- daemon/gdm-session-worker.c (revision 6589) ++++ daemon/gdm-session-worker.c (revision 6593) +@@ -974,10 +974,6 @@ gdm_session_worker_uninitialize_pam (Gdm + if (worker->priv->pam_handle == NULL) + return; + +- if (worker->priv->state >= GDM_SESSION_WORKER_STATE_ACCREDITED) { +- pam_setcred (worker->priv->pam_handle, PAM_DELETE_CRED); +- } +- + if (worker->priv->state >= GDM_SESSION_WORKER_STATE_SESSION_OPENED) { + pam_close_session (worker->priv->pam_handle, 0); + gdm_session_auditor_report_logout (worker->priv->auditor); +@@ -987,6 +983,10 @@ gdm_session_worker_uninitialize_pam (Gdm + pam_strerror (worker->priv->pam_handle, status)); + } + ++ if (worker->priv->state >= GDM_SESSION_WORKER_STATE_ACCREDITED) { ++ pam_setcred (worker->priv->pam_handle, PAM_DELETE_CRED); ++ } ++ + pam_end (worker->priv->pam_handle, status); + worker->priv->pam_handle = NULL; + diff --git a/gdm-fix-xdmcp.patch b/gdm-fix-xdmcp.patch new file mode 100644 index 0000000..34fa537 --- /dev/null +++ b/gdm-fix-xdmcp.patch @@ -0,0 +1,28 @@ +diff -upr gdm-2.24.0-org/daemon/gdm-manager.c gdm-2.24.0/daemon/gdm-manager.c +--- gdm-2.24.0-org/daemon/gdm-manager.c 2008-07-29 11:40:42.000000000 +0900 ++++ gdm-2.24.0/daemon/gdm-manager.c 2008-11-19 02:11:55.000000000 +0900 +@@ -328,9 +328,7 @@ gdm_manager_constructor (GType + manager->priv->local_factory = gdm_local_display_factory_new (manager->priv->display_store); + + #ifdef HAVE_LIBXDMCP +- if (manager->priv->xdmcp_enabled) { +- manager->priv->xdmcp_factory = gdm_xdmcp_display_factory_new (manager->priv->display_store); +- } ++ manager->priv->xdmcp_factory = gdm_xdmcp_display_factory_new (manager->priv->display_store); + #endif + + return G_OBJECT (manager); +diff -upr gdm-2.24.0-org/daemon/gdm-xdmcp-display-factory.c gdm-2.24.0/daemon/gdm-xdmcp-display-factory.c +--- gdm-2.24.0-org/daemon/gdm-xdmcp-display-factory.c 2008-11-15 22:43:39.000000000 +0900 ++++ gdm-2.24.0/daemon/gdm-xdmcp-display-factory.c 2008-11-16 10:47:32.000000000 +0900 +@@ -2044,6 +2052,10 @@ gdm_xdmcp_display_create (GdmXdmcpDispla + store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory)); + gdm_display_store_add (store, display); + ++ if (! gdm_display_manage (display)) { ++ gdm_display_unmanage (display); ++ } ++ + factory->priv->num_pending_sessions++; + out: + diff --git a/gdm.changes b/gdm.changes index 94680ef..ae01960 100644 --- a/gdm.changes +++ b/gdm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Nov 20 01:29:42 CST 2008 - hpj@novell.com + +- Add gdm-fix-xdmcp.patch, which makes XDMCP work (bnc#441396). +- Add gdm-fix-pam-auditing.patch, which makes PAM auditing work + as expected on logout (bnc#436852). + ------------------------------------------------------------------- Wed Nov 12 15:45:57 CST 2008 - hpj@novell.com diff --git a/gdm.spec b/gdm.spec index 947435e..7f58d05 100644 --- a/gdm.spec +++ b/gdm.spec @@ -57,7 +57,7 @@ PreReq: %insserv_prereq License: GPL v2 or later Group: System/GUI/GNOME Version: 2.24.0 -Release: 10 +Release: 11 Summary: The GNOME 2.x Display Manager Source: %{name}-%{version}.tar.bz2 Source1: gdm.pamd @@ -89,6 +89,10 @@ Patch13: gdm-sysconfig-settings.patch Patch14: gdm-autologin.patch # PATCH-FIX-UPSTREAM gdm-greeter-greater-ui.patch bnc436431 bgo560508 vuntz@novell.com -- Improve the layout of the greeter. Note: the patch contains a patched glade file *and* the result glade file (for reference only, in case we need to rebase the patch) Patch15: gdm-greeter-greater-ui.patch +# PATCH-FIX-UPSTREAM gdm-fix-xdmcp.patch bnc441396 bgo561396 hpj@novell.com -- Make XDMCP work, patch from upstream bugzilla. +Patch16: gdm-fix-xdmcp.patch +# PATCH-FIX-UPSTREAM gdm-fix-pam-auditing.patch bnc436852 bgo557794 hpj@novell.com -- Make PAM auditing work on logout. +Patch17: gdm-fix-pam-auditing.patch Patch28: gdm-X_SERVER.patch # PATCH-SUSE: enable SELinux Patch60: gdm-selinux.patch @@ -166,6 +170,8 @@ Authors: %patch13 -p1 %patch14 %patch15 -p1 +%patch16 -p1 +%patch17 -p0 %patch28 %patch60 @@ -274,6 +280,10 @@ fi %files lang -f %{name}.lang %changelog +* Thu Nov 20 2008 hpj@novell.com +- Add gdm-fix-xdmcp.patch, which makes XDMCP work (bnc#441396). +- Add gdm-fix-pam-auditing.patch, which makes PAM auditing work + as expected on logout (bnc#436852). * Wed Nov 12 2008 hpj@novell.com - Update gdm-sysconfig-settings.patch, removing debug spew. * Wed Nov 12 2008 vuntz@novell.com