summaryrefslogtreecommitdiff
path: root/src/user.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2011-07-19 10:50:40 -0400
committerRay Strode <rstrode@redhat.com>2011-07-19 10:50:40 -0400
commitd29454d0d0d8a2e075657068c5a039f6da2e790c (patch)
tree11c8d21df0f87955788bdce350dc0c4e40587912 /src/user.c
parent5cf040f2efa8e9ae5e99f0cb1489d6de56cfbe70 (diff)
Revert "Implement "disable account" password mode"
This reverts commit 67880f7e4b46339348e8ebad700af275c8acfb53. It overlaps with SetLocked https://bugs.freedesktop.org/show_bug.cgi?id=31801
Diffstat (limited to 'src/user.c')
-rw-r--r--src/user.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/user.c b/src/user.c
index cf49534..8741348 100644
--- a/src/user.c
+++ b/src/user.c
@@ -646,20 +646,6 @@ user_local_update_from_keyfile (User *user,
user->icon_file = s;
}
- s = g_key_file_get_string (keyfile, "User", "PasswordMode", NULL);
- if (s != NULL) {
- if (strcmp (s, "SetAtLogin") == 0)
- user->password_mode = PASSWORD_MODE_SET_AT_LOGIN;
- else if (strcmp (s, "None") == 0)
- user->password_mode = PASSWORD_MODE_NONE;
- else if (strcmp (s, "DisableAccount") == 0)
- user->password_mode = PASSWORD_MODE_DISABLE_ACCOUNT;
- else
- user->password_mode = PASSWORD_MODE_REGULAR;
- } else {
- user->password_mode = PASSWORD_MODE_REGULAR;
- }
-
g_object_thaw_notify (G_OBJECT (user));
}
@@ -684,18 +670,6 @@ user_local_save_to_keyfile (User *user,
if (user->icon_file)
g_key_file_set_string (keyfile, "User", "Icon", user->icon_file);
-
- switch (user->password_mode) {
- case PASSWORD_MODE_NONE:
- g_key_file_set_string (keyfile, "User", "PasswordMode", "None");
- break;
- case PASSWORD_MODE_SET_AT_LOGIN:
- g_key_file_set_string (keyfile, "User", "PasswordMode", "SetAtLogin");
- break;
- case PASSWORD_MODE_DISABLE_ACCOUNT:
- g_key_file_set_string (keyfile, "User", "PasswordMode", "DisableAccount");
- break;
- }
}
static void
@@ -1735,11 +1709,10 @@ user_change_password_mode_authorized_cb (Daemon *daemon,
g_object_freeze_notify (G_OBJECT (user));
if (mode == PASSWORD_MODE_SET_AT_LOGIN ||
- mode == PASSWORD_MODE_NONE ||
- mode == PASSWORD_MODE_DISABLE_ACCOUNT) {
+ mode == PASSWORD_MODE_NONE) {
argv[0] = "/usr/bin/passwd";
- argv[1] = (mode == PASSWORD_MODE_DISABLE_ACCOUNT ? "-l" : "-d");
+ argv[1] = "-d";
argv[2] = user->user_name;
argv[3] = NULL;