[gnome-system-tools/gnome-2-28] Revert "Check that UID is free before creating users"
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-system-tools/gnome-2-28] Revert "Check that UID is free before creating users"
- Date: Mon, 31 Aug 2009 21:11:26 +0000 (UTC)
commit d7bdd2305a78e51cc3e14e6d82a7d3e4a50ef563
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Mon Aug 31 23:09:01 2009 +0200
Revert "Check that UID is free before creating users"
Mistakingly merged from master. This reverts commit 36cdbf80fa16cfac1a15f24ee32c2b272f68e521.
src/users/user-settings.c | 33 ---------------------------------
1 files changed, 0 insertions(+), 33 deletions(-)
---
diff --git a/src/users/user-settings.c b/src/users/user-settings.c
index d6740c3..92c1b3f 100644
--- a/src/users/user-settings.c
+++ b/src/users/user-settings.c
@@ -309,34 +309,6 @@ is_user_root (OobsUser *user)
return (strcmp (login, "root") == 0);
}
-static gboolean
-uid_exists (uid_t uid)
-{
- OobsUsersConfig *config;
- OobsList *list;
- OobsListIter list_iter;
- GObject *user;
- gboolean valid;
- uid_t user_uid;
-
- config = OOBS_USERS_CONFIG (GST_USERS_TOOL (tool)->users_config);
- list = oobs_users_config_get_users (config);
- valid = oobs_list_get_iter_first (list, &list_iter);
-
- while (valid) {
- user = oobs_list_get (list, &list_iter);
- uid = oobs_user_get_uid (OOBS_USER (user));
- g_object_unref (user);
-
- if (user_uid == uid)
- return TRUE;
-
- valid = oobs_list_iter_next (list, &list_iter);
- }
-
- return FALSE;
-}
-
static uid_t
find_new_uid (gint uid_min,
gint uid_max)
@@ -687,11 +659,6 @@ check_uid (gchar **primary_text, gchar **secondary_text, gpointer data)
*primary_text = g_strdup (_("Administrator account's user ID should not be modified"));
*secondary_text = g_strdup (_("This would leave the system unusable."));
}
-
- if (!user && uid_exists (uid)) {
- *primary_text = g_strdup_printf (_("User ID %d is already used"), uid);
- *secondary_text = g_strdup (_("Please choose a different numeric identifier for the new user."));
- }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]