Don't spawn man(1) from a setuid program
authorDavid Zeuthen <davidz@redhat.com>
Mon, 27 Jul 2009 14:03:34 +0000 (10:03 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 27 Jul 2009 14:03:34 +0000 (10:03 -0400)
src/programs/pkexec.c

index 10329dd..5121d21 100644 (file)
 static void
 usage (int argc, char *argv[])
 {
-  GError *error;
-
-  error = NULL;
-  if (!g_spawn_command_line_sync ("man pkexec",
-                                  NULL,
-                                  NULL,
-                                  NULL,
-                                  &error))
-    {
-      g_printerr ("Cannot show manual page: %s\n", error->message);
-      g_error_free (error);
-    }
+  g_printerr ("pkexec --version |\n"
+              "       --help |\n"
+              "       [--user username] PROGRAM [ARGUMENTS...]\n"
+              "\n"
+              "See the pkexec manual page for more details.\n");
 }
 
 /* ---------------------------------------------------------------------------------------------------- */