[Xfce4-commits] <terminal:master> Store uid in an uint32.

Nick Schermer noreply at xfce.org
Sat Dec 22 22:22:01 CET 2012


Updating branch refs/heads/master
         to 089943d54979326d0ef740433564dbe3ce44e5ca (commit)
       from 05d312e4e610e4a1d830358b82ad8a374142b439 (commit)

commit 089943d54979326d0ef740433564dbe3ce44e5ca
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Dec 21 17:41:07 2012 +0100

    Store uid in an uint32.
    
    This is better for gvariant because it uses the size
    offset.

 terminal/terminal-gdbus.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/terminal/terminal-gdbus.c b/terminal/terminal-gdbus.c
index 69de0f5..3dddc0a 100644
--- a/terminal/terminal-gdbus.c
+++ b/terminal/terminal-gdbus.c
@@ -184,6 +184,7 @@ terminal_gdbus_invoke_launch (gint     argc,
   GDBusConnection *connection;
   GError          *err = NULL;
   gboolean         result;
+  guint32          uid;
 
   terminal_return_val_if_fail (argc == (gint) g_strv_length (argv), FALSE);
 
@@ -191,13 +192,16 @@ terminal_gdbus_invoke_launch (gint     argc,
   if (G_UNLIKELY (connection == NULL))
     return FALSE;
 
+  /* store in an uin32 for gvariant */
+  uid = getuid ();
+
   reply = g_dbus_connection_call_sync (connection,
                                        TERMINAL_DBUS_SERVICE,
                                        TERMINAL_DBUS_PATH,
                                        TERMINAL_DBUS_INTERFACE,
                                        TERMINAL_DBUS_METHOD_LAUNCH,
                                        g_variant_new ("(u^ay^aay)",
-                                                      getuid (),
+                                                      uid,
                                                       g_getenv ("DISPLAY"),
                                                       argv),
                                        NULL,


More information about the Xfce4-commits mailing list