gnome-keyring r1060 - in trunk: . library



Author: nnielsen
Date: Thu Feb 14 19:02:26 2008
New Revision: 1060
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1060&view=rev

Log:
	* library/gnome-keyring.c: Fix problem setting environment variables.


Modified:
   trunk/ChangeLog
   trunk/library/gnome-keyring.c

Modified: trunk/library/gnome-keyring.c
==============================================================================
--- trunk/library/gnome-keyring.c	(original)
+++ trunk/library/gnome-keyring.c	Thu Feb 14 19:02:26 2008
@@ -1781,6 +1781,7 @@
 	GkrBuffer send, receive;
 	GnomeKeyringResult res;
 	gchar **daemonenv, **e;
+	gchar **parts;
 
 	gkr_buffer_init_full (&send, 128, g_realloc);
 
@@ -1804,8 +1805,12 @@
 	gkr_buffer_uninit (&receive);
 	
 	if (res == GNOME_KEYRING_RESULT_OK) {
-		for (e = daemonenv; *e; ++e)
-			putenv (*e);
+		for (e = daemonenv; *e; ++e) {
+			parts = g_strsplit (*e, "=", 2);
+			if (parts && parts[0] && parts[1])
+				g_setenv (parts[0], parts[1], TRUE);
+			g_strfreev (parts);
+}
 	}
 	
 	g_strfreev (daemonenv);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]