Bug#412681: gksu: default keyring not created

2007-03-06 Thread Lionel VAUX
Le lundi  5 mars 2007 à 20:37, Gustavo Noronha Silva a écrit:
 The attached patch should fix the problem. Can you please try it? I
 tried with a newly created user, and it works for me. Most of the patch
 is actually a better way of showing debug messages if -d is passed as
 argument.

The patch worked perfectly for me. Thanks.



Bug#412681: gksu: default keyring not created

2007-03-05 Thread Gustavo Noronha Silva
Em Ter, 2007-02-27 às 12:55 +0100, Lionel Vaux escreveu:
 On a clean etch install, when I launch some app using gksu, the
 password is not remembered when the option Save in the keyring
 is selected. The problem is that the default keyring does not exist,
 and I am not prompted to create it.

I haven't noticed this problem. I thought the default keyring was
created by default, thanks for your bug report!

 If I create a keyring with name default using gnome-keyring-manager,
 then gksu correctly saves the password.
 
 Please prompt to create a default keyring if one does not exist.

The attached patch should fix the problem. Can you please try it? I
tried with a newly created user, and it works for me. Most of the patch
is actually a better way of showing debug messages if -d is passed as
argument.

I don't have the time to create a patched package right now, but if I
have the time I'll create one later today. If it works for you we'll try
to get the release team approval for this change to go into Etch. I
don't think there will be problems.

Thanks again,

See you,

-- 
Gustavo Noronha [EMAIL PROTECTED]
http://kov.eti.br/
Index: libgksu/libgksu.c
===
--- libgksu/libgksu.c	(revisão 781)
+++ libgksu/libgksu.c	(cópia de trabalho)
@@ -648,7 +648,7 @@
   gnome_keyring_attribute_list_free (attributes);
   if (
   (result == GNOME_KEYRING_RESULT_OK) 
-  (g_list_length(list) == 1)
+  (g_list_length(list) = 1)
   )
 {
   GnomeKeyringFound *found = list-data;
@@ -689,6 +689,7 @@
   static GMainLoop *keyring_loop = NULL;
   GnomeKeyringAttributeList *attributes;
   GnomeKeyringAttribute attribute;
+  GnomeKeyringResult result;
 
   gchar *keyring_name;
   gchar *key_name;
@@ -718,6 +719,14 @@
   keyring_name = gconf_client_get_string (gconf_client, BASE_PATHsave-keyring, NULL);
   if (keyring_name == NULL)
 	keyring_name = g_strdup (session);
+
+  /* make sure the keyring exists; if an error occurs, use
+ the session keyring */
+  result = gnome_keyring_create_sync(keyring_name, NULL);
+  if ((result != GNOME_KEYRING_RESULT_OK) 
+	  (result != GNOME_KEYRING_RESULT_ALREADY_EXISTS))
+	keyring_name = g_strdup (session);
+
   gnome_keyring_item_create (keyring_name,
  GNOME_KEYRING_ITEM_GENERIC_SECRET,
  key_name,
@@ -1983,14 +1992,22 @@
 
 	  /* try to get the password from the GNOME Keyring first */
 	  password = get_gnome_keyring_password (context);
-	  if (context-debug)
-		fprintf (stderr, password: %s\n, password);
 	  if (password == NULL)
-		password = ask_pass (context, buf, ask_pass_data, error);
+		{
+		  password = ask_pass (context, buf, ask_pass_data, error);
+		  if (context-debug)
+		{
+		  fprintf (stderr, no password on keyring\n);
+		  if (password == NULL)
+			fprintf (stderr, no password from ask_pass!\n);
+		}
+		}
 	  else
-		used_gnome_keyring = TRUE;
-	  if (context-debug)
-		fprintf (stderr, password: %s\n, password);
+		{
+		  if (context-debug)
+		fprintf (stderr, password from keyring found\n);
+		  used_gnome_keyring = TRUE;
+		}
 	  if (password == NULL || (error  (*error)))
 		{
 		  if (context-debug)


Bug#412681: gksu: default keyring not created

2007-02-27 Thread Lionel Vaux
Package: gksu
Version: 2.0.0-1
Severity: normal


On a clean etch install, when I launch some app using gksu, the
password is not remembered when the option Save in the keyring
is selected. The problem is that the default keyring does not exist,
and I am not prompted to create it.

If I create a keyring with name default using gnome-keyring-manager,
then gksu correctly saves the password.

Please prompt to create a default keyring if one does not exist.

Regards,
iouri.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages gksu depends on:
ii  gnome-keyring   0.6.0-3  GNOME keyring services (daemon and
ii  libatk1.0-0 1.12.4-2 The ATK accessibility toolkit
ii  libc6   2.3.6.ds1-11 GNU C Library: Shared libraries
ii  libcairo2   1.2.4-4  The Cairo 2D vector graphics libra
ii  libfontconfig1  2.4.2-1  generic font configuration library
ii  libgconf2-4 2.16.0-3 GNOME configuration database syste
ii  libgksu2-0  2.0.3-4  library providing su and sudo func
ii  libglib2.0-02.12.4-2 The GLib library of C routines
ii  libgnome-keyring0   0.6.0-3  GNOME keyring services library
ii  libgtk2.0-0 2.8.20-5 The GTK+ graphical user interface 
ii  liborbit2   1:2.14.3-0.1 libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0   1.14.8-5 Layout and rendering of internatio
ii  libstartup-notification00.8-2library for program launch feedbac
ii  libx11-62:1.0.3-5X11 client-side library
ii  libxcursor1 1.1.7-4  X cursor management library
ii  libxext61:1.0.1-2X11 miscellaneous extension librar
ii  libxfixes3  1:4.0.1-5X11 miscellaneous 'fixes' extensio
ii  libxi6  1:1.0.1-4X11 Input extension library
ii  libxinerama11:1.0.1-4.1  X11 Xinerama extension library
ii  libxrandr2  2:1.1.0.2-5  X11 RandR extension library
ii  libxrender1 1:0.9.1-3X Rendering Extension client libra
ii  sudo1.6.8p12-4   Provide limited super user privile

gksu recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]