[accounts-dialog] Don't rely on getting a success message from passwd
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Don't rely on getting a success message from passwd
- Date: Thu, 4 Feb 2010 20:55:16 +0000 (UTC)
commit 78c1b565e194af0ddae314eacc0d9d84ead7db89
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 4 15:30:43 2010 -0500
Don't rely on getting a success message from passwd
Also call the callback when passwd exits with 0 after we
fed it all the data.
src/run-passwd.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/run-passwd.c b/src/run-passwd.c
index c5a9b8f..361a0a3 100644
--- a/src/run-passwd.c
+++ b/src/run-passwd.c
@@ -124,6 +124,15 @@ child_watch_cb (GPid pid, gint status, PasswdHandler *passwd_handler)
if (WEXITSTATUS (status) >= 255) {
g_warning ("Child exited unexpectedly");
}
+ if (WEXITSTATUS (status) == 0) {
+ if (passwd_handler->backend_state == PASSWD_STATE_RETYPE) {
+ passwd_handler->backend_state = PASSWD_STATE_DONE;
+ if (passwd_handler->chpasswd_cb)
+ passwd_handler->chpasswd_cb (passwd_handler,
+ NULL,
+ passwd_handler->auth_cb_data);
+ }
+ }
}
free_passwd_resources (passwd_handler);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]