[gnome-control-center] users: prevent autologin for disabled users
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] users: prevent autologin for disabled users
- Date: Thu, 25 Aug 2011 16:44:03 +0000 (UTC)
commit 64419bf3c9ce5d293d2dfb807193f9fd90bd0871
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Aug 25 12:41:18 2011 -0400
users: prevent autologin for disabled users
gdm can't handle this currently, so prevent this situation
from happening. Forcibly turning off the autologin when an
account is disabled is a slightly odd side-effect, but
good enough in practice.
https://bugzilla.gnome.org/show_bug.cgi?id=649816
panels/user-accounts/um-user-panel.c | 2 ++
panels/user-accounts/um-user.c | 9 +++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index 6e256e9..42227cb 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -580,6 +580,8 @@ show_user (UmUser *user, UmUserPanelPrivate *d)
gtk_switch_set_active (GTK_SWITCH (widget), um_user_get_automatic_login (user));
g_signal_handlers_unblock_by_func (widget, autologin_changed, d);
+ gtk_widget_set_sensitive (widget, !um_user_get_locked (user));
+
widget = get_widget (d, "account-language-combo");
model = um_editable_combo_get_model (UM_EDITABLE_COMBO (widget));
cc_add_user_languages (model);
diff --git a/panels/user-accounts/um-user.c b/panels/user-accounts/um-user.c
index 0693895..eda9252 100644
--- a/panels/user-accounts/um-user.c
+++ b/panels/user-accounts/um-user.c
@@ -994,6 +994,15 @@ um_user_set_password (UmUser *user,
g_free (crypted);
}
else if (password_mode == 3 || password_mode == 4) {
+ /* FIXME: this is a slightly odd side-effect:
+ * you disable the account, and autologin flips
+ * we should remove that once gdm knows to
+ * ignore autologin for disabled accounts
+ */
+ if (password_mode == 3 &&
+ um_user_get_automatic_login (user)) {
+ um_user_set_automatic_login (user, FALSE);
+ }
if (!dbus_g_proxy_call (user->proxy,
"SetLocked",
&error,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]