kov changed libgksu/trunk/ChangeLog, libgksu/trunk/libgksu/libgksu.c
Gustavo Noronha
kov at costa.debian.org
Tue Oct 24 02:18:20 UTC 2006
Mensagem de log:
store the password in the GNOME Keyring without the \n
(Addresses Debian Bug #394895)
-----
Modified: libgksu/trunk/ChangeLog
===================================================================
--- libgksu/trunk/ChangeLog 2006-10-24 01:57:36 UTC (rev 750)
+++ libgksu/trunk/ChangeLog 2006-10-24 02:18:20 UTC (rev 751)
@@ -6,6 +6,8 @@
asks for the password
- returns WRONGAUTOPASS instead of WRONGPASS when wrong password
is the one we got from the gnome keyring
+ - store the password in the GNOME Keyring without the \n
+ (Addresses Debian Bug #394895)
2006-10-22 Gustavo Noronha Silva <kov at debian.org>
Modified: libgksu/trunk/libgksu/libgksu.c
===================================================================
--- libgksu/trunk/libgksu/libgksu.c 2006-10-24 01:57:36 UTC (rev 750)
+++ libgksu/trunk/libgksu/libgksu.c 2006-10-24 02:18:20 UTC (rev 751)
@@ -658,8 +658,6 @@
password = g_locale_from_utf8 (found->secret,
password_length,
NULL, NULL, NULL);
- /* strip the \n that is always stored in gnome-keyring */
- password[password_length - 1] = '\0';
return password;
}
@@ -1899,8 +1897,6 @@
if (!(tio.c_lflag & ECHO))
{
- gchar *tmp = NULL;
-
gboolean prompt_grab;
prompt_grab = gconf_client_get_bool (context->gconf_client, BASE_PATH "prompt",
NULL);
@@ -1909,16 +1905,16 @@
gksu_prompt_grab (context);
/* try to get the password from the GNOME Keyring first */
- tmp = get_gnome_keyring_password (context);
+ password = get_gnome_keyring_password (context);
if (context->debug)
- fprintf (stderr, "tmp: %s\n", tmp);
- if (tmp == NULL)
- tmp = ask_pass (context, buf, ask_pass_data, error);
+ fprintf (stderr, "password: %s\n", password);
+ if (password == NULL)
+ password = ask_pass (context, buf, ask_pass_data, error);
else
used_gnome_keyring = TRUE;
if (context->debug)
- fprintf (stderr, "tmp: %s\n", tmp);
- if (tmp == NULL || (error && (*error)))
+ fprintf (stderr, "password: %s\n", password);
+ if (password == NULL || (error && (*error)))
{
if (context->debug)
fprintf (stderr, "gksu_su_full: problem getting password - getting out\n");
@@ -1928,10 +1924,8 @@
return TRUE;
}
- password = g_strdup_printf ("%s\n", tmp);
- nullify_password (tmp);
-
- write (fdpty, password, strlen(password));
+ write (fdpty, password, strlen(password) + 1);
+ write (fdpty, "\n", 1);
password_needed = TRUE;
}
}
More information about the gksu-commits
mailing list