[liboobs] Don't fail if user password is empty
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [liboobs] Don't fail if user password is empty
- Date: Fri, 28 Aug 2009 22:46:39 +0000 (UTC)
commit a5834c47b9cec3c4abbba148e5d609ebb79d3794
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Sat Aug 29 00:42:49 2009 +0200
Don't fail if user password is empty
It is allowed to set an empty password either in /etc/passwd or in /etc/shadow. Correctly handle that case if the system config includes such cases ('passwd -d' notably). See lp#316667, and the previous related commit on bgo#521438
oobs/oobs-usersconfig.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/oobs/oobs-usersconfig.c b/oobs/oobs-usersconfig.c
index f80d960..e11a801 100644
--- a/oobs/oobs-usersconfig.c
+++ b/oobs/oobs-usersconfig.c
@@ -359,7 +359,9 @@ create_dbus_struct_from_user (OobsUser *user,
"other-data", &other_data,
NULL);
- g_return_val_if_fail ((login && password), FALSE);
+ /* Login is the only required field,
+ * since home dir, password and shell are allowed to be empty (see man 5 passwd) */
+ g_return_val_if_fail (login, FALSE);
group = oobs_user_get_main_group (user);
gid = oobs_group_get_gid (group);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]