From 70825f1b15a73a9eda6bbe742fd9ad2bbbbc0a09f001b36769a89ebbe64d7eea Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sun, 5 Aug 2007 09:39:08 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdm?expand=0&rev=24 --- gdm-2.13.0.4-audit-login.patch | 171 ------- gdm-2.17.7-vt-fallback.patch | 15 +- gdm-2.19.3-reset-pam.patch | 328 +++++++------ gdm-2.19.3-token-login.patch | 371 +++++++------- gdm-2.19.3.diff | 11 - gdm-2.19.3.tar.bz2 | 3 - gdm-2.19.5.tar.bz2 | 3 + gdm-2.8.0.0-any-hostname-auth.patch | 4 +- gdm-2.8.0.7-bg-4.patch | 26 +- gdm-2.8.0.7-domain-entry.patch | 413 ++++++++-------- gdm-2.8.0.7-halt-needs-root.patch | 668 +++++++++----------------- gdm-2.8.0.7-some-info-in-dialog.patch | 27 +- gdm-bash-profile.patch | 80 --- gdm-conf.patch | 31 +- gdm-language-dialog-size.patch | 26 +- gdm-logdir.patch | 22 - gdm-server-timeout.patch | 22 +- gdm.changes | 20 + gdm.spec | 53 +- 19 files changed, 939 insertions(+), 1355 deletions(-) delete mode 100644 gdm-2.13.0.4-audit-login.patch delete mode 100644 gdm-2.19.3.diff delete mode 100644 gdm-2.19.3.tar.bz2 create mode 100644 gdm-2.19.5.tar.bz2 delete mode 100644 gdm-bash-profile.patch delete mode 100644 gdm-logdir.patch diff --git a/gdm-2.13.0.4-audit-login.patch b/gdm-2.13.0.4-audit-login.patch deleted file mode 100644 index 6624c5f..0000000 --- a/gdm-2.13.0.4-audit-login.patch +++ /dev/null @@ -1,171 +0,0 @@ ---- gdm-2.13.0.4/daemon/verify-pam.c.audit-login 2005-12-21 23:50:43.000000000 -0500 -+++ gdm-2.13.0.4/daemon/verify-pam.c 2006-01-08 23:41:38.000000000 -0500 -@@ -47,6 +47,14 @@ - #include - #endif /* HAVE_ADT */ - -+#define AU_FAILED 0 -+#define AU_SUCCESS 1 -+#ifdef HAVE_LIBAUDIT -+#include -+#else -+#define log_to_audit_system(l,h,d,s) do { ; } while (0) -+#endif -+ - /* Evil, but this way these things are passed to the child session */ - static pam_handle_t *pamh = NULL; - -@@ -783,6 +791,53 @@ create_pamh (GdmDisplay *d, - return TRUE; - } - -+/** -+ * log_to_audit_system: -+ * @login: Name of user -+ * @hostname: Name of host machine -+ * @tty: Name of display -+ * @success: 1 for success, 0 for failure -+ * -+ * Logs the success or failure of the login attempt with the linux kernel -+ * audit system. The intent is to capture failed events where the user -+ * fails authentication or otherwise is not permitted to login. There are -+ * many other places where pam could potentially fail and cause login to -+ * fail, but these are system failures rather than the signs of an account -+ * being hacked. -+ * -+ * Returns nothing. -+ */ -+ -+#ifdef HAVE_LIBAUDIT -+static void -+log_to_audit_system(const char *login, -+ const char *hostname, -+ const char *tty, -+ gboolean success) -+{ -+ struct passwd *pw; -+ char buf[64]; -+ int audit_fd; -+ -+ audit_fd = audit_open(); -+ if (login) -+ pw = getpwnam(login); -+ else { -+ login = "unknown"; -+ pw = NULL; -+ } -+ if (pw) { -+ snprintf(buf, sizeof(buf), "uid=%d", pw->pw_uid); -+ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, -+ buf, hostname, NULL, tty, (int)success); -+ } else { -+ snprintf(buf, sizeof(buf), "acct=%s", login); -+ audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, -+ buf, hostname, NULL, tty, (int)success); -+ } -+ close(audit_fd); -+} -+#endif - - /** - * gdm_verify_user: -@@ -875,6 +930,9 @@ authenticate_again: - /* Start authentication session */ - did_we_ask_for_password = FALSE; - if ((pamerr = pam_authenticate (pamh, null_tok)) != PAM_SUCCESS) { -+ /* Log the failed login attempt */ -+ log_to_audit_system(tmp_PAM_USER, d->hostname, display, AU_FAILED); -+ - if ( ! ve_string_empty (selected_user)) { - pam_handle_t *tmp_pamh; - -@@ -962,6 +1020,8 @@ authenticate_again: - ( ! gdm_get_value_bool (GDM_KEY_ALLOW_REMOTE_ROOT) && ! local) ) && - pwent != NULL && - pwent->pw_uid == 0) { -+ /* Log the failed login attempt */ -+ log_to_audit_system(login, d->hostname, display, AU_FAILED); - gdm_error (_("Root login disallowed on display '%s'"), - display); - gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX, -@@ -989,6 +1049,8 @@ authenticate_again: - break; - case PAM_NEW_AUTHTOK_REQD : - if ((pamerr = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK)) != PAM_SUCCESS) { -+ /* Log the failed login attempt */ -+ log_to_audit_system(login, d->hostname, display, AU_FAILED); - gdm_error (_("Authentication token change failed for user %s"), login); - gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX, - _("\nThe change of the authentication token failed. " -@@ -1006,18 +1068,24 @@ authenticate_again: - #endif /* HAVE_ADT */ - break; - case PAM_ACCT_EXPIRED : -+ /* Log the failed login attempt */ -+ log_to_audit_system(login, d->hostname, display, AU_FAILED); - gdm_error (_("User %s no longer permitted to access the system"), login); - gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX, - _("\nThe system administrator has disabled your account.")); - error_msg_given = TRUE; - goto pamerr; - case PAM_PERM_DENIED : -+ /* Log the failed login attempt */ -+ log_to_audit_system(login, d->hostname, display, AU_FAILED); - gdm_error (_("User %s not permitted to gain access at this time"), login); - gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX, - _("\nThe system administrator has disabled access to the system temporarily.")); - error_msg_given = TRUE; - goto pamerr; - default : -+ /* Log the failed login attempt */ -+ log_to_audit_system(login, d->hostname, display, AU_FAILED); - if (gdm_slave_action_pending ()) - gdm_error (_("Couldn't set acct. mgmt for %s"), login); - goto pamerr; -@@ -1069,6 +1137,8 @@ authenticate_again: - gdm_error (_("Couldn't open session for %s"), login); - goto pamerr; - } -+ /* Login succeeded */ -+ log_to_audit_system(login, d->hostname, display, AU_SUCCESS); - - /* Workaround to avoid gdm messages being logged as PAM_pwdb */ - closelog (); ---- gdm-2.13.0.4/configure.ac.audit-login 2006-01-02 07:52:23.000000000 -0500 -+++ gdm-2.13.0.4/configure.ac 2006-01-08 23:37:16.000000000 -0500 -@@ -72,6 +72,10 @@ AC_ARG_WITH(dmx, - - AC_ARG_WITH(selinux, [ --with-selinux Add SELinux support]) - -+AC_ARG_WITH(libaudit, -+ [ --with-libaudit=[auto/yes/no] Add Linux audit support [default=auto]],, -+ with_libaudit=auto) -+ - withval="" - AC_ARG_WITH(post-path, - [ --with-post-path= add PATH to end of user's PATH when logging in],[ -@@ -888,6 +892,24 @@ else - AC_MSG_RESULT(no) - fi - -+# Check for Linux auditing API -+# -+# libaudit detection -+if test x$with_libaudit = xno ; then -+ have_libaudit=no; -+else -+ # See if we have audit daemon library -+ AC_CHECK_LIB(audit, audit_log_user_message, -+ have_libaudit=yes, have_libaudit=no) -+fi -+ -+AM_CONDITIONAL(HAVE_LIBAUDIT, test x$have_libaudit = xyes) -+ -+if test x$have_libaudit = xyes ; then -+ EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -laudit" -+ AC_DEFINE(HAVE_LIBAUDIT,1,[linux audit support]) -+fi -+ - # Check for Solaris auditing API - # Note, Solaris auditing not supported for Solaris 9 or earlier and - # should not be used on these versions of Solaris if auditing is diff --git a/gdm-2.17.7-vt-fallback.patch b/gdm-2.17.7-vt-fallback.patch index c9116e5..1439c58 100644 --- a/gdm-2.17.7-vt-fallback.patch +++ b/gdm-2.17.7-vt-fallback.patch @@ -1,7 +1,7 @@ -diff -upr gdm-2.17.7-pre/daemon/getvt.c gdm-2.17.7-post/daemon/getvt.c ---- gdm-2.17.7-pre/daemon/getvt.c 2007-02-11 23:40:19.000000000 -0600 -+++ gdm-2.17.7-post/daemon/getvt.c 2007-03-20 16:25:35.000000000 -0600 -@@ -90,8 +90,10 @@ get_free_vt_linux (int *vtfd) +diff -upr gdm-2.19.5-pre/daemon/getvt.c gdm-2.19.5-post/daemon/getvt.c +--- gdm-2.19.5-pre/daemon/getvt.c 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/daemon/getvt.c 2007-08-03 20:14:13.000000000 -0500 +@@ -181,8 +181,10 @@ get_free_vt_sys (int *vtfd) int vtno; unsigned short vtmask; struct vt_stat vtstat; @@ -12,7 +12,7 @@ diff -upr gdm-2.17.7-pre/daemon/getvt.c gdm-2.17.7-post/daemon/getvt.c do { errno = 0; -@@ -101,26 +103,33 @@ get_free_vt_linux (int *vtfd) +@@ -193,26 +195,33 @@ get_free_vt_sys (int *vtfd) #endif , 0); } while G_UNLIKELY (errno == EINTR); @@ -28,12 +28,12 @@ diff -upr gdm-2.17.7-pre/daemon/getvt.c gdm-2.17.7-post/daemon/getvt.c + else + v_state = 0; -- for (vtno = gdm_get_value_int (GDM_KEY_FIRST_VT), vtmask = 1 << vtno; +- for (vtno = gdm_daemon_config_get_value_int (GDM_KEY_FIRST_VT), vtmask = 1 << vtno; - vtstat.v_state & vtmask; vtno++, vtmask <<= 1); - if (!vtmask) { - VE_IGNORE_EINTR (close (fd)); - return -1; -+ for (vtno = gdm_get_value_int (GDM_KEY_FIRST_VT), vtmask = 1 << vtno; vtmask; vtno++, vtmask <<= 1) { ++ for (vtno = gdm_daemon_config_get_value_int (GDM_KEY_FIRST_VT), vtmask = 1 << vtno; vtmask; vtno++, vtmask <<= 1) { + /* Is this console in use? */ + if (v_state & vtmask) + continue; @@ -60,3 +60,4 @@ diff -upr gdm-2.17.7-pre/daemon/getvt.c gdm-2.17.7-post/daemon/getvt.c *vtfd = fdv; return vtno; } +Only in gdm-2.19.5-post: error.21177 diff --git a/gdm-2.19.3-reset-pam.patch b/gdm-2.19.3-reset-pam.patch index ec991a7..e6431d8 100644 --- a/gdm-2.19.3-reset-pam.patch +++ b/gdm-2.19.3-reset-pam.patch @@ -1,16 +1,169 @@ ---- gdm-2.16.4/gui/greeter/greeter.c.reset-pam 2006-10-30 15:56:34.000000000 -0500 -+++ gdm-2.16.4/gui/greeter/greeter.c 2006-12-15 11:11:07.000000000 -0500 -@@ -168,7 +168,6 @@ +diff -upr gdm-2.19.5-pre/daemon/gdm.c gdm-2.19.5-post/daemon/gdm.c +--- gdm-2.19.5-pre/daemon/gdm.c 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm.c 2007-08-03 20:23:38.000000000 -0500 +@@ -4363,6 +4363,14 @@ gdm_handle_user_message (GdmConnection * + gdm_connection_write (conn, "OK false\n"); + } else if (strcmp (msg, GDM_SUP_CLOSE) == 0) { + gdm_connection_close (conn); ++ } else if (strcmp (msg, GDM_SOP_CANCEL_LOGIN_REQUESTS) == 0) { ++ GSList *li; ++ for (li = gdm_daemon_config_get_display_list (); li != NULL; li = li->next) { ++ GdmDisplay *d = li->data; ++ if (!d->logged_in) { ++ send_slave_command (d, GDM_NOTIFY_RESET); ++ } ++ } + } else { + gdm_connection_write (conn, "ERROR 0 Not implemented\n"); + gdm_connection_close (conn); +diff -upr gdm-2.19.5-pre/daemon/gdm-daemon-config-keys.h gdm-2.19.5-post/daemon/gdm-daemon-config-keys.h +--- gdm-2.19.5-pre/daemon/gdm-daemon-config-keys.h 2007-08-03 20:20:26.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-daemon-config-keys.h 2007-08-03 20:23:38.000000000 -0500 +@@ -233,6 +233,7 @@ G_BEGIN_DECLS + #define GDM_NOTIFY_SOFT_RESTART_SERVERS "SOFT_RESTART_SERVERS" + #define GDM_NOTIFY_GO "GO" + #define GDM_NOTIFY_TWIDDLE_POINTER "TWIDDLE_POINTER" ++#define GDM_NOTIFY_RESET "RESET" + + G_END_DECLS + +diff -upr gdm-2.19.5-pre/daemon/gdm-socket-protocol.h gdm-2.19.5-post/daemon/gdm-socket-protocol.h +--- gdm-2.19.5-pre/daemon/gdm-socket-protocol.h 2007-08-03 20:20:26.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-socket-protocol.h 2007-08-03 20:23:38.000000000 -0500 +@@ -157,6 +157,8 @@ + #define GDM_SOP_SHOW_QUESTION_DIALOG "SHOW_QUESTION_DIALOG" /* show the question dialog from daemon */ + #define GDM_SOP_SHOW_ASKBUTTONS_DIALOG "SHOW_ASKBUTTON_DIALOG" /* show the askbutton dialog from daemon */ + ++/* Reset any in progress authentication conversations */ ++#define GDM_SOP_CANCEL_LOGIN_REQUESTS "CANCEL_LOGIN_REQUESTS" /* no arguments */ + + /* Ack for a slave message */ + /* Note that an extra response can follow an 'ack' */ +diff -upr gdm-2.19.5-pre/daemon/slave.c gdm-2.19.5-post/daemon/slave.c +--- gdm-2.19.5-pre/daemon/slave.c 2007-08-03 20:20:26.000000000 -0500 ++++ gdm-2.19.5-post/daemon/slave.c 2007-08-03 20:24:23.000000000 -0500 +@@ -175,6 +175,12 @@ static int gdm_normal_runlevel = + static pid_t extra_process = 0; + static int extra_status = 0; + ++/* a dup of the other side of greeter_fd_in so that ++ * the slave can talk to itself from its sig handler ++ * using the greeter ipc mechanism ++ */ ++static int slave_fd_out = -1; ++ + #ifdef HAVE_TSOL + static gboolean have_suntsol_extension = FALSE; + #endif +@@ -663,7 +669,7 @@ ignore_xerror_handler (Display *disp, XE + } + + static void +-whack_greeter_fds (void) ++whack_greeter_and_slave_fds (void) + { + if (greeter_fd_out > 0) + VE_IGNORE_EINTR (close (greeter_fd_out)); +@@ -671,6 +677,9 @@ whack_greeter_fds (void) + if (greeter_fd_in > 0) + VE_IGNORE_EINTR (close (greeter_fd_in)); + greeter_fd_in = -1; ++ if (slave_fd_out > 0) ++ VE_IGNORE_EINTR (close (slave_fd_out)); ++ slave_fd_out = -1; + } + + static void +@@ -1156,7 +1165,7 @@ gdm_slave_whack_greeter (void) + + d->greetpid = 0; + +- whack_greeter_fds (); ++ whack_greeter_and_slave_fds (); + + gdm_slave_send_num (GDM_SOP_GREETPID, 0); + +@@ -2005,7 +2014,7 @@ restart_the_greeter (void) + + d->greetpid = 0; + +- whack_greeter_fds (); ++ whack_greeter_and_slave_fds (); + + gdm_slave_send_num (GDM_SOP_GREETPID, 0); + } +@@ -2295,6 +2304,12 @@ gdm_slave_wait_for_login (void) + break; + } + ++ if (do_cancel) { ++ gdm_debug ("canceling..."); ++ gdm_slave_greeter_ctl_no_ret (GDM_RESETOK, ""); ++ continue; ++ } ++ + if (login_user == NULL) { + const char *failuresound = gdm_daemon_config_get_value_string (GDM_KEY_SOUND_ON_LOGIN_FAILURE_FILE); + +@@ -2908,9 +2923,10 @@ gdm_slave_greeter (void) + + default: + VE_IGNORE_EINTR (close (pipe1[0])); +- VE_IGNORE_EINTR (close (pipe2[1])); + +- whack_greeter_fds (); ++ whack_greeter_and_slave_fds (); ++ ++ slave_fd_out = pipe2[1]; + + greeter_fd_out = pipe1[1]; + greeter_fd_in = pipe2[0]; +@@ -5208,7 +5224,7 @@ gdm_slave_child_handler (int sig) + + greet = FALSE; + d->greetpid = 0; +- whack_greeter_fds (); ++ whack_greeter_and_slave_fds (); + gdm_slave_send_num (GDM_SOP_GREETPID, 0); + + do_restart_greeter = TRUE; +@@ -5220,7 +5236,7 @@ gdm_slave_child_handler (int sig) + continue; + } + +- whack_greeter_fds (); ++ whack_greeter_and_slave_fds (); + + /* if greet is TRUE, then the greeter died outside of our + * control really, so clean up and die, something is wrong +@@ -5363,6 +5379,11 @@ gdm_slave_handle_usr2_message (void) + gdm_wait_for_go = FALSE; + } else if (strcmp (&s[1], GDM_NOTIFY_TWIDDLE_POINTER) == 0) { + gdm_twiddle_pointer (d); ++ } else if (strcmp (&s[1], GDM_NOTIFY_RESET) == 0) { ++ if (!d->logged_in) { ++ gdm_fdprintf (slave_fd_out, "%c%c%c\n", ++ STX, BEL, GDM_INTERRUPT_CANCEL); ++ } + } + } else if (s[0] == GDM_SLAVE_NOTIFY_RESPONSE) { + gdm_got_ack = TRUE; +Only in gdm-2.19.5-post/daemon: slave.c~ +Only in gdm-2.19.5-post: error.18580 +diff -upr gdm-2.19.5-pre/gui/greeter/greeter.c gdm-2.19.5-post/gui/greeter/greeter.c +--- gdm-2.19.5-pre/gui/greeter/greeter.c 2007-08-03 20:20:26.000000000 -0500 ++++ gdm-2.19.5-post/gui/greeter/greeter.c 2007-08-03 20:23:38.000000000 -0500 +@@ -278,7 +278,6 @@ process_operation (guchar op_code, GtkWidget *dlg; char *tmp; char *session; - GreeterItemInfo *conversation_info; static GnomeCanvasItem *disabled_cover = NULL; - gchar *language; - gchar *selected_user = NULL; -@@ -328,16 +327,9 @@ - if (gtk_start_again_button != NULL) - gtk_widget_set_sensitive (gtk_start_again_button, FALSE); + gint lookup_status = SESSION_LOOKUP_SUCCESS; + gchar *firstmsg = NULL; +@@ -483,16 +482,9 @@ process_operation (guchar op_code, + + first_prompt = TRUE; - conversation_info = greeter_lookup_id ("pam-conversation"); - @@ -28,162 +181,3 @@ printf ("%c\n", STX); fflush (stdout); ---- gdm-2.16.4/daemon/slave.c.reset-pam 2006-12-15 11:03:01.000000000 -0500 -+++ gdm-2.16.4/daemon/slave.c 2006-12-15 11:03:01.000000000 -0500 -@@ -128,6 +128,12 @@ - static int greeter_fd_out = -1; - static int greeter_fd_in = -1; - -+/* a dup of the other side of greeter_fd_in so that -+ * the slave can talk to itself from its sig handler -+ * using the greeter ipc mechanism -+ */ -+static int slave_fd_out = -1; -+ - #ifdef HAVE_TSOL - static gboolean have_suntsol_extension = FALSE; - #endif -@@ -620,7 +626,7 @@ - } - - static void --whack_greeter_fds (void) -+whack_greeter_and_slave_fds (void) - { - if (greeter_fd_out > 0) - VE_IGNORE_EINTR (close (greeter_fd_out)); -@@ -628,6 +634,9 @@ - if (greeter_fd_in > 0) - VE_IGNORE_EINTR (close (greeter_fd_in)); - greeter_fd_in = -1; -+ if (slave_fd_out > 0) -+ VE_IGNORE_EINTR (close (slave_fd_out)); -+ slave_fd_out = -1; - } - - static void -@@ -1078,7 +1087,7 @@ - - d->greetpid = 0; - -- whack_greeter_fds (); -+ whack_greeter_and_slave_fds (); - - gdm_slave_send_num (GDM_SOP_GREETPID, 0); - -@@ -1844,7 +1853,7 @@ - - d->greetpid = 0; - -- whack_greeter_fds (); -+ whack_greeter_and_slave_fds (); - - gdm_slave_send_num (GDM_SOP_GREETPID, 0); - } -@@ -2076,6 +2085,12 @@ - break; - } - -+ if (do_cancel) { -+ gdm_debug ("canceling..."); -+ gdm_slave_greeter_ctl_no_ret (GDM_RESETOK, ""); -+ continue; -+ } -+ - if (login == NULL) { - char *failuresound = gdm_get_value_string (GDM_KEY_SOUND_ON_LOGIN_FAILURE_FILE); - -@@ -4673,7 +4688,7 @@ - continue; - } - -- whack_greeter_fds (); -+ whack_greeter_and_slave_fds (); - - /* if greet is TRUE, then the greeter died outside of our - * control really, so clean up and die, something is wrong -@@ -4816,6 +4831,11 @@ - gdm_wait_for_go = FALSE; - } else if (strcmp (&s[1], GDM_NOTIFY_TWIDDLE_POINTER) == 0) { - gdm_twiddle_pointer (d); -+ } else if (strcmp (&s[1], GDM_NOTIFY_RESET) == 0) { -+ if (!d->logged_in) { -+ gdm_fdprintf (slave_fd_out, "%c%c%c\n", -+ STX, BEL, GDM_INTERRUPT_CANCEL); -+ } - } - } - } ---- gdm-2.19.3/daemon/slave.c~ 2007-07-18 14:10:20.000000000 -0400 -+++ gdm-2.19.3/daemon/slave.c 2007-07-18 14:12:23.000000000 -0400 -@@ -2877,10 +2877,11 @@ gdm_slave_greeter (void) - - default: - VE_IGNORE_EINTR (close (pipe1[0])); -- VE_IGNORE_EINTR (close (pipe2[1])); - - whack_greeter_and_slave_fds (); - -+ slave_fd_out = pipe2[1]; -+ - greeter_fd_out = pipe1[1]; - greeter_fd_in = pipe2[0]; - -@@ -4858,7 +4859,7 @@ gdm_slave_child_handler (int sig) - - greet = FALSE; - d->greetpid = 0; -- whack_greeter_fds (); -+ whack_greeter_and_slave_fds (); - gdm_slave_send_num (GDM_SOP_GREETPID, 0); - - do_restart_greeter = TRUE; ---- gdm-2.19.3/daemon/gdm-socket-protocol.h~ 2007-06-17 13:07:39.000000000 -0400 -+++ gdm-2.19.3/daemon/gdm-socket-protocol.h 2007-07-25 14:47:23.000000000 -0400 -@@ -155,6 +155,8 @@ - #define GDM_SOP_SHOW_QUESTION_DIALOG "SHOW_QUESTION_DIALOG" /* show the question dialog from daemon */ - #define GDM_SOP_SHOW_ASKBUTTONS_DIALOG "SHOW_ASKBUTTON_DIALOG" /* show the askbutton dialog from daemon */ - -+/* Reset any in progress authentication conversations */ -+#define GDM_SOP_CANCEL_LOGIN_REQUESTS "CANCEL_LOGIN_REQUESTS" /* no arguments */ - - /* Ack for a slave message */ - /* Note that an extra response can follow an 'ack' */ ---- gdm-2.19.3/daemon/gdm-daemon-config-keys.h~ 2007-06-17 13:07:38.000000000 -0400 -+++ gdm-2.19.3/daemon/gdm-daemon-config-keys.h 2007-07-25 14:46:49.000000000 -0400 -@@ -226,6 +226,7 @@ - #define GDM_NOTIFY_SOFT_RESTART_SERVERS "SOFT_RESTART_SERVERS" - #define GDM_NOTIFY_GO "GO" - #define GDM_NOTIFY_TWIDDLE_POINTER "TWIDDLE_POINTER" -+#define GDM_NOTIFY_RESET "RESET" - - G_END_DECLS - ---- gdm-2.19.3/daemon/slave.c~ 2007-07-25 15:25:09.000000000 -0400 -+++ gdm-2.19.3/daemon/slave.c 2007-07-25 15:26:22.000000000 -0400 -@@ -4881,7 +4881,7 @@ gdm_slave_child_handler (int sig) - continue; - } - -- whack_greeter_fds (); -+ whack_greeter_and_slave_fds (); - - /* if greet is TRUE, then the greeter died outside of our - * control really, so clean up and die, something is wrong ---- gdm-2.19.3/daemon/gdm.c~ 2007-07-25 15:40:40.000000000 -0400 -+++ gdm-2.19.3/daemon/gdm.c 2007-07-25 15:41:39.000000000 -0400 -@@ -4344,6 +4344,14 @@ gdm_handle_user_message (GdmConnection * - gdm_connection_write (conn, "OK false\n"); - } else if (strcmp (msg, GDM_SUP_CLOSE) == 0) { - gdm_connection_close (conn); -+ } else if (strcmp (msg, GDM_SOP_CANCEL_LOGIN_REQUESTS) == 0) { -+ GSList *li; -+ for (li = gdm_daemon_config_get_display_list (); li != NULL; li = li->next) { -+ GdmDisplay *d = li->data; -+ if (!d->logged_in) { -+ send_slave_command (d, GDM_NOTIFY_RESET); -+ } -+ } - } else { - gdm_connection_write (conn, "ERROR 0 Not implemented\n"); - gdm_connection_close (conn); diff --git a/gdm-2.19.3-token-login.patch b/gdm-2.19.3-token-login.patch index a2e2e84..1e806ae 100644 --- a/gdm-2.19.3-token-login.patch +++ b/gdm-2.19.3-token-login.patch @@ -1,83 +1,7 @@ ---- gdm-2.19.3/daemon/slave.c~ 2007-07-25 15:00:30.000000000 -0400 -+++ gdm-2.19.3/daemon/slave.c 2007-07-25 15:05:46.000000000 -0400 -@@ -116,6 +116,8 @@ static gboolean do_configurator = - static gboolean do_cancel = FALSE; /* If this is true, go back to - username entry & unselect - face browser (if present) */ -+static gboolean do_token_login = FALSE; /* if true, auth with smart -+ cards */ - static gboolean do_restart_greeter = FALSE; /* If this is true, whack the - greeter and try again */ - static gboolean restart_greeter_now = FALSE; /* Restart_greeter_when the -@@ -2081,11 +2083,14 @@ play_login_sound (const char *sound_file - static void - gdm_slave_wait_for_login (void) - { -+ gboolean verify_token; - const char *successsound; - char *username; - g_free (login); - login = NULL; - -+ do_token_login = FALSE; -+ - /* Chat with greeter */ - while (login == NULL) { - /* init to a sane value */ -@@ -2109,11 +2114,16 @@ gdm_slave_wait_for_login (void) - gdm_debug ("gdm_slave_wait_for_login: In loop"); - username = d->preset_user; - d->preset_user = NULL; -+ -+ verify_token = do_token_login; -+ do_token_login = FALSE; -+ - login = gdm_verify_user (d /* the display */, -- username /* username */, -+ verify_token ? "" : username /* username */, - d->name /* display name */, - d->attached /* display attached? */, -- TRUE /* allow retry */); -+ TRUE /* allow retry */, -+ verify_token); - g_free (username); - - gdm_debug ("gdm_slave_wait_for_login: end verify for '%s'", -@@ -2162,7 +2172,7 @@ gdm_slave_wait_for_login (void) - pwent->pw_name, - d->name, - d->attached, -- FALSE); -+ FALSE, FALSE); - gdm_daemon_config_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); - - /* Clear message */ -@@ -5019,6 +5029,11 @@ gdm_slave_handle_usr2_message (void) - gdm_fdprintf (slave_fd_out, "%c%c%c\n", - STX, BEL, GDM_INTERRUPT_CANCEL); - } -+ } else if (strcmp (&s[1], GDM_NOTIFY_TOKEN_LOGIN) == 0) { -+ if (!d->logged_in && d->attached) { -+ gdm_fdprintf (slave_fd_out, "%c%c%c\n", -+ STX, BEL, GDM_INTERRUPT_TOKEN_LOGIN); -+ } - } - } else if (s[0] == GDM_SLAVE_NOTIFY_RESPONSE) { - gdm_got_ack = TRUE; -@@ -5219,6 +5234,10 @@ check_for_interruption (const char *msg) - do_restart_greeter = TRUE; - } - break; -+ case GDM_INTERRUPT_TOKEN_LOGIN: -+ do_token_login = TRUE; -+ do_cancel = TRUE; -+ break; - default: - break; - } ---- gdm-2.19.3/daemon/gdm.c~ 2007-07-25 15:00:37.000000000 -0400 -+++ gdm-2.19.3/daemon/gdm.c 2007-07-25 15:08:09.000000000 -0400 -@@ -4359,7 +4359,7 @@ gdm_handle_user_message (GdmConnection * +diff -upr gdm-2.19.5-pre/daemon/gdm.c gdm-2.19.5-post/daemon/gdm.c +--- gdm-2.19.5-pre/daemon/gdm.c 2007-08-03 20:26:08.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm.c 2007-08-03 20:24:56.000000000 -0500 +@@ -4389,7 +4389,7 @@ gdm_handle_user_message (GdmConnection * } static void @@ -86,7 +10,7 @@ { GSList *li; -@@ -4367,11 +4367,23 @@ gdm_reset_local_displays (void) +@@ -4397,11 +4397,23 @@ gdm_reset_local_displays (void) GdmDisplay *d = li->data; if (d->attached) @@ -111,7 +35,7 @@ gdm_watch_for_security_tokens (void) { DBusGConnection *conn; -@@ -4392,7 +4404,7 @@ gdm_watch_for_security_tokens (void) +@@ -4422,7 +4434,7 @@ gdm_watch_for_security_tokens (void) MONITOR_INTERFACE); dbus_g_proxy_add_signal (monitor, "SecurityTokenInserted", G_TYPE_STRING, G_TYPE_INVALID); @@ -120,96 +44,9 @@ dbus_g_proxy_add_signal (monitor, "SecurityTokenRemoved", G_TYPE_STRING, G_TYPE_INVALID); dbus_g_proxy_connect_signal (monitor, "SecurityTokenRemoved", G_CALLBACK (gdm_reset_local_displays), NULL, NULL); ---- gdm-2.19.3/daemon/gdm-socket-protocol.h~ 2007-07-25 15:00:30.000000000 -0400 -+++ gdm-2.19.3/daemon/gdm-socket-protocol.h 2007-07-25 15:09:02.000000000 -0400 -@@ -75,6 +75,7 @@ - #define GDM_INTERRUPT_CUSTOM_CMD 'M' - #define GDM_INTERRUPT_CANCEL 'X' - #define GDM_INTERRUPT_SELECT_LANG 'O' -+#define GDM_INTERRUPT_TOKEN_LOGIN '$' - - /* List delimiter for config file lists */ - #define GDM_DELIMITER_MODULES ":" ---- gdm-2.19.3/daemon/gdm-daemon-config-keys.h~ 2007-07-25 15:00:30.000000000 -0400 -+++ gdm-2.19.3/daemon/gdm-daemon-config-keys.h 2007-07-25 15:10:22.000000000 -0400 -@@ -105,6 +105,7 @@ G_BEGIN_DECLS - #define GDM_KEY_RETRY_DELAY "security/RetryDelay=1" - #define GDM_KEY_DISALLOW_TCP "security/DisallowTCP=true" - #define GDM_KEY_PAM_STACK "security/PamStack=gdm" -+#define GDM_KEY_PAM_STACK_SMARTCARD "security/SmartCardPamStack=gdm-smartcard" - #define GDM_KEY_NEVER_PLACE_COOKIES_ON_NFS "security/NeverPlaceCookiesOnNFS=true" - #define GDM_KEY_PASSWORD_REQUIRED "security/PasswordRequired=false" - #define GDM_KEY_XDMCP "xdmcp/Enable=false" -@@ -227,6 +228,7 @@ G_BEGIN_DECLS - #define GDM_NOTIFY_GO "GO" - #define GDM_NOTIFY_TWIDDLE_POINTER "TWIDDLE_POINTER" - #define GDM_NOTIFY_RESET "RESET" -+#define GDM_NOTIFY_TOKEN_LOGIN "TOKEN_LOGIN" - - G_END_DECLS - ---- gdm-2.19.3/daemon/verify.h~ 2007-06-17 13:07:39.000000000 -0400 -+++ gdm-2.19.3/daemon/verify.h 2007-07-25 15:12:17.000000000 -0400 -@@ -28,7 +28,8 @@ gchar *gdm_verify_user (GdmDisplay *d - const char *username, - const gchar *display, - gboolean local, -- gboolean allow_retry); -+ gboolean allow_retry, -+ gboolean token); - void gdm_verify_cleanup (GdmDisplay *d); - void gdm_verify_check (void); - void gdm_verify_select_user (const char *user); ---- gdm-2.19.3/daemon/verify-pam.c~ 2007-06-17 13:07:38.000000000 -0400 -+++ gdm-2.19.3/daemon/verify-pam.c 2007-07-25 15:11:57.000000000 -0400 -@@ -866,7 +866,8 @@ gdm_verify_user (GdmDisplay *d, - const char *username, - const gchar *display, - gboolean local, -- gboolean allow_retry) -+ gboolean allow_retry, -+ gboolean verify_token) - { - gint pamerr = 0; - struct passwd *pwent = NULL; -@@ -926,7 +927,10 @@ gdm_verify_user (GdmDisplay *d, - * PAM Stacks, in case one display should use a different - * authentication mechanism than another display. - */ -- pam_stack = gdm_daemon_config_get_value_string_per_display (GDM_KEY_PAM_STACK, (char *)display); -+ pam_stack = gdm_daemon_config_get_value_string_per_display (verify_token -+ ? GDM_KEY_PAM_STACK_SMARTCARD -+ : GDM_KEY_PAM_STACK, -+ (char *)display); - - if ( ! create_pamh (d, pam_stack, login, &pamc, display, &pamerr)) { - if (started_timer) ---- gdm-2.19.3/daemon/verify-shadow.c~ 2007-06-17 13:07:38.000000000 -0400 -+++ gdm-2.19.3/daemon/verify-shadow.c 2007-07-25 15:12:30.000000000 -0400 -@@ -106,7 +106,8 @@ gdm_verify_user (GdmDisplay *d, - const char *username, - const gchar *display, - gboolean local, -- gboolean allow_retry) -+ gboolean allow_retry, -+ gboolean token) - { - gchar *login, *passwd, *ppasswd; - struct passwd *pwent; ---- gdm-2.19.3/daemon/verify-crypt.c~ 2007-06-17 13:07:39.000000000 -0400 -+++ gdm-2.19.3/daemon/verify-crypt.c 2007-07-25 15:12:53.000000000 -0400 -@@ -105,7 +105,8 @@ gdm_verify_user (GdmDisplay *d, - const char *username, - const gchar *display, - gboolean local, -- gboolean allow_retry) -+ gboolean allow_retry, -+ gboolean token) - { - gchar *login, *passwd, *ppasswd; - struct passwd *pwent; ---- gdm-2.19.3/daemon/gdm-daemon-config.c~ 2007-06-17 13:07:39.000000000 -0400 -+++ gdm-2.19.3/daemon/gdm-daemon-config.c 2007-07-25 15:17:46.000000000 -0400 +diff -upr gdm-2.19.5-pre/daemon/gdm-daemon-config.c gdm-2.19.5-post/daemon/gdm-daemon-config.c +--- gdm-2.19.5-pre/daemon/gdm-daemon-config.c 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-daemon-config.c 2007-08-03 20:24:56.000000000 -0500 @@ -552,7 +552,8 @@ gdm_daemon_config_key_to_string_per_disp if (strcmp (group, "greeter") == 0 || @@ -220,9 +57,10 @@ ret = gdm_daemon_config_key_to_string (file, keystring, retval); } ---- gdm-2.19.3/daemon/gdm-daemon-config-entries.h~ 2007-06-17 13:07:38.000000000 -0400 -+++ gdm-2.19.3/daemon/gdm-daemon-config-entries.h 2007-07-25 17:12:25.000000000 -0400 -@@ -208,6 +208,7 @@ typedef enum { +diff -upr gdm-2.19.5-pre/daemon/gdm-daemon-config-entries.h gdm-2.19.5-post/daemon/gdm-daemon-config-entries.h +--- gdm-2.19.5-pre/daemon/gdm-daemon-config-entries.h 2007-08-03 20:26:08.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-daemon-config-entries.h 2007-08-03 20:24:56.000000000 -0500 +@@ -212,6 +212,7 @@ typedef enum { GDM_ID_SYSTEM_COMMANDS_IN_MENU, GDM_ID_ALLOW_LOGOUT_ACTIONS, GDM_ID_RBAC_SYSTEM_COMMAND_KEYS, @@ -230,7 +68,7 @@ GDK_ID_LAST } GdmConfigKey; -@@ -363,6 +364,7 @@ static const GdmConfigEntry gdm_daemon_c +@@ -368,6 +369,7 @@ static const GdmConfigEntry gdm_daemon_c { GDM_CONFIG_GROUP_SECURITY, "RetryDelay", GDM_CONFIG_VALUE_INT, "1", GDM_ID_RETRY_DELAY }, { GDM_CONFIG_GROUP_SECURITY, "DisallowTCP", GDM_CONFIG_VALUE_BOOL, "true", GDM_ID_DISALLOW_TCP }, { GDM_CONFIG_GROUP_SECURITY, "PamStack", GDM_CONFIG_VALUE_STRING, "gdm", GDM_ID_PAM_STACK }, @@ -238,3 +76,184 @@ { GDM_CONFIG_GROUP_SECURITY, "NeverPlaceCookiesOnNFS", GDM_CONFIG_VALUE_BOOL, "true", GDM_ID_NEVER_PLACE_COOKIES_ON_NFS }, { GDM_CONFIG_GROUP_SECURITY, "PasswordRequired", GDM_CONFIG_VALUE_BOOL, "false", GDM_ID_PASSWORD_REQUIRED }, +diff -upr gdm-2.19.5-pre/daemon/gdm-daemon-config-keys.h gdm-2.19.5-post/daemon/gdm-daemon-config-keys.h +--- gdm-2.19.5-pre/daemon/gdm-daemon-config-keys.h 2007-08-03 20:26:08.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-daemon-config-keys.h 2007-08-03 20:24:56.000000000 -0500 +@@ -106,6 +106,7 @@ G_BEGIN_DECLS + #define GDM_KEY_RETRY_DELAY "security/RetryDelay=1" + #define GDM_KEY_DISALLOW_TCP "security/DisallowTCP=true" + #define GDM_KEY_PAM_STACK "security/PamStack=gdm" ++#define GDM_KEY_PAM_STACK_SMARTCARD "security/SmartCardPamStack=gdm-smartcard" + #define GDM_KEY_NEVER_PLACE_COOKIES_ON_NFS "security/NeverPlaceCookiesOnNFS=true" + #define GDM_KEY_PASSWORD_REQUIRED "security/PasswordRequired=false" + #define GDM_KEY_UTMP_LINE_ATTACHED "security/UtmpLineAttached=" +@@ -234,6 +235,7 @@ G_BEGIN_DECLS + #define GDM_NOTIFY_GO "GO" + #define GDM_NOTIFY_TWIDDLE_POINTER "TWIDDLE_POINTER" + #define GDM_NOTIFY_RESET "RESET" ++#define GDM_NOTIFY_TOKEN_LOGIN "TOKEN_LOGIN" + + G_END_DECLS + +diff -upr gdm-2.19.5-pre/daemon/gdm-socket-protocol.h gdm-2.19.5-post/daemon/gdm-socket-protocol.h +--- gdm-2.19.5-pre/daemon/gdm-socket-protocol.h 2007-08-03 20:26:08.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-socket-protocol.h 2007-08-03 20:24:56.000000000 -0500 +@@ -77,6 +77,7 @@ + #define GDM_INTERRUPT_CUSTOM_CMD 'M' + #define GDM_INTERRUPT_CANCEL 'X' + #define GDM_INTERRUPT_SELECT_LANG 'O' ++#define GDM_INTERRUPT_TOKEN_LOGIN '$' + + /* List delimiter for config file lists */ + #define GDM_DELIMITER_MODULES ":" +diff -upr gdm-2.19.5-pre/daemon/slave.c gdm-2.19.5-post/daemon/slave.c +--- gdm-2.19.5-pre/daemon/slave.c 2007-08-03 20:26:08.000000000 -0500 ++++ gdm-2.19.5-post/daemon/slave.c 2007-08-03 20:32:16.000000000 -0500 +@@ -134,6 +134,8 @@ static gboolean do_system_reboot = + static gboolean do_cancel = FALSE; /* If this is true, go back to + username entry & unselect + face browser (if present) */ ++static gboolean do_token_login = FALSE; /* if true, auth with smart ++ cards */ + static gboolean do_restart_greeter = FALSE; /* If this is true, whack the + greeter and try again */ + static gboolean restart_greeter_now = FALSE; /* Restart_greeter_when the +@@ -2091,6 +2093,7 @@ get_root_auth (const gchar *message, str + gdm_slave_greeter_ctl_no_ret (GDM_SETLOGIN, (*pwent)->pw_name); + login_user = gdm_verify_user (d, + (*pwent)->pw_name, ++ FALSE, + FALSE); + gdm_daemon_config_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); + +@@ -2160,11 +2163,14 @@ get_root_auth (const gchar *message, str + static void + gdm_slave_wait_for_login (void) + { ++ gboolean verify_token; + const char *successsound; + char *username; + g_free (login_user); + login_user = NULL; + ++ do_token_login = FALSE; ++ + /* Chat with greeter */ + while (login_user == NULL) { + /* init to a sane value */ +@@ -2188,9 +2194,14 @@ gdm_slave_wait_for_login (void) + gdm_debug ("gdm_slave_wait_for_login: In loop"); + username = d->preset_user; + d->preset_user = NULL; ++ ++ verify_token = do_token_login; ++ do_token_login = FALSE; ++ + login_user = gdm_verify_user (d /* the display */, +- username /* username */, +- TRUE /* allow retry */); ++ verify_token ? "" : username /* username */, ++ TRUE /* allow retry */, ++ verify_token); + g_free (username); + + gdm_debug ("gdm_slave_wait_for_login: end verify for '%s'", +@@ -5384,6 +5395,11 @@ gdm_slave_handle_usr2_message (void) + gdm_fdprintf (slave_fd_out, "%c%c%c\n", + STX, BEL, GDM_INTERRUPT_CANCEL); + } ++ } else if (strcmp (&s[1], GDM_NOTIFY_TOKEN_LOGIN) == 0) { ++ if (!d->logged_in && d->attached) { ++ gdm_fdprintf (slave_fd_out, "%c%c%c\n", ++ STX, BEL, GDM_INTERRUPT_TOKEN_LOGIN); ++ } + } + } else if (s[0] == GDM_SLAVE_NOTIFY_RESPONSE) { + gdm_got_ack = TRUE; +@@ -5592,6 +5608,10 @@ check_for_interruption (const char *msg) + do_restart_greeter = TRUE; + } + break; ++ case GDM_INTERRUPT_TOKEN_LOGIN: ++ do_token_login = TRUE; ++ do_cancel = TRUE; ++ break; + default: + break; + } +Only in gdm-2.19.5-post/daemon: slave.c~ +Only in gdm-2.19.5-post/daemon: slave.c.rej +diff -upr gdm-2.19.5-pre/daemon/verify-crypt.c gdm-2.19.5-post/daemon/verify-crypt.c +--- gdm-2.19.5-pre/daemon/verify-crypt.c 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/daemon/verify-crypt.c 2007-08-03 20:29:12.000000000 -0500 +@@ -101,7 +101,8 @@ print_cant_auth_errbox (void) + gchar * + gdm_verify_user (GdmDisplay *d, + const char *username, +- gboolean allow_retry) ++ gboolean allow_retry, ++ gboolean token) + { + gchar *login, *passwd, *ppasswd; + struct passwd *pwent; +Only in gdm-2.19.5-post/daemon: verify-crypt.c~ +Only in gdm-2.19.5-post/daemon: verify-crypt.c.rej +diff -upr gdm-2.19.5-pre/daemon/verify.h gdm-2.19.5-post/daemon/verify.h +--- gdm-2.19.5-pre/daemon/verify.h 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/daemon/verify.h 2007-08-03 20:34:40.000000000 -0500 +@@ -26,7 +26,8 @@ + * the timed login timer */ + gchar *gdm_verify_user (GdmDisplay *d, + const char *username, +- gboolean allow_retry); ++ gboolean allow_retry, ++ gboolean token); + void gdm_verify_cleanup (GdmDisplay *d); + void gdm_verify_check (void); + void gdm_verify_select_user (const char *user); +Only in gdm-2.19.5-post/daemon: verify.h~ +Only in gdm-2.19.5-post/daemon: verify.h.rej +diff -upr gdm-2.19.5-pre/daemon/verify-pam.c gdm-2.19.5-post/daemon/verify-pam.c +--- gdm-2.19.5-pre/daemon/verify-pam.c 2007-08-03 20:26:08.000000000 -0500 ++++ gdm-2.19.5-post/daemon/verify-pam.c 2007-08-03 20:33:44.000000000 -0500 +@@ -887,7 +887,8 @@ log_to_audit_system(const char *login, + gchar * + gdm_verify_user (GdmDisplay *d, + const char *username, +- gboolean allow_retry) ++ gboolean allow_retry, ++ gboolean verify_token) + { + gint pamerr = 0; + struct passwd *pwent = NULL; +@@ -947,8 +948,10 @@ gdm_verify_user (GdmDisplay *d, + * PAM Stacks, in case one display should use a different + * authentication mechanism than another display. + */ +- pam_stack = gdm_daemon_config_get_value_string_per_display (GDM_KEY_PAM_STACK, +- (char *)d->name); ++ pam_stack = gdm_daemon_config_get_value_string_per_display (verify_token ? ++ GDM_KEY_PAM_STACK_SMARTCARD : ++ GDM_KEY_PAM_STACK, ++ (char *)d->name); + + if ( ! create_pamh (d, pam_stack, login, &pamc, d->name, &pamerr)) { + if (started_timer) +Only in gdm-2.19.5-post/daemon: verify-pam.c~ +Only in gdm-2.19.5-post/daemon: verify-pam.c.rej +diff -upr gdm-2.19.5-pre/daemon/verify-shadow.c gdm-2.19.5-post/daemon/verify-shadow.c +--- gdm-2.19.5-pre/daemon/verify-shadow.c 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/daemon/verify-shadow.c 2007-08-03 20:27:55.000000000 -0500 +@@ -102,7 +102,8 @@ print_cant_auth_errbox (void) + gchar * + gdm_verify_user (GdmDisplay *d, + const char *username, +- gboolean allow_retry) ++ gboolean allow_retry, ++ gboolean token) + { + gchar *login, *passwd, *ppasswd; + struct passwd *pwent; +Only in gdm-2.19.5-post/daemon: verify-shadow.c~ +Only in gdm-2.19.5-post/daemon: verify-shadow.c.rej +Only in gdm-2.19.5-post: error.19199 diff --git a/gdm-2.19.3.diff b/gdm-2.19.3.diff deleted file mode 100644 index f13e3dc..0000000 --- a/gdm-2.19.3.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- gui/gdmcommon.c.orig 2007-07-17 09:59:20.000000000 +0200 -+++ gui/gdmcommon.c 2007-07-17 09:59:54.000000000 +0200 -@@ -399,7 +399,7 @@ gdm_common_text_to_escaped_utf8 (const c - while ((*p != '\0') && - !g_utf8_validate (p, -1, &q)) { - p = (gchar *) q; -- p = '?'; -+ *p = '?'; - p++; - } - diff --git a/gdm-2.19.3.tar.bz2 b/gdm-2.19.3.tar.bz2 deleted file mode 100644 index ee1dee1..0000000 --- a/gdm-2.19.3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fda3335079e0a2da0953c61fa515f89393d35a1567b0fb7c988d0aaf02faed1a -size 3555139 diff --git a/gdm-2.19.5.tar.bz2 b/gdm-2.19.5.tar.bz2 new file mode 100644 index 0000000..9a87cfe --- /dev/null +++ b/gdm-2.19.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13cbc8aaea85a549d1a65ff5a0a569bf927bd52b91725b8e11c01cd17b82bd68 +size 3663736 diff --git a/gdm-2.8.0.0-any-hostname-auth.patch b/gdm-2.8.0.0-any-hostname-auth.patch index e4639df..d766f7f 100644 --- a/gdm-2.8.0.0-any-hostname-auth.patch +++ b/gdm-2.8.0.0-any-hostname-auth.patch @@ -5,9 +5,9 @@ g_unsetenv ("MAIL"); /* Unset $MAIL for broken shells */ + if (d->hostname != NULL && d->hostname [0] != '\0') { -+ ve_setenv ("XAUTHLOCALHOSTNAME", d->hostname, TRUE); ++ g_setenv ("XAUTHLOCALHOSTNAME", d->hostname, TRUE); + } else { -+ ve_setenv ("XAUTHLOCALHOSTNAME", "localhost.localdomain", TRUE); ++ g_setenv ("XAUTHLOCALHOSTNAME", "localhost.localdomain", TRUE); + } + if (d->type == TYPE_STATIC) { diff --git a/gdm-2.8.0.7-bg-4.patch b/gdm-2.8.0.7-bg-4.patch index 601eed6..7f1b2ed 100644 --- a/gdm-2.8.0.7-bg-4.patch +++ b/gdm-2.8.0.7-bg-4.patch @@ -1,16 +1,15 @@ -Index: gdm-2.17.7/gui/greeter/greeter.c -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter.c -+++ gdm-2.17.7/gui/greeter/greeter.c -@@ -1163,6 +1163,7 @@ main (int argc, char *argv[]) - guint sid; +diff -upr gdm-2.19.3-pre/gui/greeter/greeter.c gdm-2.19.3-post/gui/greeter/greeter.c +--- gdm-2.19.3-pre/gui/greeter/greeter.c 2007-06-17 13:07:26.000000000 -0400 ++++ gdm-2.19.3-post/gui/greeter/greeter.c 2007-07-31 21:19:51.000000000 -0400 +@@ -1239,6 +1239,7 @@ main (int argc, char *argv[]) int r; gint i; + gchar *key_string = NULL; + GdkColor black = { 0, 0, 0, 0 }; if (g_getenv ("DOING_GDM_DEVELOPMENT") != NULL) DOING_GDM_DEVELOPMENT = TRUE; -@@ -1271,6 +1272,7 @@ main (int argc, char *argv[]) +@@ -1348,6 +1349,7 @@ main (int argc, char *argv[]) } window = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -18,7 +17,7 @@ Index: gdm-2.17.7/gui/greeter/greeter.c if G_UNLIKELY (DOING_GDM_DEVELOPMENT) { g_signal_connect (G_OBJECT (window), "key_press_event", -@@ -1287,6 +1289,7 @@ main (int argc, char *argv[]) +@@ -1364,6 +1366,7 @@ main (int argc, char *argv[]) gtk_window_set_default_size (GTK_WINDOW (window), gdm_wm_screen.width, gdm_wm_screen.height); @@ -26,10 +25,9 @@ Index: gdm-2.17.7/gui/greeter/greeter.c gtk_container_add (GTK_CONTAINER (window), canvas); /* -Index: gdm-2.17.7/gui/greeter/greeter_canvas_item.c -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter_canvas_item.c -+++ gdm-2.17.7/gui/greeter/greeter_canvas_item.c +diff -upr gdm-2.19.3-pre/gui/greeter/greeter_canvas_item.c gdm-2.19.3-post/gui/greeter/greeter_canvas_item.c +--- gdm-2.19.3-pre/gui/greeter/greeter_canvas_item.c 2007-06-17 13:07:26.000000000 -0400 ++++ gdm-2.19.3-post/gui/greeter/greeter_canvas_item.c 2007-07-31 21:18:11.000000000 -0400 @@ -24,6 +24,12 @@ #include #include @@ -43,7 +41,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_canvas_item.c #include "gdm.h" #include "gdmcommon.h" #include "gdmconfig.h" -@@ -254,6 +260,127 @@ greeter_item_run_button_action_callback +@@ -258,6 +264,127 @@ greeter_item_run_button_action_callback gtk_widget_grab_focus (entry); } @@ -171,7 +169,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_canvas_item.c void greeter_item_create_canvas_item (GreeterItemInfo *item) { -@@ -351,12 +478,53 @@ greeter_item_create_canvas_item (Greeter +@@ -355,12 +482,53 @@ greeter_item_create_canvas_item (Greeter } if (item->data.pixmap.pixbufs[GREETER_ITEM_STATE_NORMAL] != NULL) diff --git a/gdm-2.8.0.7-domain-entry.patch b/gdm-2.8.0.7-domain-entry.patch index 2443c36..5a2a799 100644 --- a/gdm-2.8.0.7-domain-entry.patch +++ b/gdm-2.8.0.7-domain-entry.patch @@ -1,77 +1,41 @@ -Index: gdm-2.17.7/config/gdm.conf.in -=================================================================== ---- gdm-2.17.7.orig/config/gdm.conf.in -+++ gdm-2.17.7/config/gdm.conf.in -@@ -499,6 +499,9 @@ SoundOnLogin=false - # list of libraries, one per line, and load each library in the file. - PreFetchProgram=@GDMPREFETCHCMD@ - -+# Set to true to show the domain login GUI elements. -+#ShowDomain=false -+ - # The chooser is what's displayed when a user wants an indirect XDMCP session, - # or selects Run XDMCP chooser from the system menu - [chooser] -Index: gdm-2.17.7/configure.ac -=================================================================== ---- gdm-2.17.7.orig/configure.ac -+++ gdm-2.17.7/configure.ac -@@ -875,6 +875,9 @@ AC_SUBST(GDMPREFETCH) +Only in gdm-2.19.3-post: config.h +diff -upr gdm-2.19.3-pre/configure.ac gdm-2.19.3-post/configure.ac +--- gdm-2.19.3-pre/configure.ac 2007-06-17 12:08:03.000000000 -0500 ++++ gdm-2.19.3-post/configure.ac 2007-08-02 21:45:37.000000000 -0500 +@@ -887,6 +887,10 @@ AC_SUBST(GDMPREFETCH) AC_SUBST(GDMPREFETCHLIST) AC_SUBST(GDMPREFETCHCMD) +GDM_SCRATCH_DIR="${localstatedir}/gdm" +AC_DEFINE_UNQUOTED(GDM_SCRATCH_DIR, "$GDM_SCRATCH_DIR", [GDM scratch dir]) ++AC_SUBST(GDM_SCRATCH_DIR) + AC_ARG_ENABLE(secureremote, [ --enable-secureremote=[yes/no] Enable to offer a secure X connection through ssh [default=no]],, enable_secureremote=no) -Index: gdm-2.17.7/daemon/gdmconfig.c -=================================================================== ---- gdm-2.17.7.orig/daemon/gdmconfig.c -+++ gdm-2.17.7/daemon/gdmconfig.c -@@ -233,6 +233,7 @@ static gint GdmFlexiReapDelayMinutes; - static gint GdmBackgroundProgramInitialDelay = 30; - static gint GdmBackgroundProgramRestartDelay = 30; - -+static gboolean GdmShowDomain; - static gboolean GdmAllowGtkThemeChange; - static gboolean GdmTitleBar; - static gboolean GdmIncludeAll; -@@ -353,6 +354,7 @@ gdm_config_init (void) - realkey_hash = g_hash_table_new (g_str_hash, g_str_equal); - - /* boolean values */ -+ gdm_config_add_hash (GDM_KEY_SHOW_DOMAIN, &GdmShowDomain, &bool_type); - gdm_config_add_hash (GDM_KEY_ALLOW_REMOTE_ROOT, &GdmAllowRemoteRoot, &bool_type); - gdm_config_add_hash (GDM_KEY_ALLOW_ROOT, &GdmAllowRoot, &bool_type); - gdm_config_add_hash (GDM_KEY_ALLOW_REMOTE_AUTOLOGIN, -Index: gdm-2.17.7/daemon/gdm.h -=================================================================== ---- gdm-2.17.7.orig/daemon/gdm.h -+++ gdm-2.17.7/daemon/gdm.h -@@ -393,6 +393,8 @@ enum { +diff -upr gdm-2.19.3-pre/daemon/gdm-daemon-config-keys.h gdm-2.19.3-post/daemon/gdm-daemon-config-keys.h +--- gdm-2.19.3-pre/daemon/gdm-daemon-config-keys.h 2007-06-17 12:07:38.000000000 -0500 ++++ gdm-2.19.3-post/daemon/gdm-daemon-config-keys.h 2007-08-02 20:59:53.000000000 -0500 +@@ -172,6 +172,7 @@ G_BEGIN_DECLS + #define GDM_KEY_GRAPHICAL_THEME_RAND "greeter/GraphicalThemeRand=false" #define GDM_KEY_GRAPHICAL_THEME_DIR "greeter/GraphicalThemeDir=" DATADIR "/gdm/themes/" #define GDM_KEY_GRAPHICAL_THEMED_COLOR "greeter/GraphicalThemedColor=#76848F" - +#define GDM_KEY_SHOW_DOMAIN "greeter/ShowDomain=false" -+ #define GDM_KEY_INFO_MSG_FILE "greeter/InfoMsgFile=" #define GDM_KEY_INFO_MSG_FONT "greeter/InfoMsgFont=" - -@@ -764,6 +766,7 @@ void gdm_final_cleanup (void); + #define GDM_KEY_PRE_FETCH_PROGRAM "greeter/PreFetchProgram=" +@@ -214,6 +215,7 @@ G_BEGIN_DECLS #define GDM_NOTIFY_TIMED_LOGIN_DELAY "TimedLoginDelay" /* */ #define GDM_NOTIFY_TIMED_LOGIN_ENABLE "TimedLoginEnable" /* */ #define GDM_NOTIFY_DISALLOW_TCP "DisallowTCP" /* */ -+#define GDM_NOTIFY_SHOW_DOMAIN "ShowDomain" /* */ ++#define GDM_NOTIFY_SHOW_DOMAIN "ShowDomain" /* */ #define GDM_NOTIFY_SOUND_ON_LOGIN_FILE "SoundOnLoginFile" /* */ #define GDM_NOTIFY_SOUND_ON_LOGIN_SUCCESS_FILE "SoundOnLoginSuccessFile" /* */ #define GDM_NOTIFY_SOUND_ON_LOGIN_FAILURE_FILE "SoundOnLoginFailureFile" /* */ -Index: gdm-2.17.7/daemon/verify-pam.c -=================================================================== ---- gdm-2.17.7.orig/daemon/verify-pam.c -+++ gdm-2.17.7/daemon/verify-pam.c -@@ -60,6 +60,8 @@ static unsigned auth_retries; +diff -upr gdm-2.19.3-pre/daemon/verify-pam.c gdm-2.19.3-post/daemon/verify-pam.c +--- gdm-2.19.3-pre/daemon/verify-pam.c 2007-06-17 12:07:38.000000000 -0500 ++++ gdm-2.19.3-post/daemon/verify-pam.c 2007-08-02 20:59:53.000000000 -0500 +@@ -77,6 +77,8 @@ static unsigned auth_retries; /* this is another hack */ static gboolean did_we_ask_for_password = FALSE; @@ -80,7 +44,7 @@ Index: gdm-2.17.7/daemon/verify-pam.c static char *selected_user = NULL; -@@ -449,6 +451,7 @@ perhaps_translate_message (const char *m +@@ -463,6 +465,7 @@ perhaps_translate_message (const char *m g_hash_table_insert (hash, "You are required to change your password immediately (password aged)", _("You are required to change your password immediately (password aged)")); g_hash_table_insert (hash, "You are required to change your password immediately (root enforced)", _("You are required to change your password immediately (root enforced)")); g_hash_table_insert (hash, "Your account has expired; please contact your system administrator", _("Your account has expired; please contact your system administrator")); @@ -88,67 +52,120 @@ Index: gdm-2.17.7/daemon/verify-pam.c g_hash_table_insert (hash, "No password supplied", _("No password supplied")); g_hash_table_insert (hash, "Password unchanged", _("Password unchanged")); g_hash_table_insert (hash, "Can not get username", _("Can not get username")); -@@ -517,8 +520,9 @@ gdm_verify_pam_conv (int num_msg, struct - openlog ("gdm", LOG_PID, LOG_DAEMON); - - for (replies = 0; replies < num_msg; replies++) { -- const char *m = (*msg)[replies].msg; -- m = perhaps_translate_message (m); -+ const char *m_untranslated = (*msg)[replies].msg; -+ const char *m; -+ m = perhaps_translate_message (m_untranslated); - - switch ((*msg)[replies].msg_style) { - -@@ -574,6 +578,12 @@ gdm_verify_pam_conv (int num_msg, struct - - case PAM_ERROR_MSG: - /* PAM sent a message that should displayed to the user */ -+ -+ if (strstr (m_untranslated, "account is disabled")) -+ is_account_disabled = TRUE; -+ else if (strstr (m_untranslated, "account has expired")) -+ is_account_expired = TRUE; -+ - gdm_slave_greeter_ctl_no_ret (GDM_ERRDLG, m); - reply[replies].resp_retcode = PAM_SUCCESS; - reply[replies].resp = NULL; -@@ -1180,7 +1190,11 @@ authenticate_again: - /* Only give this message if we actually asked for - password, otherwise it would be silly to say that - the password may have been wrong */ -- if (did_we_ask_for_password) { -+ if (is_account_disabled) { -+ basemsg = _("\nYour account has been disabled."); -+ } else if (is_account_expired) { -+ basemsg = _("\nYour account has expired."); -+ } else if (did_we_ask_for_password) { - basemsg = _("\nIncorrect username or password. " - "Letters must be typed in the correct " - "case."); -@@ -1189,7 +1203,7 @@ authenticate_again: - "Letters must be typed in the correct " - "case."); - } -- if (is_capslock) { -+ if (is_capslock && !is_account_disabled && !is_account_expired) { - msg = g_strconcat (basemsg, " ", - _("Caps Lock is on."), - NULL); -@@ -1302,6 +1316,8 @@ gdm_verify_setup_user (GdmDisplay *d, co +@@ -531,8 +534,8 @@ gdm_verify_pam_conv (int num_msg, struct + gdm_log_init (); - /* Start authentication session */ - did_we_ask_for_password = FALSE; -+ is_account_disabled = FALSE; -+ is_account_expired = FALSE; - if ((pamerr = pam_authenticate (pamh, null_tok)) != PAM_SUCCESS) { - if (gdm_slave_action_pending ()) { - gdm_error (_("Couldn't authenticate user")); -Index: gdm-2.17.7/gui/greeter/greeter.c -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter.c -+++ gdm-2.17.7/gui/greeter/greeter.c -@@ -126,6 +126,53 @@ get_random_theme () + for (replies = 0; replies < num_msg; replies++) { +- const char *m = (*msg)[replies].msg; +- m = perhaps_translate_message (m); ++ const char *m_untranslated = (*msg)[replies].msg; ++ const char *m = perhaps_translate_message (m_untranslated); + + switch ((*msg)[replies].msg_style) { + +@@ -588,6 +591,12 @@ gdm_verify_pam_conv (int num_msg, struct + + case PAM_ERROR_MSG: + /* PAM sent a message that should displayed to the user */ ++ ++ if (strstr (m_untranslated, "account is disabled")) ++ is_account_disabled = TRUE; ++ else if (strstr (m_untranslated, "account has expired")) ++ is_account_expired = TRUE; ++ + gdm_slave_greeter_ctl_no_ret (GDM_ERRDLG, m); + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = NULL; +@@ -1266,7 +1275,11 @@ gdm_verify_user (GdmDisplay *d, + /* Only give this message if we actually asked for + password, otherwise it would be silly to say that + the password may have been wrong */ +- if (did_we_ask_for_password) { ++ if (is_account_disabled) { ++ basemsg = _("\nYour account has been disabled."); ++ } else if (is_account_expired) { ++ basemsg = _("\nYour account has expired."); ++ } else if (did_we_ask_for_password) { + basemsg = _("\nIncorrect username or password. " + "Letters must be typed in the correct " + "case."); +@@ -1275,7 +1288,7 @@ gdm_verify_user (GdmDisplay *d, + "Letters must be typed in the correct " + "case."); + } +- if (is_capslock) { ++ if (is_capslock && !is_account_disabled && !is_account_expired) { + msg = g_strconcat (basemsg, " ", + _("Caps Lock is on."), + NULL); +@@ -1388,6 +1401,9 @@ gdm_verify_setup_user (GdmDisplay *d, co + + /* Start authentication session */ + did_we_ask_for_password = FALSE; ++ is_account_disabled = FALSE; ++ is_account_expired = FALSE; ++ + if ((pamerr = pam_authenticate (pamh, null_tok)) != PAM_SUCCESS) { + if (gdm_slave_action_pending ()) { + gdm_error (_("Couldn't authenticate user")); +diff -upr gdm-2.19.3-pre/gui/gdmchooser.c gdm-2.19.3-post/gui/gdmchooser.c +--- gdm-2.19.3-pre/gui/gdmchooser.c 2007-06-17 12:07:28.000000000 -0500 ++++ gdm-2.19.3-post/gui/gdmchooser.c 2007-08-02 22:10:08.000000000 -0500 +@@ -1798,6 +1798,7 @@ gdm_read_config (void) + gdm_config_get_bool (GDM_KEY_ALLOW_ADD); + gdm_config_get_bool (GDM_KEY_BROADCAST); + gdm_config_get_bool (GDM_KEY_MULTICAST); ++ gdm_config_get_bool (GDM_KEY_SHOW_DOMAIN); + + gdmcomm_comm_bulk_stop (); + +@@ -1827,6 +1828,7 @@ gdm_reread_config (int sig, gpointer dat + gdm_config_reload_int (GDM_KEY_SCAN_TIME) || + gdm_config_reload_bool (GDM_KEY_ALLOW_ADD) || + gdm_config_reload_bool (GDM_KEY_BROADCAST) || ++ gdm_config_reload_bool (GDM_KEY_SHOW_DOMAIN) || + gdm_config_reload_bool (GDM_KEY_MULTICAST)) { + + if (RUNNING_UNDER_GDM) { +Only in gdm-2.19.3-post/gui: gdmchooser.c~ +diff -upr gdm-2.19.3-pre/gui/gdmlogin.c gdm-2.19.3-post/gui/gdmlogin.c +--- gdm-2.19.3-pre/gui/gdmlogin.c 2007-06-17 12:07:27.000000000 -0500 ++++ gdm-2.19.3-post/gui/gdmlogin.c 2007-08-02 22:11:09.000000000 -0500 +@@ -2975,6 +2975,7 @@ gdm_read_config (void) + gdm_config_get_bool (GDM_KEY_TIMED_LOGIN_ENABLE); + gdm_config_get_bool (GDM_KEY_TITLE_BAR); + gdm_config_get_bool (GDM_KEY_ADD_GTK_MODULES); ++ gdm_config_get_bool (GDM_KEY_SHOW_DOMAIN); + + /* Keys not to include in reread_config */ + gdm_config_get_bool (GDM_KEY_LOCK_POSITION); +@@ -3057,6 +3058,7 @@ gdm_reread_config (int sig, gpointer dat + gdm_config_reload_bool (GDM_KEY_SYSTEM_MENU) || + gdm_config_reload_bool (GDM_KEY_TIMED_LOGIN_ENABLE) || + gdm_config_reload_bool (GDM_KEY_TITLE_BAR) || ++ gdm_config_reload_bool (GDM_KEY_SHOW_DOMAIN) || + gdm_config_reload_bool (GDM_KEY_ADD_GTK_MODULES)) { + + /* Set busy cursor */ +Only in gdm-2.19.3-post/gui: gdmlogin.c~ +diff -upr gdm-2.19.3-pre/gui/greeter/greeter.c gdm-2.19.3-post/gui/greeter/greeter.c +--- gdm-2.19.3-pre/gui/greeter/greeter.c 2007-08-02 20:01:45.000000000 -0500 ++++ gdm-2.19.3-post/gui/greeter/greeter.c 2007-08-02 23:28:11.000000000 -0500 +@@ -63,6 +63,13 @@ + #include "greeter_session.h" + #include "greeter_system.h" + ++static GtkWidget *hig_dialog_new (GtkWindow *parent, ++ GtkDialogFlags flags, ++ GtkMessageType type, ++ GtkButtonsType buttons, ++ const gchar *primary_message, ++ const gchar *secondary_message); ++ + gboolean DOING_GDM_DEVELOPMENT = FALSE; + + GtkWidget *window; +@@ -153,6 +160,53 @@ get_random_theme () return theme; } @@ -167,12 +184,12 @@ Index: gdm-2.17.7/gui/greeter/greeter.c + gdm_wm_focus_new_windows (TRUE); + + tmp = ve_locale_to_utf8 (errdlg_message); -+ dlg = ve_hig_dialog_new (NULL /* parent */, -+ GTK_DIALOG_MODAL /* flags */, -+ GTK_MESSAGE_ERROR, -+ GTK_BUTTONS_OK, -+ tmp, -+ ""); ++ dlg = hig_dialog_new (NULL /* parent */, ++ GTK_DIALOG_MODAL /* flags */, ++ GTK_MESSAGE_ERROR, ++ GTK_BUTTONS_OK, ++ tmp, ++ ""); + g_free (tmp); + g_free (errdlg_message); + errdlg_message = NULL; @@ -202,7 +219,7 @@ Index: gdm-2.17.7/gui/greeter/greeter.c static gboolean greeter_ctrl_handler (GIOChannel *source, GIOCondition cond, -@@ -192,6 +239,8 @@ process_operation (guchar op_code, +@@ -243,6 +297,8 @@ process_operation (guchar op_code, break; case GDM_PROMPT: @@ -211,7 +228,7 @@ Index: gdm-2.17.7/gui/greeter/greeter.c tmp = ve_locale_to_utf8 (args); if (tmp != NULL && strcmp (tmp, _("Username:")) == 0) { gdm_common_login_sound (gdm_config_get_string (GDM_KEY_SOUND_PROGRAM), -@@ -214,6 +263,8 @@ process_operation (guchar op_code, +@@ -265,6 +321,8 @@ process_operation (guchar op_code, break; case GDM_NOECHO: @@ -220,7 +237,7 @@ Index: gdm-2.17.7/gui/greeter/greeter.c tmp = ve_locale_to_utf8 (args); greeter_probably_login_prompt = FALSE; -@@ -233,6 +284,8 @@ process_operation (guchar op_code, +@@ -284,6 +342,8 @@ process_operation (guchar op_code, break; case GDM_MSG: @@ -229,7 +246,7 @@ Index: gdm-2.17.7/gui/greeter/greeter.c tmp = ve_locale_to_utf8 (args); greeter_item_pam_message (tmp); g_free (tmp); -@@ -241,6 +294,8 @@ process_operation (guchar op_code, +@@ -292,6 +352,8 @@ process_operation (guchar op_code, break; case GDM_ERRBOX: @@ -238,7 +255,7 @@ Index: gdm-2.17.7/gui/greeter/greeter.c tmp = ve_locale_to_utf8 (args); greeter_item_pam_error (tmp); g_free (tmp); -@@ -250,30 +305,17 @@ process_operation (guchar op_code, +@@ -301,30 +363,17 @@ process_operation (guchar op_code, break; case GDM_ERRDLG: @@ -246,13 +263,13 @@ Index: gdm-2.17.7/gui/greeter/greeter.c - gdm_wm_focus_new_windows (TRUE); - tmp = ve_locale_to_utf8 (args); -- dlg = ve_hig_dialog_new (NULL /* parent */, -- GTK_DIALOG_MODAL /* flags */, -- GTK_MESSAGE_ERROR, -- GTK_BUTTONS_OK, -- tmp, -- ""); -+ append_errdlg_message (tmp); +- dlg = hig_dialog_new (NULL /* parent */, +- GTK_DIALOG_MODAL /* flags */, +- GTK_MESSAGE_ERROR, +- GTK_BUTTONS_OK, +- tmp, +- ""); ++ append_errdlg_message (tmp); g_free (tmp); - gdm_wm_center_window (GTK_WINDOW (dlg)); @@ -267,21 +284,18 @@ Index: gdm-2.17.7/gui/greeter/greeter.c break; case GDM_SESS: -+ show_errdlg_messages (); ++ show_errdlg_messages (); + tmp = ve_locale_to_utf8 (args); session = gdm_session_lookup (tmp, &lookup_status); if (lookup_status != SESSION_LOOKUP_SUCCESS) { -@@ -341,6 +383,8 @@ process_operation (guchar op_code, +@@ -392,10 +441,14 @@ process_operation (guchar op_code, break; case GDM_LANG: -+ show_errdlg_messages (); ++ show_errdlg_messages (); + - language = greeter_language_get_language (args); - if (greeter_language_get_save_language () == GTK_RESPONSE_CANCEL) - printf ("%c%s\n", STX, GDM_RESPONSE_CANCEL); -@@ -351,6 +395,8 @@ process_operation (guchar op_code, + gdm_lang_op_lang (args); break; case GDM_SSESS: @@ -290,16 +304,16 @@ Index: gdm-2.17.7/gui/greeter/greeter.c if (gdm_get_save_session () == GTK_RESPONSE_YES) printf ("%cY\n", STX); else -@@ -360,6 +406,8 @@ process_operation (guchar op_code, +@@ -405,6 +458,8 @@ process_operation (guchar op_code, break; case GDM_SLANG: -+ show_errdlg_messages (); ++ show_errdlg_messages (); + - if (greeter_language_get_save_language () == GTK_RESPONSE_YES) - printf ("%cY\n", STX); - else -@@ -399,6 +447,8 @@ process_operation (guchar op_code, + gdm_lang_op_slang (args); + break; + +@@ -447,6 +502,8 @@ process_operation (guchar op_code, break; case GDM_QUIT: @@ -308,7 +322,7 @@ Index: gdm-2.17.7/gui/greeter/greeter.c greeter_item_timed_stop (); if (require_quarter) { -@@ -503,6 +553,8 @@ process_operation (guchar op_code, +@@ -563,6 +620,8 @@ process_operation (guchar op_code, break; case GDM_SAVEDIE: @@ -317,7 +331,7 @@ Index: gdm-2.17.7/gui/greeter/greeter.c /* Set busy cursor */ gdm_common_setup_cursor (GDK_WATCH); -@@ -522,6 +574,8 @@ process_operation (guchar op_code, +@@ -582,6 +641,8 @@ process_operation (guchar op_code, break; default: @@ -326,26 +340,25 @@ Index: gdm-2.17.7/gui/greeter/greeter.c gdm_common_fail_greeter ("Unexpected greeter command received: '%c'", op_code); break; } -@@ -849,6 +903,7 @@ gdm_read_config (void) +@@ -918,6 +979,7 @@ gdm_read_config (void) gdm_config_get_bool (GDM_KEY_SOUND_ON_LOGIN); gdm_config_get_bool (GDM_KEY_DEFAULT_WELCOME); gdm_config_get_bool (GDM_KEY_DEFAULT_REMOTE_WELCOME); -+ gdm_config_get_bool (GDM_KEY_SHOW_DOMAIN); ++ gdm_config_get_bool (GDM_KEY_SHOW_DOMAIN); gdm_config_get_bool (GDM_KEY_ADD_GTK_MODULES); + gdm_config_get_bool (GDM_KEY_BROWSER); - /* Keys for custom commands */ -@@ -934,6 +989,7 @@ greeter_reread_config (int sig, gpointer +@@ -1007,6 +1069,7 @@ greeter_reread_config (int sig, gpointer gdm_config_reload_bool (GDM_KEY_SHOW_LAST_SESSION) || gdm_config_reload_bool (GDM_KEY_ALLOW_ROOT) || gdm_config_reload_bool (GDM_KEY_ALLOW_REMOTE_ROOT) || -+ gdm_config_reload_bool (GDM_KEY_SHOW_DOMAIN) || - gdm_config_reload_bool (GDM_KEY_ADD_GTK_MODULES)) { ++ gdm_config_reload_bool (GDM_KEY_SHOW_DOMAIN) || + gdm_config_reload_bool (GDM_KEY_ADD_GTK_MODULES) || + gdm_config_reload_bool (GDM_KEY_BROWSER)) { - /* Set busy cursor */ -Index: gdm-2.17.7/gui/greeter/greeter_canvas_item.c -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter_canvas_item.c -+++ gdm-2.17.7/gui/greeter/greeter_canvas_item.c +diff -upr gdm-2.19.3-pre/gui/greeter/greeter_canvas_item.c gdm-2.19.3-post/gui/greeter/greeter_canvas_item.c +--- gdm-2.19.3-pre/gui/greeter/greeter_canvas_item.c 2007-08-02 20:01:45.000000000 -0500 ++++ gdm-2.19.3-post/gui/greeter/greeter_canvas_item.c 2007-08-02 20:59:53.000000000 -0500 @@ -20,6 +20,8 @@ #include @@ -355,7 +368,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_canvas_item.c #include #include #include -@@ -42,6 +44,9 @@ +@@ -46,6 +48,9 @@ #include "greeter_canvas_text.h" #include "greeter_parser.h" @@ -365,7 +378,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_canvas_item.c /* Keep track of buttons so they can be set sensitive/insensitive */ GtkButton *gtk_ok_button = NULL; GtkButton *gtk_start_again_button = NULL; -@@ -381,6 +386,189 @@ set_root_pixmap (GdkPixmap *pixmap) +@@ -385,6 +390,189 @@ set_root_pixmap (GdkPixmap *pixmap) return FALSE; } @@ -555,7 +568,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_canvas_item.c void greeter_item_create_canvas_item (GreeterItemInfo *item) { -@@ -672,6 +860,48 @@ greeter_item_create_canvas_item (Greeter +@@ -676,6 +864,48 @@ greeter_item_create_canvas_item (Greeter break; @@ -604,10 +617,9 @@ Index: gdm-2.17.7/gui/greeter/greeter_canvas_item.c case GREETER_ITEM_TYPE_LIST: /* Note a list type must be setup later and we will add the list store * to it then, depending on the type. Likely userlist is the -Index: gdm-2.17.7/gui/greeter/greeter_configuration.h -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter_configuration.h -+++ gdm-2.17.7/gui/greeter/greeter_configuration.h +diff -upr gdm-2.19.3-pre/gui/greeter/greeter_configuration.h gdm-2.19.3-post/gui/greeter/greeter_configuration.h +--- gdm-2.19.3-pre/gui/greeter/greeter_configuration.h 2007-06-17 12:07:26.000000000 -0500 ++++ gdm-2.19.3-post/gui/greeter/greeter_configuration.h 2007-08-02 20:59:53.000000000 -0500 @@ -65,6 +65,7 @@ extern gchar *GdmSoundOnLoginFailureFile extern gboolean GdmSoundOnLoginReady; extern gboolean GdmSoundOnLoginSuccess; @@ -616,10 +628,9 @@ Index: gdm-2.17.7/gui/greeter/greeter_configuration.h extern gboolean GDM_IS_LOCAL; extern gboolean DOING_GDM_DEVELOPMENT; -Index: gdm-2.17.7/gui/greeter/greeter.h -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter.h -+++ gdm-2.17.7/gui/greeter/greeter.h +diff -upr gdm-2.19.3-pre/gui/greeter/greeter.h gdm-2.19.3-post/gui/greeter/greeter.h +--- gdm-2.19.3-pre/gui/greeter/greeter.h 2007-06-17 12:07:26.000000000 -0500 ++++ gdm-2.19.3-post/gui/greeter/greeter.h 2007-08-02 20:59:53.000000000 -0500 @@ -27,6 +27,9 @@ extern GtkWidget *window; extern gboolean greeter_probably_login_prompt; @@ -630,12 +641,11 @@ Index: gdm-2.17.7/gui/greeter/greeter.h void greeter_ignore_buttons (gboolean val); #endif -Index: gdm-2.17.7/gui/greeter/greeter_item.c -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter_item.c -+++ gdm-2.17.7/gui/greeter/greeter_item.c -@@ -223,6 +223,10 @@ greeter_item_is_visible (GreeterItemInfo - g_free (key_string); +diff -upr gdm-2.19.3-pre/gui/greeter/greeter_item.c gdm-2.19.3-post/gui/greeter/greeter_item.c +--- gdm-2.19.3-pre/gui/greeter/greeter_item.c 2007-06-17 12:07:26.000000000 -0500 ++++ gdm-2.19.3-post/gui/greeter/greeter_item.c 2007-08-02 20:59:53.000000000 -0500 +@@ -234,6 +234,10 @@ greeter_item_is_visible (GreeterItemInfo + return FALSE; } + if ( ! gdm_config_get_bool (GDM_KEY_SHOW_DOMAIN) && @@ -645,10 +655,9 @@ Index: gdm-2.17.7/gui/greeter/greeter_item.c if (( ! gdm_config_get_bool (GDM_KEY_TIMED_LOGIN_ENABLE) || ve_string_empty (gdm_config_get_string (GDM_KEY_TIMED_LOGIN)) || NULL == g_getenv("GDM_TIMED_LOGIN_OK")) && -Index: gdm-2.17.7/gui/greeter/greeter_item.h -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter_item.h -+++ gdm-2.17.7/gui/greeter/greeter_item.h +diff -upr gdm-2.19.3-pre/gui/greeter/greeter_item.h gdm-2.19.3-post/gui/greeter/greeter_item.h +--- gdm-2.19.3-pre/gui/greeter/greeter_item.h 2007-06-17 12:07:26.000000000 -0500 ++++ gdm-2.19.3-post/gui/greeter/greeter_item.h 2007-08-02 20:59:53.000000000 -0500 @@ -47,7 +47,8 @@ enum _GreeterItemType { GREETER_ITEM_TYPE_LABEL, GREETER_ITEM_TYPE_ENTRY, @@ -659,7 +668,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_item.h }; /* Make sure to adjust the bitfield in the structure if -@@ -147,7 +148,7 @@ struct _GreeterItemInfo { +@@ -154,7 +155,7 @@ struct _GreeterItemInfo { union { /* Note: we want to have alphas, colors and have_color coincide for * all types that have it */ @@ -668,11 +677,18 @@ Index: gdm-2.17.7/gui/greeter/greeter_item.h struct { guint8 alphas[GREETER_ITEM_STATE_MAX]; guint32 colors[GREETER_ITEM_STATE_MAX]; -Index: gdm-2.17.7/gui/greeter/greeter_item_pam.c -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter_item_pam.c -+++ gdm-2.17.7/gui/greeter/greeter_item_pam.c -@@ -36,6 +36,7 @@ +diff -upr gdm-2.19.3-pre/gui/greeter/greeter_item_pam.c gdm-2.19.3-post/gui/greeter/greeter_item_pam.c +--- gdm-2.19.3-pre/gui/greeter/greeter_item_pam.c 2007-06-17 12:07:26.000000000 -0500 ++++ gdm-2.19.3-post/gui/greeter/greeter_item_pam.c 2007-08-02 22:21:47.000000000 -0500 +@@ -25,6 +25,7 @@ + + #include "gdm-common.h" + #include "gdm-socket-protocol.h" ++#include "gdm-daemon-config-keys.h" + + #include "greeter.h" + #include "greeter_item.h" +@@ -37,6 +38,7 @@ #include "gdm.h" #include "gdmwm.h" #include "gdmcommon.h" @@ -680,7 +696,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_item_pam.c static gboolean messages_to_give = FALSE; static gboolean replace_msg = TRUE; -@@ -117,11 +118,29 @@ set_text (GreeterItemInfo *info, const c +@@ -116,11 +118,29 @@ set_text (GreeterItemInfo *info, const c info->item); } @@ -711,7 +727,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_item_pam.c GreeterItemInfo *error_info; if (gtk_ok_button != NULL) -@@ -153,6 +172,7 @@ greeter_item_pam_login (GtkEntry *entry, +@@ -152,6 +172,7 @@ greeter_item_pam_login (GtkEntry *entry, } gtk_widget_set_sensitive (GTK_WIDGET (entry), FALSE); @@ -719,7 +735,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_item_pam.c /* clear the err_box */ if (err_box_clear_handler > 0) -@@ -167,6 +187,33 @@ greeter_item_pam_login (GtkEntry *entry, +@@ -166,6 +187,33 @@ greeter_item_pam_login (GtkEntry *entry, } tmp = ve_locale_from_utf8 (str); @@ -753,7 +769,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_item_pam.c printf ("%c%s\n", STX, tmp); fflush (stdout); g_free (tmp); -@@ -233,6 +280,7 @@ greeter_item_pam_setup (void) +@@ -224,6 +272,7 @@ greeter_item_pam_setup (void) /* initially insensitive */ gtk_widget_set_sensitive (entry, FALSE); @@ -761,7 +777,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_item_pam.c } g_signal_connect (entry, "activate", -@@ -272,6 +320,9 @@ greeter_item_pam_prompt (const char *mes +@@ -288,6 +337,9 @@ greeter_item_pam_prompt (const char *mes gtk_entry_set_max_length (GTK_ENTRY (entry), entry_len); gtk_entry_set_text (GTK_ENTRY (entry), ""); gtk_widget_grab_focus (entry); @@ -771,11 +787,10 @@ Index: gdm-2.17.7/gui/greeter/greeter_item_pam.c } messages_to_give = FALSE; -Index: gdm-2.17.7/gui/greeter/greeter_parser.c -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter_parser.c -+++ gdm-2.17.7/gui/greeter/greeter_parser.c -@@ -395,6 +395,11 @@ parse_stock (xmlNodePtr node, +diff -upr gdm-2.19.3-pre/gui/greeter/greeter_parser.c gdm-2.19.3-post/gui/greeter/greeter_parser.c +--- gdm-2.19.3-pre/gui/greeter/greeter_parser.c 2007-06-17 12:07:26.000000000 -0500 ++++ gdm-2.19.3-post/gui/greeter/greeter_parser.c 2007-08-02 20:59:53.000000000 -0500 +@@ -402,6 +402,11 @@ parse_stock (xmlNodePtr node, g_free (*translated_text); *translated_text = g_strdup (_("Username:")); } @@ -787,7 +802,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_parser.c else if (g_ascii_strcasecmp ((char *) prop, "ok") == 0) { g_free (*translated_text); -@@ -1633,6 +1638,15 @@ parse_entry (xmlNodePtr node, +@@ -1649,6 +1654,15 @@ parse_entry (xmlNodePtr node, } static gboolean @@ -803,7 +818,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_parser.c parse_items (xmlNodePtr node, GList **items_out, GreeterItemInfo *parent, -@@ -1687,6 +1701,8 @@ parse_items (xmlNodePtr node, +@@ -1704,6 +1718,8 @@ parse_items (xmlNodePtr node, item_type = GREETER_ITEM_TYPE_LIST; else if (strcmp ((char *) type, "button") == 0) item_type = GREETER_ITEM_TYPE_BUTTON; @@ -812,7 +827,7 @@ Index: gdm-2.17.7/gui/greeter/greeter_parser.c else { g_set_error (error, -@@ -1733,6 +1749,9 @@ parse_items (xmlNodePtr node, +@@ -1750,6 +1766,9 @@ parse_items (xmlNodePtr node, case GREETER_ITEM_TYPE_BUTTON: res = parse_gtkbutton (child, info, error); break; diff --git a/gdm-2.8.0.7-halt-needs-root.patch b/gdm-2.8.0.7-halt-needs-root.patch index a7f50c7..c0d74bb 100644 --- a/gdm-2.8.0.7-halt-needs-root.patch +++ b/gdm-2.8.0.7-halt-needs-root.patch @@ -1,108 +1,46 @@ -diff -upr gdm-2.16.1-pre/daemon/gdm.c gdm-2.16.1-post/daemon/gdm.c ---- gdm-2.16.1-pre/daemon/gdm.c 2006-09-11 15:36:16.000000000 -0500 -+++ gdm-2.16.1-post/daemon/gdm.c 2006-11-07 19:19:53.000000000 -0600 -@@ -2347,6 +2347,9 @@ gdm_handle_message (GdmConnection *conn, - return; - d = gdm_display_lookup (slave_pid); - -+ if (!gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ return; -+ - gdm_info (_("Master suspending...")); - - sysmenu = gdm_get_value_bool_per_display (d->name, GDM_KEY_SYSTEM_MENU); -@@ -3242,21 +3245,24 @@ gdm_handle_user_message (GdmConnection * - if (logout_action == GDM_LOGOUT_ACTION_NONE) - logout_action = safe_logout_action; - -- if (sysmenu && disp->attached && -+ if (sysmenu && disp->attached && gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ !gdm_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) && - ! ve_string_empty (gdm_get_value_string (GDM_KEY_HALT))) { - g_string_append_printf (msg, "%s%s", sep, GDM_SUP_LOGOUT_ACTION_HALT); - if (logout_action == GDM_LOGOUT_ACTION_HALT) - g_string_append (msg, "!"); - sep = ";"; - } -- if (sysmenu && disp->attached && -+ if (sysmenu && disp->attached && gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ !gdm_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) && - ! ve_string_empty (gdm_get_value_string (GDM_KEY_REBOOT))) { - g_string_append_printf (msg, "%s%s", sep, GDM_SUP_LOGOUT_ACTION_REBOOT); - if (logout_action == GDM_LOGOUT_ACTION_REBOOT) - g_string_append (msg, "!"); - sep = ";"; - } -- if (sysmenu && disp->attached && -+ if (sysmenu && disp->attached && gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ !gdm_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) && - ! ve_string_empty (gdm_get_value_string (GDM_KEY_SUSPEND))) { - g_string_append_printf (msg, "%s%s", sep, GDM_SUP_LOGOUT_ACTION_SUSPEND); - if (logout_action == GDM_LOGOUT_ACTION_SUSPEND) -@@ -3292,21 +3298,24 @@ gdm_handle_user_message (GdmConnection * - disp->logout_action = GDM_LOGOUT_ACTION_NONE; - was_ok = TRUE; - } else if (strcmp (action, GDM_SUP_LOGOUT_ACTION_HALT) == 0) { -- if (sysmenu && disp->attached && -+ if (sysmenu && disp->attached && gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ !gdm_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) && - ! ve_string_empty (gdm_get_value_string (GDM_KEY_HALT))) { - disp->logout_action = - GDM_LOGOUT_ACTION_HALT; - was_ok = TRUE; - } - } else if (strcmp (action, GDM_SUP_LOGOUT_ACTION_REBOOT) == 0) { -- if (sysmenu && disp->attached && -+ if (sysmenu && disp->attached && gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ !gdm_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) && - ! ve_string_empty (gdm_get_value_string (GDM_KEY_REBOOT))) { - disp->logout_action = - GDM_LOGOUT_ACTION_REBOOT; - was_ok = TRUE; - } - } else if (strcmp (action, GDM_SUP_LOGOUT_ACTION_SUSPEND) == 0) { -- if (sysmenu && disp->attached && -+ if (sysmenu && disp->attached && gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ !gdm_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) && - ! ve_string_empty (gdm_get_value_string (GDM_KEY_SUSPEND))) { - disp->logout_action = - GDM_LOGOUT_ACTION_SUSPEND; -diff -upr gdm-2.16.1-pre/daemon/gdmconfig.c gdm-2.16.1-post/daemon/gdmconfig.c ---- gdm-2.16.1-pre/daemon/gdmconfig.c 2006-07-17 13:43:51.000000000 -0500 -+++ gdm-2.16.1-post/daemon/gdmconfig.c 2006-11-07 23:19:19.000000000 -0600 -@@ -251,6 +251,8 @@ static gboolean GdmGraphicalThemeRand; - static gboolean GdmBroadcast; - static gboolean GdmAllowAdd; - static gboolean GdmRestartBackgroundProgram; -+static gboolean GdmAllowShutdown; -+static gboolean GdmSecureShutdown; - - /** - * gdm_config_add_hash -@@ -418,6 +420,8 @@ gdm_config_init (void) - gdm_config_add_hash (GDM_KEY_SOUND_ON_LOGIN, &GdmSoundOnLogin, &bool_type); - gdm_config_add_hash (GDM_KEY_RESTART_BACKGROUND_PROGRAM, - &GdmRestartBackgroundProgram, &bool_type); -+ gdm_config_add_hash (GDM_KEY_ALLOW_SHUTDOWN, &GdmAllowShutdown, &bool_type); -+ gdm_config_add_hash (GDM_KEY_SECURE_SHUTDOWN, &GdmSecureShutdown, &bool_type); - - /* string values */ - gdm_config_add_hash (GDM_KEY_PATH, &GdmPath, &string_type); -@@ -1277,6 +1281,10 @@ _gdm_set_value_bool (gchar *key, gboolea - notify_displays_int (GDM_NOTIFY_ADD_GTK_MODULES, *setting); - else if (is_key (key, GDM_KEY_TIMED_LOGIN_ENABLE)) - notify_displays_int (GDM_NOTIFY_TIMED_LOGIN_ENABLE, *setting); -+ else if (is_key (key, GDM_KEY_ALLOW_SHUTDOWN)) -+ notify_displays_int (GDM_NOTIFY_ALLOW_SHUTDOWN, *setting); -+ else if (is_key (key, GDM_KEY_SECURE_SHUTDOWN)) -+ notify_displays_int (GDM_NOTIFY_SECURE_SHUTDOWN, *setting); - } - - if (*setting) -diff -upr gdm-2.16.1-pre/daemon/gdm.h gdm-2.16.1-post/daemon/gdm.h ---- gdm-2.16.1-pre/daemon/gdm.h 2006-11-07 18:31:11.000000000 -0600 -+++ gdm-2.16.1-post/daemon/gdm.h 2006-11-07 20:04:54.000000000 -0600 -@@ -123,6 +123,8 @@ enum { +diff -upr gdm-2.19.5-pre/daemon/gdm-daemon-config-entries.h gdm-2.19.5-post/daemon/gdm-daemon-config-entries.h +--- gdm-2.19.5-pre/daemon/gdm-daemon-config-entries.h 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-daemon-config-entries.h 2007-08-03 19:21:37.000000000 -0500 +@@ -110,6 +110,7 @@ typedef enum { + GDM_ID_ALLOW_ROOT, + GDM_ID_ALLOW_REMOTE_ROOT, + GDM_ID_ALLOW_REMOTE_AUTOLOGIN, ++ GDM_ID_SECURE_SHUTDOWN, + GDM_ID_USER_MAX_FILE, + GDM_ID_RELAX_PERM, + GDM_ID_CHECK_DIR_OWNER, +@@ -359,6 +360,7 @@ static const GdmConfigEntry gdm_daemon_c + { GDM_CONFIG_GROUP_SECURITY, "AllowRoot", GDM_CONFIG_VALUE_BOOL, "true", GDM_ID_ALLOW_ROOT }, + { GDM_CONFIG_GROUP_SECURITY, "AllowRemoteRoot", GDM_CONFIG_VALUE_BOOL, "false", GDM_ID_ALLOW_REMOTE_ROOT }, + { GDM_CONFIG_GROUP_SECURITY, "AllowRemoteAutoLogin", GDM_CONFIG_VALUE_BOOL, "false", GDM_ID_ALLOW_REMOTE_AUTOLOGIN }, ++ { GDM_CONFIG_GROUP_SECURITY, "SecureShutdown", GDM_CONFIG_VALUE_BOOL, "false", GDM_ID_SECURE_SHUTDOWN }, + { GDM_CONFIG_GROUP_SECURITY, "UserMaxFile", GDM_CONFIG_VALUE_INT, "65536", GDM_ID_USER_MAX_FILE }, + { GDM_CONFIG_GROUP_SECURITY, "RelaxPermissions", GDM_CONFIG_VALUE_INT, "0", GDM_ID_RELAX_PERM }, + { GDM_CONFIG_GROUP_SECURITY, "CheckDirOwner", GDM_CONFIG_VALUE_BOOL, "true", GDM_ID_CHECK_DIR_OWNER }, +diff -upr gdm-2.19.5-pre/daemon/gdm-daemon-config-keys.h gdm-2.19.5-post/daemon/gdm-daemon-config-keys.h +--- gdm-2.19.5-pre/daemon/gdm-daemon-config-keys.h 2007-08-03 17:56:58.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-daemon-config-keys.h 2007-08-03 18:59:38.000000000 -0500 +@@ -98,6 +98,7 @@ G_BEGIN_DECLS + #define GDM_KEY_ALLOW_ROOT "security/AllowRoot=true" + #define GDM_KEY_ALLOW_REMOTE_ROOT "security/AllowRemoteRoot=false" + #define GDM_KEY_ALLOW_REMOTE_AUTOLOGIN "security/AllowRemoteAutoLogin=false" ++#define GDM_KEY_SECURE_SHUTDOWN "security/SecureShutdown=false" + #define GDM_KEY_USER_MAX_FILE "security/UserMaxFile=65536" + #define GDM_KEY_RELAX_PERM "security/RelaxPermissions=0" + #define GDM_KEY_CHECK_DIR_OWNER "security/CheckDirOwner=true" +@@ -208,6 +209,7 @@ G_BEGIN_DECLS + #define GDM_NOTIFY_ALLOW_REMOTE_ROOT "AllowRemoteRoot" /* */ + #define GDM_NOTIFY_ALLOW_ROOT "AllowRoot" /* */ + #define GDM_NOTIFY_ALLOW_REMOTE_AUTOLOGIN "AllowRemoteAutoLogin" /* */ ++#define GDM_NOTIFY_SECURE_SHUTDOWN "SecureShutdown" /* */ + #define GDM_NOTIFY_SYSTEM_MENU "SystemMenu" /* */ + #define GDM_NOTIFY_CONFIG_AVAILABLE "ConfigAvailable" /* */ + #define GDM_NOTIFY_CHOOSER_BUTTON "ChooserButton" /* */ +Only in gdm-2.19.5-post/daemon: gdm.h.rej +diff -upr gdm-2.19.5-pre/daemon/gdm-socket-protocol.h gdm-2.19.5-post/daemon/gdm-socket-protocol.h +--- gdm-2.19.5-pre/daemon/gdm-socket-protocol.h 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-socket-protocol.h 2007-08-03 18:57:43.000000000 -0500 +@@ -68,6 +68,8 @@ /* Different login interruptions */ #define GDM_INTERRUPT_TIMED_LOGIN 'T' #define GDM_INTERRUPT_CONFIGURE 'C' @@ -111,38 +49,19 @@ diff -upr gdm-2.16.1-pre/daemon/gdm.h gdm-2.16.1-post/daemon/gdm.h #define GDM_INTERRUPT_SUSPEND 'S' #define GDM_INTERRUPT_SELECT_USER 'U' #define GDM_INTERRUPT_LOGIN_SOUND 'L' -@@ -418,6 +420,9 @@ enum { - #define GDM_KEY_SHOW_XTERM_FAILSAFE "greeter/ShowXtermFailsafeSession=true" - #define GDM_KEY_SHOW_LAST_SESSION "greeter/ShowLastSession=true" - -+#define GDM_KEY_ALLOW_SHUTDOWN "security/AllowShutdown=true" -+#define GDM_KEY_SECURE_SHUTDOWN "security/SecureShutdown=false" -+ - #define GDM_SESSION_FAILSAFE_GNOME "GDM_Failsafe.GNOME" - #define GDM_SESSION_FAILSAFE_XTERM "GDM_Failsafe.XTERM" - -@@ -733,6 +738,8 @@ void gdm_final_cleanup (void); - #define GDM_NOTIFY_SOUND_ON_LOGIN_FAILURE_FILE "SoundOnLoginFailureFile" /* */ - #define GDM_NOTIFY_ADD_GTK_MODULES "AddGtkModules" /* */ - #define GDM_NOTIFY_GTK_MODULES_LIST "GtkModulesList" /* */ -+#define GDM_NOTIFY_ALLOW_SHUTDOWN "AllowShutdown" /* */ -+#define GDM_NOTIFY_SECURE_SHUTDOWN "SecureShutdown" /* */ - - /* commands, seel GDM_SLAVE_NOTIFY_COMMAND */ - #define GDM_NOTIFY_DIRTY_SERVERS "DIRTY_SERVERS" -diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c ---- gdm-2.16.1-pre/daemon/slave.c 2006-11-07 18:31:11.000000000 -0600 -+++ gdm-2.16.1-post/daemon/slave.c 2006-11-07 19:56:06.000000000 -0600 -@@ -101,6 +101,8 @@ static gboolean do_timed_login = FALSE; - login the timed login */ - static gboolean do_configurator = FALSE; /* if this is true, login as root - * and start the configurator */ -+static gboolean do_system_halt = FALSE; -+static gboolean do_system_reboot = FALSE; - static gboolean do_cancel = FALSE; /* if this is true, go back to - username entry & unselect face - browser (if present) */ -@@ -1893,6 +1895,97 @@ play_login_sound (const char *sound_file +diff -upr gdm-2.19.5-pre/daemon/slave.c gdm-2.19.5-post/daemon/slave.c +--- gdm-2.19.5-pre/daemon/slave.c 2007-08-03 17:56:58.000000000 -0500 ++++ gdm-2.19.5-post/daemon/slave.c 2007-08-03 19:10:15.000000000 -0500 +@@ -129,6 +129,8 @@ static gboolean do_timed_login = + static gboolean do_configurator = FALSE; /* If this is true, login as + * root and start the + * configurator */ ++static gboolean do_system_halt = FALSE; ++static gboolean do_system_reboot = FALSE; + static gboolean do_cancel = FALSE; /* If this is true, go back to + username entry & unselect + face browser (if present) */ +@@ -2056,6 +2058,96 @@ play_login_sound (const char *sound_file return TRUE; } @@ -156,30 +75,29 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c + gdm_slave_greeter_ctl_no_ret (GDM_MSG, message); + + /* we always allow root for this */ -+ oldAllowRoot = gdm_get_value_bool (GDM_KEY_ALLOW_ROOT); -+ gdm_set_value_bool (GDM_KEY_ALLOW_ROOT, TRUE); ++ oldAllowRoot = gdm_daemon_config_get_value_bool (GDM_KEY_ALLOW_ROOT); ++ gdm_daemon_config_set_value_bool (GDM_KEY_ALLOW_ROOT, TRUE); + + *pwent = getpwuid (0); + if G_UNLIKELY (*pwent == NULL) { + /* what? no "root" ?? */ + gdm_slave_greeter_ctl_no_ret (GDM_RESET, ""); -+ gdm_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); ++ gdm_daemon_config_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); + return FALSE; /* continue */ + } + + gdm_slave_greeter_ctl_no_ret (GDM_SETLOGIN, (*pwent)->pw_name); -+ login = gdm_verify_user (d, -+ (*pwent)->pw_name, -+ d->name, -+ d->attached); -+ gdm_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); ++ login_user = gdm_verify_user (d, ++ (*pwent)->pw_name, ++ FALSE); ++ gdm_daemon_config_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); + + /* Clear message */ + gdm_slave_greeter_ctl_no_ret (GDM_MSG, ""); + + if G_UNLIKELY (do_restart_greeter) { -+ g_free (login); -+ login = NULL; ++ g_free (login_user); ++ login_user = NULL; + do_restart_greeter = FALSE; + restart_the_greeter (); + return FALSE; /* continue */ @@ -188,15 +106,15 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c + check_notifies_now (); + + /* The wanker can't remember his password */ -+ if (login == NULL) { ++ if (login_user == NULL) { + gdm_debug ("gdm_slave_wait_for_login: No login/Bad login"); + gdm_slave_greeter_ctl_no_ret (GDM_RESET, ""); + return FALSE; /* continue */ + } + + /* Wipe the login */ -+ g_free (login); -+ login = NULL; ++ g_free (login_user); ++ login_user = NULL; + + /* Note that this can still fall through to + * the timed login if the user doesn't type in the @@ -240,10 +158,10 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c static void gdm_slave_wait_for_login (void) { -@@ -1949,88 +2042,13 @@ gdm_slave_wait_for_login (void) +@@ -2116,86 +2208,12 @@ gdm_slave_wait_for_login (void) do_configurator = FALSE; - g_free (login); - login = NULL; + g_free (login_user); + login_user = NULL; - /* clear any error */ - gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX, ""); - gdm_slave_greeter_ctl_no_ret @@ -251,8 +169,8 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c - _("You must authenticate as root to run configuration.")); - - /* we always allow root for this */ -- oldAllowRoot = gdm_get_value_bool (GDM_KEY_ALLOW_ROOT); -- gdm_set_value_bool (GDM_KEY_ALLOW_ROOT, TRUE); +- oldAllowRoot = gdm_daemon_config_get_value_bool (GDM_KEY_ALLOW_ROOT); +- gdm_daemon_config_set_value_bool (GDM_KEY_ALLOW_ROOT, TRUE); - - pwent = getpwuid (0); - if G_UNLIKELY (pwent == NULL) { @@ -260,40 +178,36 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c - gdm_slave_greeter_ctl_no_ret (GDM_RESET, ""); - continue; - } - +- - gdm_slave_greeter_ctl_no_ret (GDM_SETLOGIN, pwent->pw_name); -- login = gdm_verify_user (d, -- pwent->pw_name, -- d->name, -- d->attached); -- gdm_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); +- login_user = gdm_verify_user (d, +- pwent->pw_name, +- FALSE); +- gdm_daemon_config_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); - - /* Clear message */ - gdm_slave_greeter_ctl_no_ret (GDM_MSG, ""); - - if G_UNLIKELY (do_restart_greeter) { -- g_free (login); -- login = NULL; +- g_free (login_user); +- login_user = NULL; - do_restart_greeter = FALSE; - restart_the_greeter (); -+ if (!get_root_auth (_("You must authenticate as root to run configuration."), &pwent)) { -+ if (do_timed_login) -+ break; - continue; - } - +- continue; +- } +- - check_notifies_now (); - -- /* The wanker can't remember his password */ -- if (login == NULL) { +- /* The user can't remember his password */ +- if (login_user == NULL) { - gdm_debug ("gdm_slave_wait_for_login: No login/Bad login"); - gdm_slave_greeter_ctl_no_ret (GDM_RESET, ""); - continue; - } - - /* Wipe the login */ -- g_free (login); -- login = NULL; +- g_free (login_user); +- login_user = NULL; - - /* Note that this can still fall through to - * the timed login if the user doesn't type in the @@ -303,13 +217,12 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c - break; - } - -- /* The user is a wanker */ - if G_UNLIKELY (do_configurator) { - do_configurator = FALSE; - gdm_slave_greeter_ctl_no_ret (GDM_RESET, ""); - continue; - } -- + - /* Now running as root */ - - /* Get the root pwent */ @@ -320,8 +233,11 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c - * since we logged in, but I'm paranoid */ - gdm_slave_greeter_ctl_no_ret (GDM_RESET, ""); - continue; -- } -- ++ if (!get_root_auth (_("You must authenticate as root to run configuration."), &pwent)) { ++ if (do_timed_login) ++ break; + } + - d->logged_in = TRUE; - logged_in_uid = 0; - logged_in_gid = 0; @@ -332,7 +248,7 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c /* Disable the login screen, we don't want people to * log in in the meantime */ gdm_slave_greeter_ctl_no_ret (GDM_DISABLE, ""); -@@ -2069,6 +2087,49 @@ gdm_slave_wait_for_login (void) +@@ -2234,6 +2252,43 @@ gdm_slave_wait_for_login (void) continue; } @@ -340,13 +256,10 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c + struct passwd *pwent; + + do_system_halt = FALSE; -+ g_free (login); -+ login = NULL; ++ g_free (login_user); ++ login_user = NULL; + -+ if (!gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ continue; -+ -+ if (!gdm_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) || ++ if (!gdm_daemon_config_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) || + get_root_auth (_("You must authenticate as root to shut down."), &pwent)) { + exit_code_to_use = DISPLAY_HALT; + term_quit (); @@ -361,13 +274,10 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c + struct passwd *pwent; + + do_system_reboot = FALSE; -+ g_free (login); -+ login = NULL; ++ g_free (login_user); ++ login_user = NULL; + -+ if (!gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ continue; -+ -+ if (!gdm_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) || ++ if (!gdm_daemon_config_get_value_bool (GDM_KEY_SECURE_SHUTDOWN) || + get_root_auth (_("You must authenticate as root to restart the computer."), &pwent)) { + exit_code_to_use = DISPLAY_REBOOT; + term_quit (); @@ -382,28 +292,22 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c /* The user timed out into a timed login during the * conversation */ if (do_timed_login) { -@@ -4943,9 +5004,20 @@ check_for_interruption (const char *msg) - do_configurator = TRUE; - } - break; +@@ -5453,6 +5508,14 @@ check_for_interruption (const char *msg) + /* Not interrupted, continue reading input, + * just proxy this to the master server */ + return TRUE; + case GDM_INTERRUPT_HALT: -+ if (d->attached) { ++ if (d->attached) + do_system_halt = TRUE; -+ } + break; + case GDM_INTERRUPT_REBOOT: -+ if (d->attached) { ++ if (d->attached) + do_system_reboot = TRUE; -+ } + break; - case GDM_INTERRUPT_SUSPEND: + case GDM_INTERRUPT_LOGIN_SOUND: if (d->attached && - gdm_get_value_bool_per_display (d->name, GDM_KEY_SYSTEM_MENU) && -+ gdm_get_value_bool (GDM_KEY_ALLOW_SHUTDOWN) && - ! ve_string_empty (gdm_get_value_string (GDM_KEY_SUSPEND))) { - gchar *msg = g_strdup_printf ("%s %ld", - GDM_SOP_SUSPEND_MACHINE, -@@ -5358,6 +5430,8 @@ gdm_slave_action_pending (void) + ! play_login_sound (gdm_daemon_config_get_value_string (GDM_KEY_SOUND_ON_LOGIN_FILE))) { +@@ -5909,6 +5972,8 @@ gdm_slave_action_pending (void) { if (do_timed_login || do_configurator || @@ -412,40 +316,32 @@ diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c do_restart_greeter || do_cancel) return FALSE; -@@ -5629,6 +5703,12 @@ gdm_slave_handle_notify (const char *msg +@@ -6192,6 +6257,8 @@ gdm_slave_handle_notify (const char *msg remanage_asap = TRUE; } } -+ } else if (sscanf (msg, GDM_NOTIFY_ALLOW_SHUTDOWN " %d", &val) == 1) { -+ gdm_set_value_bool (GDM_KEY_ALLOW_SHUTDOWN, val); -+ if (d->greetpid > 1) -+ kill (d->greetpid, SIGHUP); + } else if (sscanf (msg, GDM_NOTIFY_SECURE_SHUTDOWN " %d", &val) == 1) { -+ gdm_set_value_bool (GDM_KEY_SECURE_SHUTDOWN, val); ++ gdm_daemon_config_set_value_bool (GDM_KEY_SECURE_SHUTDOWN, val); } } -diff -upr gdm-2.16.1-pre/gui/gdmlogin.c gdm-2.16.1-post/gui/gdmlogin.c ---- gdm-2.16.1-pre/gui/gdmlogin.c 2006-07-21 12:56:26.000000000 -0500 -+++ gdm-2.16.1-post/gui/gdmlogin.c 2006-11-07 21:19:38.000000000 -0600 -@@ -658,14 +658,20 @@ gdm_run_gdmconfig (GtkWidget *w, gpointe +Only in gdm-2.19.5-post: error.17751 +diff -upr gdm-2.19.5-pre/gui/gdmlogin.c gdm-2.19.5-post/gui/gdmlogin.c +--- gdm-2.19.5-pre/gui/gdmlogin.c 2007-08-03 17:56:58.000000000 -0500 ++++ gdm-2.19.5-post/gui/gdmlogin.c 2007-08-03 19:24:09.000000000 -0500 +@@ -692,12 +692,15 @@ gdm_run_gdmconfig (GtkWidget *w, gpointe static void gdm_login_restart_handler (void) { - if (gdm_wm_warn_dialog ( - _("Are you sure you want to restart the computer?"), "", - _("_Restart"), NULL, TRUE) == GTK_RESPONSE_YES) { -+ if (!gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ return; - -- closelog (); +- +- gdm_kill_thingies (); +- _exit (DISPLAY_REBOOT); + if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { + if (gdm_wm_warn_dialog (_("Are you sure you want to restart the computer?"), "", + _("_Restart"), NULL, TRUE) == GTK_RESPONSE_YES) { -+ closelog (); - -- gdm_kill_thingies (); -- _exit (DISPLAY_REBOOT); + gdm_kill_thingies (); + _exit (DISPLAY_REBOOT); + } @@ -455,24 +351,19 @@ diff -upr gdm-2.16.1-pre/gui/gdmlogin.c gdm-2.16.1-post/gui/gdmlogin.c } } -@@ -673,14 +679,20 @@ gdm_login_restart_handler (void) +@@ -721,12 +724,15 @@ gdm_custom_cmd_handler (GtkWidget *widge static void gdm_login_halt_handler (void) { - if (gdm_wm_warn_dialog ( - _("Are you sure you want to Shut Down the computer?"), "", - _("Shut _Down"), NULL, TRUE) == GTK_RESPONSE_YES) { -+ if (!gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ return; - -- closelog (); +- +- gdm_kill_thingies (); +- _exit (DISPLAY_HALT); + if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { + if (gdm_wm_warn_dialog (_("Are you sure you want to Shut Down the computer?"), "", + _("Shut _Down"), NULL, TRUE) == GTK_RESPONSE_YES) { -+ closelog (); - -- gdm_kill_thingies (); -- _exit (DISPLAY_HALT); + gdm_kill_thingies (); + _exit (DISPLAY_HALT); + } @@ -482,16 +373,14 @@ diff -upr gdm-2.16.1-pre/gui/gdmlogin.c gdm-2.16.1-post/gui/gdmlogin.c } } -@@ -696,11 +708,17 @@ gdm_login_use_chooser_handler (void) +@@ -740,11 +746,14 @@ gdm_login_use_chooser_handler (void) static void gdm_login_suspend_handler (void) { - if (gdm_wm_warn_dialog ( - _("Are you sure you want to suspend the computer?"), "", - _("_Suspend"), NULL, TRUE) == GTK_RESPONSE_YES) { -+ if (!gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ return; - +- - /* suspend interruption */ + if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { + if (gdm_wm_warn_dialog (_("Are you sure you want to suspend the computer?"), "", @@ -504,263 +393,182 @@ diff -upr gdm-2.16.1-pre/gui/gdmlogin.c gdm-2.16.1-post/gui/gdmlogin.c printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_SUSPEND); fflush (stdout); } -@@ -2369,7 +2387,8 @@ gdm_login_gui_init (void) - got_anything = TRUE; - } +@@ -2911,6 +2920,7 @@ gdm_read_config (void) + gdm_config_get_bool (GDM_KEY_TITLE_BAR); + gdm_config_get_bool (GDM_KEY_ADD_GTK_MODULES); + gdm_config_get_bool (GDM_KEY_SHOW_DOMAIN); ++ gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN); -- if (gdm_working_command_exists (gdm_config_get_string (GDM_KEY_REBOOT))) { -+ if (gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ gdm_working_command_exists (gdm_config_get_string (GDM_KEY_REBOOT))) { - item = gtk_menu_item_new_with_mnemonic (_("_Restart")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - g_signal_connect (G_OBJECT (item), "activate", -@@ -2379,7 +2398,8 @@ gdm_login_gui_init (void) - got_anything = TRUE; - } - -- if (gdm_working_command_exists (gdm_config_get_string (GDM_KEY_HALT))) { -+ if (gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ gdm_working_command_exists (gdm_config_get_string (GDM_KEY_HALT))) { - item = gtk_menu_item_new_with_mnemonic (_("Shut _Down")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - g_signal_connect (G_OBJECT (item), "activate", -@@ -2389,7 +2409,8 @@ gdm_login_gui_init (void) - got_anything = TRUE; - } + /* Keys not to include in reread_config */ + gdm_config_get_bool (GDM_KEY_LOCK_POSITION); +@@ -2994,6 +3004,7 @@ gdm_reread_config (int sig, gpointer dat + gdm_config_reload_bool (GDM_KEY_TIMED_LOGIN_ENABLE) || + gdm_config_reload_bool (GDM_KEY_TITLE_BAR) || + gdm_config_reload_bool (GDM_KEY_SHOW_DOMAIN) || ++ gdm_config_reload_bool (GDM_KEY_SECURE_SHUTDOWN) || + gdm_config_reload_bool (GDM_KEY_ADD_GTK_MODULES)) { -- if (gdm_working_command_exists (gdm_config_get_string (GDM_KEY_SUSPEND))) { -+ if (gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN) && -+ gdm_working_command_exists (gdm_config_get_string (GDM_KEY_SUSPEND))) { - item = gtk_menu_item_new_with_mnemonic (_("_Suspend")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - g_signal_connect (G_OBJECT (item), "activate", -Only in gdm-2.16.1-post/gui: gdmlogin.c~ -diff -upr gdm-2.16.1-pre/gui/gdmsetup.c gdm-2.16.1-post/gui/gdmsetup.c ---- gdm-2.16.1-pre/gui/gdmsetup.c 2006-11-07 18:31:11.000000000 -0600 -+++ gdm-2.16.1-post/gui/gdmsetup.c 2006-11-07 21:23:24.000000000 -0600 -@@ -1670,9 +1670,6 @@ setup_intspin (const char *name, - g_object_set_data_full (G_OBJECT (spin), - "key", g_strdup (key), - (GDestroyNotify) g_free); -- g_object_set_data_full (G_OBJECT (toggle), -- "notify_key", g_strdup (key), -- (GDestroyNotify) g_free); + /* Set busy cursor */ +Only in gdm-2.19.5-post/gui: gdmlogin.c~ +diff -upr gdm-2.19.5-pre/gui/greeter/greeter.c gdm-2.19.5-post/gui/greeter/greeter.c +--- gdm-2.19.5-pre/gui/greeter/greeter.c 2007-08-03 17:56:58.000000000 -0500 ++++ gdm-2.19.5-post/gui/greeter/greeter.c 2007-08-03 19:25:02.000000000 -0500 +@@ -982,6 +982,7 @@ gdm_read_config (void) + gdm_config_get_bool (GDM_KEY_SHOW_DOMAIN); + gdm_config_get_bool (GDM_KEY_ADD_GTK_MODULES); + gdm_config_get_bool (GDM_KEY_BROWSER); ++ gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), val); + /* Keys for custom commands */ + for (i = 0; i < GDM_CUSTOM_COMMAND_MAX; i++) { +@@ -1071,6 +1072,7 @@ greeter_reread_config (int sig, gpointer + gdm_config_reload_bool (GDM_KEY_ALLOW_REMOTE_ROOT) || + gdm_config_reload_bool (GDM_KEY_SHOW_DOMAIN) || + gdm_config_reload_bool (GDM_KEY_ADD_GTK_MODULES) || ++ gdm_config_reload_bool (GDM_KEY_SECURE_SHUTDOWN) || + gdm_config_reload_bool (GDM_KEY_BROWSER)) { -Only in gdm-2.16.1-post/gui: gdmsetup.c~ -diff -upr gdm-2.16.1-pre/gui/greeter/greeter_item.c gdm-2.16.1-post/gui/greeter/greeter_item.c ---- gdm-2.16.1-pre/gui/greeter/greeter_item.c 2006-11-07 18:31:11.000000000 -0600 -+++ gdm-2.16.1-post/gui/greeter/greeter_item.c 2006-11-07 21:28:38.000000000 -0600 -@@ -196,15 +196,15 @@ greeter_item_is_visible (GreeterItemInfo + /* Set busy cursor */ +Only in gdm-2.19.5-post/gui/greeter: greeter.c~ +diff -upr gdm-2.19.5-pre/gui/greeter/greeter_item.c gdm-2.19.5-post/gui/greeter/greeter_item.c +--- gdm-2.19.5-pre/gui/greeter/greeter_item.c 2007-08-03 17:56:58.000000000 -0500 ++++ gdm-2.19.5-post/gui/greeter/greeter_item.c 2007-08-03 19:02:29.000000000 -0500 +@@ -214,15 +214,15 @@ greeter_item_is_visible (GreeterItemInfo strcmp (info->show_type, "system") == 0) return FALSE; - if (( ! sysmenu || ! GdmHaltFound) && -+ if (( ! sysmenu || ! GdmHaltFound || !gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) && ++ if (( ! sysmenu || ! GdmHaltFound || !gdm_common_is_action_available ("HALT")) && (info->show_type != NULL && strcmp (info->show_type, "halt") == 0)) return FALSE; - if (( ! sysmenu || ! GdmRebootFound) && -+ if (( ! sysmenu || ! GdmRebootFound || !gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) && ++ if (( ! sysmenu || ! GdmRebootFound || !gdm_common_is_action_available ("REBOOT")) && (info->show_type != NULL && strcmp (info->show_type, "reboot") == 0)) return FALSE; - if (( ! sysmenu || ! GdmSuspendFound) && -+ if (( ! sysmenu || ! GdmSuspendFound || !gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) && ++ if (( ! sysmenu || ! GdmSuspendFound || !gdm_common_is_action_available ("SUSPEND")) && (info->show_type != NULL && strcmp (info->show_type, "suspend") == 0)) return FALSE; -Only in gdm-2.16.1-post/gui/greeter: greeter_item.c~ -diff -upr gdm-2.16.1-pre/gui/greeter/greeter_system.c gdm-2.16.1-post/gui/greeter/greeter_system.c ---- gdm-2.16.1-pre/gui/greeter/greeter_system.c 2006-08-02 21:32:39.000000000 -0500 -+++ gdm-2.16.1-post/gui/greeter/greeter_system.c 2006-11-07 21:26:35.000000000 -0600 -@@ -68,61 +68,63 @@ bin_exists (const char *command) - * cannot depend on callback data being passed in. - */ +Only in gdm-2.19.5-post/gui/greeter: greeter_item.c~ +diff -upr gdm-2.19.5-pre/gui/greeter/greeter_system.c gdm-2.19.5-post/gui/greeter/greeter_system.c +--- gdm-2.19.5-pre/gui/greeter/greeter_system.c 2007-07-30 13:51:01.000000000 -0500 ++++ gdm-2.19.5-post/gui/greeter/greeter_system.c 2007-08-03 18:41:02.000000000 -0500 +@@ -77,10 +77,15 @@ bin_exists (const char *command) static void --query_greeter_restart_handler (void) -+greeter_restart_handler (void) + query_greeter_restart_handler (void) { - if (gdm_wm_warn_dialog (_("Are you sure you want to restart the computer?"), "", - _("_Restart"), NULL, TRUE) == GTK_RESPONSE_YES) { -- closelog (); -+ if (!gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ return; -+ -+ if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { -+ if (gdm_wm_warn_dialog (_("Are you sure you want to restart the computer?"), "", -+ _("_Restart"), NULL, TRUE) == GTK_RESPONSE_YES) { -+ closelog (); - - _exit (DISPLAY_REBOOT); -+ _exit (DISPLAY_REBOOT); -+ } +- } ++ if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { ++ if (gdm_wm_warn_dialog (_("Are you sure you want to restart the computer?"), "", ++ _("_Restart"), NULL, TRUE) == GTK_RESPONSE_YES) { ++ _exit (DISPLAY_REBOOT); ++ } + } else { -+ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_REBOOT); -+ fflush (stdout); - } ++ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_REBOOT); ++ fflush (stdout); ++ } } static void --query_greeter_halt_handler (void) -+greeter_halt_handler (void) +@@ -101,27 +106,42 @@ query_greeter_custom_cmd_handler (GtkWid + static void + query_greeter_halt_handler (void) { - if (gdm_wm_warn_dialog (_("Are you sure you want to Shut Down the computer?"), "", - _("Shut _Down"), NULL, TRUE) == GTK_RESPONSE_YES) { -- closelog (); -+ if (!gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ return; - - _exit (DISPLAY_HALT); -+ if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { -+ if (gdm_wm_warn_dialog (_("Are you sure you want to Shut Down the computer?"), "", -+ _("Shut _Down"), NULL, TRUE) == GTK_RESPONSE_YES) { -+ closelog (); -+ -+ _exit (DISPLAY_HALT); -+ } -+ } else { -+ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_HALT); +- } ++ if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { ++ if (gdm_wm_warn_dialog (_("Are you sure you want to Shut Down the computer?"), "", ++ _("Shut _Down"), NULL, TRUE) == GTK_RESPONSE_YES) { ++ _exit (DISPLAY_HALT); ++ } ++ } else { ++ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_HALT); + fflush (stdout); - } ++ } } static void --query_greeter_suspend_handler (void) -+greeter_suspend_handler (void) + query_greeter_suspend_handler (void) { - if (gdm_wm_warn_dialog (_("Are you sure you want to suspend the computer?"), "", - _("_Suspend"), NULL, TRUE) == GTK_RESPONSE_YES) { - /* suspend interruption */ -+ if (!gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) -+ return; -+ -+ if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { -+ if (gdm_wm_warn_dialog (_("Are you sure you want to suspend the computer?"), "", -+ _("_Suspend"), NULL, TRUE) == GTK_RESPONSE_YES) { -+ /* suspend interruption */ -+ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_SUSPEND); -+ fflush (stdout); -+ } +- printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_SUSPEND); +- fflush (stdout); +- } ++ if (!gdm_config_get_bool (GDM_KEY_SECURE_SHUTDOWN)) { ++ if (gdm_wm_warn_dialog (_("Are you sure you want to suspend the computer?"), "", ++ _("_Suspend"), NULL, TRUE) == GTK_RESPONSE_YES) { ++ /* suspend interruption */ ++ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_SUSPEND); ++ fflush (stdout); ++ } + } else { - printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_SUSPEND); - fflush (stdout); - } ++ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_SUSPEND); ++ fflush (stdout); ++ } } static void --greeter_restart_handler (void) --{ -- closelog (); -- _exit (DISPLAY_REBOOT); --} -- -- --static void --greeter_halt_handler (void) --{ -- closelog (); -- _exit (DISPLAY_HALT); --} -- --static void --greeter_suspend_handler (void) --{ -- printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_SUSPEND); -- fflush (stdout); --} -- --static void - greeter_config_handler (void) + greeter_restart_handler (void) { - greeter_item_ulist_disable (); -@@ -174,36 +176,36 @@ greeter_system_append_system_menu (GtkWi - NULL); - } - -- if (GdmRebootFound || GdmHaltFound || GdmSuspendFound) { -+ if (gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN) && (GdmRebootFound || GdmHaltFound || GdmSuspendFound)) { - sep = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), sep); - gtk_widget_show (sep); - } - -- if (GdmRebootFound) { -+ if (gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN) && GdmRebootFound) { - w = gtk_menu_item_new_with_mnemonic (_("_Restart")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), w); - gtk_widget_show (GTK_WIDGET (w)); - g_signal_connect (G_OBJECT (w), "activate", -- G_CALLBACK (query_greeter_restart_handler), -+ G_CALLBACK (greeter_restart_handler), - NULL); - } - -- if (GdmHaltFound) { -+ if (gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN) && GdmHaltFound) { - w = gtk_menu_item_new_with_mnemonic (_("Shut _Down")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), w); - gtk_widget_show (GTK_WIDGET (w)); - g_signal_connect (G_OBJECT (w), "activate", -- G_CALLBACK (query_greeter_halt_handler), -+ G_CALLBACK (greeter_halt_handler), - NULL); - } - -- if (GdmSuspendFound) { -+ if (gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN) && GdmSuspendFound) { - w = gtk_menu_item_new_with_mnemonic (_("Sus_pend")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), w); - gtk_widget_show (GTK_WIDGET (w)); - g_signal_connect (G_OBJECT (w), "activate", -- G_CALLBACK (query_greeter_suspend_handler), -+ G_CALLBACK (greeter_suspend_handler), - NULL); - } +- _exit (DISPLAY_REBOOT); ++ if (GDM_KEY_SECURE_SHUTDOWN) { ++ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_REBOOT); ++ fflush (stdout); ++ } else { ++ _exit (DISPLAY_REBOOT); ++ } } -@@ -281,7 +283,7 @@ greeter_system_handler (GreeterItemInfo + + static void +@@ -134,7 +154,12 @@ greeter_custom_cmd_handler (gint cmd_id) + static void + greeter_halt_handler (void) + { +- _exit (DISPLAY_HALT); ++ if (GDM_KEY_SECURE_SHUTDOWN) { ++ printf ("%c%c%c\n", STX, BEL, GDM_INTERRUPT_HALT); ++ fflush (stdout); ++ } else { ++ _exit (DISPLAY_HALT); ++ } + } + + static void +@@ -342,7 +367,7 @@ greeter_system_handler (GreeterItemInfo vbox, TRUE, TRUE, 0); - if (GdmHaltFound) { -+ if (GdmHaltFound && gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) { ++ if (GdmHaltFound && gdm_common_is_action_available ("HALT")) { if (group_radio != NULL) radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (group_radio)); halt_radio = gtk_radio_button_new_with_mnemonic (radio_group, -@@ -299,7 +301,7 @@ greeter_system_handler (GreeterItemInfo +@@ -360,7 +385,7 @@ greeter_system_handler (GreeterItemInfo gtk_widget_show (halt_radio); } - if (GdmRebootFound) { -+ if (GdmRebootFound && gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) { ++ if (GdmRebootFound && gdm_common_is_action_available ("REBOOT")) { if (group_radio != NULL) radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (group_radio)); restart_radio = gtk_radio_button_new_with_mnemonic (radio_group, -@@ -316,7 +318,7 @@ greeter_system_handler (GreeterItemInfo - gtk_widget_show (restart_radio); +@@ -404,7 +429,7 @@ greeter_system_handler (GreeterItemInfo + } } - if (GdmSuspendFound) { -+ if (GdmSuspendFound && gdm_config_get_bool (GDM_KEY_ALLOW_SHUTDOWN)) { ++ if (GdmSuspendFound && gdm_common_is_action_available ("SUSPEND")) { if (group_radio != NULL) radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (group_radio)); suspend_radio = gtk_radio_button_new_with_mnemonic (radio_group, -@@ -414,13 +416,13 @@ void - greeter_item_system_setup (void) - { - greeter_item_register_action_callback ("reboot_button", -- (ActionFunc)query_greeter_restart_handler, -+ (ActionFunc)greeter_restart_handler, - NULL); - greeter_item_register_action_callback ("halt_button", -- (ActionFunc)query_greeter_halt_handler, -+ (ActionFunc)greeter_halt_handler, - NULL); - greeter_item_register_action_callback ("suspend_button", -- (ActionFunc)query_greeter_suspend_handler, -+ (ActionFunc)greeter_suspend_handler, - NULL); - greeter_item_register_action_callback ("system_button", - (ActionFunc)greeter_system_handler, -Only in gdm-2.16.1-post/gui/greeter: greeter_system.c~ +Only in gdm-2.19.5-post/gui/greeter: greeter_system.c~ diff --git a/gdm-2.8.0.7-some-info-in-dialog.patch b/gdm-2.8.0.7-some-info-in-dialog.patch index 23866b7..1521f20 100644 --- a/gdm-2.8.0.7-some-info-in-dialog.patch +++ b/gdm-2.8.0.7-some-info-in-dialog.patch @@ -1,11 +1,16 @@ ---- gdm-2.16.1/daemon/verify-pam.c -+++ gdm-2.16.1/daemon/verify-pam.c -@@ -595,7 +595,7 @@ - break; - case PAM_TEXT_INFO: - /* PAM sent a message that should displayed to the user */ -- gdm_slave_greeter_ctl_no_ret (GDM_MSG, m); -+ gdm_slave_greeter_ctl_no_ret (GDM_ERRDLG, m); - reply[replies].resp_retcode = PAM_SUCCESS; - reply[replies].resp = NULL; - break; +Only in gdm-2.19.5-pre/daemon: gdm-daemon-config-keys.h.orig +Only in gdm-2.19.5-pre/daemon: slave.c.orig +diff -upr gdm-2.19.5-pre/daemon/verify-pam.c gdm-2.19.5-post/daemon/verify-pam.c +--- gdm-2.19.5-pre/daemon/verify-pam.c 2007-08-03 19:47:48.000000000 -0500 ++++ gdm-2.19.5-post/daemon/verify-pam.c 2007-08-03 19:48:46.000000000 -0500 +@@ -610,7 +610,7 @@ gdm_verify_pam_conv (int num_msg, struct + + case PAM_TEXT_INFO: + /* PAM sent a message that should displayed to the user */ +- gdm_slave_greeter_ctl_no_ret (GDM_MSG, m); ++ gdm_slave_greeter_ctl_no_ret (GDM_ERRDLG, m); + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = NULL; + break; +Only in gdm-2.19.5-pre/daemon: verify-pam.c.orig +Only in gdm-2.19.5-post: error.18283 diff --git a/gdm-bash-profile.patch b/gdm-bash-profile.patch deleted file mode 100644 index 52ded39..0000000 --- a/gdm-bash-profile.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -upr gdm-2.16.1-pre/daemon/slave.c gdm-2.16.1-post/daemon/slave.c ---- gdm-2.16.1-pre/daemon/slave.c 2006-08-07 14:49:29.000000000 -0500 -+++ gdm-2.16.1-post/daemon/slave.c 2006-11-07 16:54:20.000000000 -0600 -@@ -3358,7 +3358,7 @@ session_child_run (struct passwd *pwent, - #ifndef HAVE_TSOL - char *argv[4]; - #else -- char *argv[7]; -+ char *argv[9]; - #endif - - #ifdef CAN_USE_SETPENV -@@ -3584,10 +3584,12 @@ session_child_run (struct passwd *pwent, - argv[1] = NULL; - argv[2] = NULL; - argv[3] = NULL; --#ifdef HAVE_TSOL - argv[4] = NULL; - argv[5] = NULL; -+#ifdef HAVE_TSOL - argv[6] = NULL; -+ argv[7] = NULL; -+ argv[8] = NULL; - #endif - - exec = NULL; -@@ -3640,11 +3642,27 @@ session_child_run (struct passwd *pwent, - argv[3] = argv[4] = argv[5] = argv[6] = NULL; - } else { - #endif -- argv[0] = basexsession; -- argv[1] = exec; -- argv[2] = NULL; -+ /* If it looks like we are using bash, then run the Xsession -+ script in a login shell and pass it 'no-fake-login' as its -+ second argument. This keeps Xsession from sourcing .profile or -+ otherwise trying to pretend to be a login shell. */ -+ -+ if (strlen (pwent->pw_shell) > 4 -+ && ! strcmp (pwent->pw_shell + strlen (pwent->pw_shell) - 5, "/bash") -+ && g_file_test (pwent->pw_shell, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_EXECUTABLE)) { -+ argv[0] = pwent->pw_shell; -+ argv[1] = "--login"; -+ argv[2] = basexsession; -+ argv[3] = exec; -+ argv[4] = "no-fake-login"; -+ argv[5] = NULL; -+ } else { -+ argv[0] = basexsession; -+ argv[1] = exec; -+ argv[2] = NULL; -+ } - #ifdef HAVE_TSOL -- argv[3] = argv[4] = argv[5] = argv[6] = NULL; -+ argv [3] = argv [4] = argv[5] = argv[6] = argv[7] = argv[8] = NULL; - } - #endif - } -@@ -3793,7 +3811,6 @@ session_child_run (struct passwd *pwent, - failsafe = TRUE; - } - --#ifdef HAVE_TSOL - gdm_debug ("Running %s %s %s %s %s %s for %s on %s", - argv[0], - ve_sure_string (argv[1]), -@@ -3802,13 +3819,6 @@ session_child_run (struct passwd *pwent, - ve_sure_string (argv[4]), - ve_sure_string (argv[5]), - login, d->name); --#else -- gdm_debug ("Running %s %s %s for %s on %s", -- argv[0], -- ve_sure_string (argv[1]), -- ve_sure_string (argv[2]), -- login, d->name); --#endif - - if ( ! ve_string_empty (pwent->pw_shell)) { - shell = pwent->pw_shell; diff --git a/gdm-conf.patch b/gdm-conf.patch index be3c197..251cb33 100644 --- a/gdm-conf.patch +++ b/gdm-conf.patch @@ -1,11 +1,10 @@ -Index: gdm-2.19.3/config/gdm.conf.in -=================================================================== ---- gdm-2.19.3.orig/config/gdm.conf.in -+++ gdm-2.19.3/config/gdm.conf.in +diff -upr gdm-2.19.5-pre/config/gdm.conf.in gdm-2.19.5-post/config/gdm.conf.in +--- gdm-2.19.5-pre/config/gdm.conf.in 2007-07-30 13:51:14.000000000 -0500 ++++ gdm-2.19.5-post/config/gdm.conf.in 2007-08-03 17:35:14.000000000 -0500 @@ -68,11 +68,11 @@ TimedLoginDelay=30 - # The greeter for local (non-xdmcp) logins. Change gdmlogin to gdmgreeter to - # get the new graphical greeter. + # The greeter for attached (non-xdmcp) logins. Change gdmlogin to gdmgreeter + # to get the new graphical greeter. -#Greeter=@libexecdir@/gdmlogin +Greeter=@libexecdir@/gdmgreeter @@ -65,7 +64,7 @@ Index: gdm-2.19.3/config/gdm.conf.in # Maximum size of a file we wish to read. This makes it hard for a user to DoS # us by using a large file. #UserMaxFile=65536 -@@ -320,17 +327,18 @@ Enable=false +@@ -339,17 +346,18 @@ Enable=false #PingIntervalSeconds=15 # The port. 177 is the standard port so better keep it that way. #Port=177 @@ -90,7 +89,7 @@ Index: gdm-2.19.3/config/gdm.conf.in # The GTK+ theme to use for the GUI. #GtkTheme=Default -@@ -357,7 +365,7 @@ Enable=false +@@ -376,7 +384,7 @@ Enable=false #TitleBar=true # Don't allow user to move the standard login window. Only makes sense if # TitleBar is on. @@ -99,7 +98,7 @@ Index: gdm-2.19.3/config/gdm.conf.in # Set a position for the standard login window rather then just centering the # window. If you enter negative values for the position it is taken as an # offset from the right or bottom edge. -@@ -378,7 +386,7 @@ Browser=false +@@ -397,7 +405,7 @@ Browser=false # User ID's less than the MinimalUID value will not be included in the face # browser or in the gdmselection list for Automatic/Timed login. They will not # be displayed regardless of the settings for Include and Exclude. @@ -108,7 +107,7 @@ Index: gdm-2.19.3/config/gdm.conf.in # Users listed in Include will be included in the face browser and in the # gdmsetup selection list for Automatic/Timed login. Users should be separated # by commas. -@@ -409,7 +417,7 @@ Browser=false +@@ -428,7 +436,7 @@ Browser=false #ChooserButtonLogo=@pixmapdir@/gdm-foot-logo.png # The standard greeter should shake if a user entered the wrong username or # password. Kind of cool looking @@ -117,7 +116,7 @@ Index: gdm-2.19.3/config/gdm.conf.in # The Actions menu (formerly system menu) is shown in the greeter, this is the # menu that contains reboot, shutdown, suspend, config and chooser. None of -@@ -446,12 +454,12 @@ DefaultRemoteWelcome=true +@@ -465,12 +473,12 @@ DefaultRemoteWelcome=true # Background settings for the standard greeter: # Type can be 0=None, 1=Image & Color, 2=Color, 3=Image #BackgroundType=2 @@ -132,7 +131,7 @@ Index: gdm-2.19.3/config/gdm.conf.in GraphicalThemedColor=#76848F # XDMCP session should only get a color, this is the sanest setting since you # don't want to take up too much bandwidth -@@ -493,7 +501,7 @@ GraphicalThemedColor=#76848F +@@ -512,7 +520,7 @@ GraphicalThemedColor=#76848F # list then provide a list that is delimited by /: to the GraphicalThemes # key and set GraphicalThemeRand to true. Otherwise use GraphicalTheme # and specify just one theme. @@ -141,7 +140,7 @@ Index: gdm-2.19.3/config/gdm.conf.in #GraphicalThemes=circles/:happygnome GraphicalThemeDir=@datadir@/gdm/themes/ GraphicalThemeRand=false -@@ -510,6 +518,7 @@ GraphicalThemeRand=false +@@ -529,6 +537,7 @@ GraphicalThemeRand=false # executable (see daemon/SoundProgram) it will play that file instead of just # beeping. #SoundOnLogin=true @@ -149,8 +148,8 @@ Index: gdm-2.19.3/config/gdm.conf.in #SoundOnLoginFile= # If SoundOnLoginSuccess, then the greeter will play a sound (as above) when a # user successfully logs in. -@@ -597,7 +606,7 @@ Gestures=false - # Definition of the standard X server. +@@ -629,7 +638,7 @@ Gestures=false + [server-Standard] name=Standard server -command=@X_SERVER@ @X_CONFIG_OPTIONS@ @XEVIE_OPTION@ @@ -158,3 +157,5 @@ Index: gdm-2.19.3/config/gdm.conf.in flexible=true # Indicates that the X server should be started at a different process # priority. Values can be any integer value accepted by the setpriority C +Only in gdm-2.19.5-post/config: gdm.conf.in.orig +Only in gdm-2.19.5-post: error.14848 diff --git a/gdm-language-dialog-size.patch b/gdm-language-dialog-size.patch index 75f5d2e..f79f026 100644 --- a/gdm-language-dialog-size.patch +++ b/gdm-language-dialog-size.patch @@ -1,32 +1,26 @@ -Index: gdm-2.17.7/gui/greeter/greeter_action_language.c -=================================================================== ---- gdm-2.17.7.orig/gui/greeter/greeter_action_language.c -+++ gdm-2.17.7/gui/greeter/greeter_action_language.c -@@ -220,6 +220,7 @@ greeter_language_setup_treeview (void) +diff -upr gdm-2.19.3-pre/gui/gdmlanguages.c gdm-2.19.3-post/gui/gdmlanguages.c +--- gdm-2.19.3-pre/gui/gdmlanguages.c 2007-07-31 20:36:54.000000000 -0400 ++++ gdm-2.19.3-post/gui/gdmlanguages.c 2007-07-31 20:43:55.000000000 -0400 +@@ -840,6 +840,7 @@ gdm_lang_setup_treeview (void) GtkWidget *swindow; GtkWidget *label; char *s; -+ int y_size; ++ gint y_size; dialog = gtk_dialog_new_with_buttons (_("Select a Language"), #ifdef TODO -@@ -286,9 +287,17 @@ greeter_language_setup_treeview (void) +@@ -906,9 +907,13 @@ gdm_lang_setup_treeview (void) gtk_container_add (GTK_CONTAINER (swindow), tv); gtk_box_pack_start (GTK_BOX (main_vbox), swindow, TRUE, TRUE, 0); + -+ y_size = gdm_wm_screen.height; -+ /* If our screen has any sort of reasonable y-resolution, -+ don't make the dialog as tall as the screen. This is a -+ silly hack, but does make things a bit prettier. */ -+ if (y_size > 600) -+ y_size = 8 * y_size / 10; ++ /* Make the dialog fill 8/10 of the screen's height */ ++ y_size = (8 * gdm_wm_screen.height) / 10; + gtk_window_set_default_size (GTK_WINDOW (dialog), -- MIN (400, gdm_wm_screen.width), + MIN (400, gdm_wm_screen.width), - MIN (600, gdm_wm_screen.height)); -+ MIN (400, gdm_wm_screen.width), -+ y_size); ++ y_size); g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (tv))), "changed", (GCallback) selection_changed, diff --git a/gdm-logdir.patch b/gdm-logdir.patch deleted file mode 100644 index 77ee758..0000000 --- a/gdm-logdir.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- config/Makefile.am -+++ config/Makefile.am -@@ -5,7 +5,7 @@ - instsessdir = $(datadir)/xsessions - initdir = $(gdmconfdir)/Init - authdir = $(localstatedir)/gdm --logdir = $(localstatedir)/log/gdm -+logdir = @logdir@ - gnomercdir = $(gdmconfdir) - postdir = $(gdmconfdir)/PostSession - predir = $(gdmconfdir)/PreSession ---- configure.ac -+++ configure.ac -@@ -791,7 +791,7 @@ - # - AC_SUBST(authdir, ${localstatedir}/gdm) - AC_SUBST(gdmlocaledir, ${gdmconfdir}) --AC_SUBST(logdir, ${localstatedir}/log/gdm) -+AC_SUBST(logdir, /var/log/gdm) - AC_SUBST(pixmapdir, ${datadir}/pixmaps) - - withval="" diff --git a/gdm-server-timeout.patch b/gdm-server-timeout.patch index f77537f..7a0b4bb 100644 --- a/gdm-server-timeout.patch +++ b/gdm-server-timeout.patch @@ -1,11 +1,17 @@ ---- daemon/gdm.h -+++ daemon/gdm.h -@@ -270,7 +270,7 @@ +diff -upr gdm-2.19.5-pre/daemon/gdm-daemon-config-keys.h gdm-2.19.5-post/daemon/gdm-daemon-config-keys.h +--- gdm-2.19.5-pre/daemon/gdm-daemon-config-keys.h 2007-08-03 19:38:33.000000000 -0500 ++++ gdm-2.19.5-post/daemon/gdm-daemon-config-keys.h 2007-08-03 19:44:00.000000000 -0500 +@@ -81,7 +81,7 @@ G_BEGIN_DECLS + #define GDM_KEY_FIRST_VT "daemon/FirstVT=7" + #define GDM_KEY_VT_ALLOCATION "daemon/VTAllocation=true" #define GDM_KEY_CONSOLE_CANNOT_HANDLE "daemon/ConsoleCannotHandle=am,ar,az,bn,el,fa,gu,hi,ja,ko,ml,mr,pa,ta,zh" - - /* How long to wait before assuming an Xserver has timed out */ -#define GDM_KEY_XSERVER_TIMEOUT "daemon/GdmXserverTimeout=10" +#define GDM_KEY_XSERVER_TIMEOUT "daemon/GdmXserverTimeout=30" - - /* Per server definitions */ - #define GDM_KEY_SERVER_PREFIX "server-" + #define GDM_KEY_SYSTEM_COMMANDS_IN_MENU "daemon/SystemCommandsInMenu=HALT;REBOOT;SUSPEND;CUSTOM_CMD" + #define GDM_KEY_ALLOW_LOGOUT_ACTIONS "daemon/AllowLogoutActions=HALT;REBOOT;SUSPEND;CUSTOM_CMD" + #define GDM_KEY_RBAC_SYSTEM_COMMAND_KEYS "daemon/RBACSystemCommandKeys=" GDM_RBAC_SYSCMD_KEYS +Only in gdm-2.19.5-post/daemon: gdm-daemon-config-keys.h~ +Only in gdm-2.19.5-pre/daemon: gdm-daemon-config-keys.h.orig +Only in gdm-2.19.5-pre/daemon: slave.c.orig +Only in gdm-2.19.5-pre/daemon: verify-pam.c.orig +Only in gdm-2.19.5-post: error.15631 diff --git a/gdm.changes b/gdm.changes index 50a7277..5cc835a 100644 --- a/gdm.changes +++ b/gdm.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Sat Aug 4 04:17:49 CEST 2007 - hpj@suse.de + +- Update to version 2.19.5. +- Fix up gdm-conf.patch. +- Fix up gdm-2.19.3-reset-pam.patch. +- Fix up gdm-2.19.3-token-login.patch. +- Fix up and enable gdm-language-dialog-size.patch. +- Fix up and enable gdm-2.8.0.7-bg-4.patch. +- Fix up and enable gdm-2.8.0.7-domain-entry.patch. +- Fix up and enable gdm-2.8.0.7-halt-needs-root.patch. +- Fix up and enable gdm-server-timeout.patch. +- Fix up and enable gdm-2.8.0.7-some-info-in-dialog.patch. +- Fix up and enable gdm-2.17.7-vt-fallback.patch. +- Fix up and enable gdm-2.8.0.0-any-hostname-auth.patch. +- Remove gdm-2.19.3.diff (upstreamed). +- Remove gdm-2.13.0.4-audit-login.patch (upstreamed). +- Remove gdm-logdir.patch (fixed upstream). +- Remove gdm-bash-profile.patch (obsolete). + ------------------------------------------------------------------- Mon Jul 30 16:41:29 CEST 2007 - jberkman@novell.com diff --git a/gdm.spec b/gdm.spec index 9314017..a6bc551 100644 --- a/gdm.spec +++ b/gdm.spec @@ -1,5 +1,5 @@ # -# spec file for package gdm (Version 2.19.3) +# spec file for package gdm (Version 2.19.5) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -21,8 +21,8 @@ PreReq: %fillup_prereq PreReq: %insserv_prereq License: GPL v2 or later Group: System/GUI/GNOME -Version: 2.19.3 -Release: 12 +Version: 2.19.5 +Release: 1 Summary: The GNOME 2.x Display Manager Source: %{name}-%{version}.tar.bz2 Source1: gdm.pamd @@ -32,10 +32,7 @@ Source3: SuSEconfig.gdm Source4: init.earlygdm Source5: sysconfig.displaymanager-gdm Patch0: gdm-conf.patch -Patch1: %{name}-%{version}.diff -Patch2: gdm-bash-profile.patch Patch3: gdm-language-dialog-size.patch -Patch4: gdm-logdir.patch Patch5: gdm-xdm-sessions.patch Patch9: gdm-presession-kde-path.patch Patch12: gdm-gdmsetup-rootonly.patch @@ -51,7 +48,6 @@ Patch26: gdm-2.8.0.7-some-info-in-dialog.patch Patch28: gdm-X_SERVER.patch Patch29: gdm-gdmsetup.patch Patch30: gdm-conf-custom-sysconfig.patch -Patch33: gdm-2.13.0.4-audit-login.patch Patch34: gdm-2.17.7-vt-fallback.patch Patch35: gdm-2.19.3-reset-pam.patch Patch36: gdm-2.19.3-dbus-security-tokens.patch @@ -84,31 +80,25 @@ Authors: %setup gnome-patch-translation-prepare %patch0 -p1 -%patch1 -#%patch -p1 -#%patch2 -p1 -#%patch3 -p1 -#%patch4 +%patch3 -p1 %patch5 -p1 %patch9 -p1 %patch12 -#%patch13 -p1 +%patch13 -p1 %patch14 -p1 %patch15 -p1 -#%patch19 -p1 -# %if %suse_version > 1000 -#%patch20 -p1 -# FIXME: this needs to be re-done -# %patch21 -p1 -# %endif +%patch19 -p1 +%if %suse_version > 1000 +%patch20 -p1 +%patch21 -p1 +%endif %patch22 -p1 -#%patch24 -#%patch26 -p1 +%patch24 -p1 +%patch26 -p1 %patch28 %patch29 %patch30 -#%patch33 -p1 -#%patch34 -p1 +%patch34 -p1 %patch35 -p1 %patch36 -p1 %patch37 -p1 @@ -233,6 +223,23 @@ sed -i s:DISPLAYMANAGER=/opt/gnome/sbin/gdm:DISPLAYMANAGER=/usr/sbin/gdm:g etc/i %endif %changelog +* Sat Aug 04 2007 - hpj@suse.de +- Update to version 2.19.5. +- Fix up gdm-conf.patch. +- Fix up gdm-2.19.3-reset-pam.patch. +- Fix up gdm-2.19.3-token-login.patch. +- Fix up and enable gdm-language-dialog-size.patch. +- Fix up and enable gdm-2.8.0.7-bg-4.patch. +- Fix up and enable gdm-2.8.0.7-domain-entry.patch. +- Fix up and enable gdm-2.8.0.7-halt-needs-root.patch. +- Fix up and enable gdm-server-timeout.patch. +- Fix up and enable gdm-2.8.0.7-some-info-in-dialog.patch. +- Fix up and enable gdm-2.17.7-vt-fallback.patch. +- Fix up and enable gdm-2.8.0.0-any-hostname-auth.patch. +- Remove gdm-2.19.3.diff (upstreamed). +- Remove gdm-2.13.0.4-audit-login.patch (upstreamed). +- Remove gdm-logdir.patch (fixed upstream). +- Remove gdm-bash-profile.patch (obsolete). * Mon Jul 30 2007 - jberkman@novell.com - use smartcard pam stack when cards are inserted * Wed Jul 25 2007 - jpr@suse.de