← Back to team overview

ayatana-commits team mailing list archive

[Branch ~xsplash-team/xsplash/trunk] Rev 92: Move argument processing before setresgid, fixes bug #474712

 

Merge authors:
  Cody Russell (bratsche)
Related merge proposals:
  https://code.launchpad.net/~bratsche/xsplash/help-fix/+merge/14443
  proposed by: Cody Russell (bratsche)
  review: Approve - Ted Gould (ted)
------------------------------------------------------------
revno: 92 [merge]
committer: Cody Russell <crussell@xxxxxxxxxxxxx>
branch nick: trunk
timestamp: Wed 2009-12-09 10:42:37 -0600
message:
  Move argument processing before setresgid, fixes bug #474712
modified:
  src/xsplash.c


--
lp:xsplash
https://code.launchpad.net/~xsplash-team/xsplash/trunk

Your team ayatana-commits is subscribed to branch lp:xsplash.
To unsubscribe from this branch go to https://code.launchpad.net/~xsplash-team/xsplash/trunk/+edit-subscription.
=== modified file 'src/xsplash.c'
--- src/xsplash.c	2009-10-21 13:06:01 +0000
+++ src/xsplash.c	2009-11-04 22:19:27 +0000
@@ -984,6 +984,16 @@
   gchar           *log_filename = NULL;
   struct passwd   *pwd;
 
+  context = g_option_context_new ("xsplash");
+  g_option_context_add_main_entries (context,
+                                     entries,
+                                     "xsplash");
+  g_option_context_add_group (context, gtk_get_option_group (TRUE));
+  if (!g_option_context_parse (context, &argc, &argv, &error))
+    {
+      exit (1);
+    }
+
   pwd = getpwnam (XSPLASH_USER);
   if (pwd == NULL)
     {
@@ -1003,16 +1013,6 @@
       return 1;
     }
 
-  context = g_option_context_new ("xsplash");
-  g_option_context_add_main_entries (context,
-                                     entries,
-                                     "xsplash");
-  g_option_context_add_group (context, gtk_get_option_group (TRUE));
-  if (!g_option_context_parse (context, &argc, &argv, &error))
-    {
-      exit (1);
-    }
-
   log_filename = g_strdup_printf ("/var/log/gdm/xsplash-%s.log", gdm_session ? "gdm" : "user");
   log_init (log_filename); g_message ("xsplash started");
   g_free (log_filename);