[PATCH] Fix checking whether an UID is free



A mistake in variables could prevent user creation from working at all. We were comparing UIDs with an uninitialized int, leading to strange results. This was introduced by 36cdbf80fa16cfac1a15f24ee32c2b272f68e521.
---
 src/users/user-settings.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/users/user-settings.c b/src/users/user-settings.c
index 74d68fe..227b27b 100644
--- a/src/users/user-settings.c
+++ b/src/users/user-settings.c
@@ -339,7 +339,7 @@ uid_exists (uid_t uid)
 
 	while (valid) {
 		user = oobs_list_get (list, &list_iter);
-		uid = oobs_user_get_uid (OOBS_USER (user));
+		user_uid = oobs_user_get_uid (OOBS_USER (user));
 		g_object_unref (user);
 
 		if (user_uid == uid)
-- 
1.6.0.4


--=-T31lODH7164VRnQIlwfA--




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]