add another string to the list of recognized error returns from passwd

2007-11-03  Jens Granseuer  <jensgr@gmx.net>

	* gnome-about-me-password.c: (io_watch_stdout): add another string to
	the list of recognized error returns from passwd ("must choose a longer
	password")

svn path=/trunk/; revision=8256
This commit is contained in:
Jens Granseuer 2007-11-03 15:10:53 +00:00 committed by Jens Granseuer
parent 6b8e2ae765
commit ee4bb34379
2 changed files with 209 additions and 200 deletions

View file

@ -1,3 +1,9 @@
2007-11-03 Jens Granseuer <jensgr@gmx.net>
* gnome-about-me-password.c: (io_watch_stdout): add another string to
the list of recognized error returns from passwd ("must choose a longer
password")
2007-08-21 Jens Granseuer <jensgr@gmx.net>
* gnome-about-me.c: (about_me_setup_email): fix the last commit to use

View file

@ -495,6 +495,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi
if (is_string_complete (str->str, "successfully",
"short",
"longer",
"panlindrome",
"simple",
"similar",
@ -524,17 +525,19 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi
/* What does this indicate?
* "Authentication information cannot be recovered?" from libpam? */
msg = g_strdup_printf (_("System error: %s."), str->str);
} else if (g_strrstr (str->str, "short") != NULL) {
} else if (g_strrstr (str->str, "short") != NULL ||
g_strrstr (str->str, "longer") != NULL) {
msg = g_strdup (_("The password is too short."));
} else if (g_strrstr (str->str, "panlindrome") != NULL) {
} else if (g_strrstr (str->str, "panlindrome") != NULL ||
g_strrstr (str->str, "simple") != NULL) {
msg = g_strdup (_("The password is too simple."));
} else if (g_strrstr (str->str, "simple") != NULL) {
msg = g_strdup (_("The password is too simple."));
} else if ((g_strrstr (str->str, "similar") != NULL) || (g_strrstr (str->str, "wrapped") != NULL)) {
} else if (g_strrstr (str->str, "similar") != NULL ||
g_strrstr (str->str, "wrapped") != NULL) {
msg = g_strdup (_("The old and new passwords are too similar."));
} else if (g_strrstr (str->str, "1 numeric or special") != NULL) {
msg = g_strdup (_("The new password must contain numeric or special character(s)."));
} else if ((g_strrstr (str->str, "unchanged") != NULL) || (g_strrstr (str->str, "match") != NULL)) {
} else if (g_strrstr (str->str, "unchanged") != NULL ||
g_strrstr (str->str, "match") != NULL) {
msg = g_strdup (_("The old and new passwords are the same."));
} else if (g_strrstr (str->str, "failure") != NULL) {
/* Authentication failure */