From 26b01b5057a38149a5a5fdbe04a39e0488273acb Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Fri, 18 May 2012 20:27:56 -0400 Subject: Don't include command-line in spawning error messages We don't even know it and it's not worth reconstructing it. Signed-off-by: David Zeuthen --- src/polkitbackend/polkitbackendjsauthority.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/polkitbackend/polkitbackendjsauthority.c b/src/polkitbackend/polkitbackendjsauthority.c index c2023b8..1d6e156 100644 --- a/src/polkitbackend/polkitbackendjsauthority.c +++ b/src/polkitbackend/polkitbackendjsauthority.c @@ -1076,7 +1076,6 @@ js_polkit_spawn (JSContext *cx, /* PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (JS_GetContextPrivate (cx)); */ JSBool ret = JS_FALSE; JSObject *array_object; - gchar *command_line = NULL; gchar *standard_output = NULL; gchar *standard_error = NULL; gint exit_status; @@ -1123,8 +1122,7 @@ js_polkit_spawn (JSContext *cx, &error)) { JS_ReportError (cx, - "Failed to spawn command-line `%s': %s (%s, %d)", - command_line, + "Failed to spawn helper: %s (%s, %d)", error->message, g_quark_to_string (error->domain), error->code); g_clear_error (&error); goto out; @@ -1137,15 +1135,13 @@ js_polkit_spawn (JSContext *cx, if (WIFEXITED (exit_status)) { g_string_append_printf (gstr, - "Command-line `%s' exited with non-zero exit status %d", - command_line, + "Helper exited with non-zero exit status %d", WEXITSTATUS (exit_status)); } else if (WIFSIGNALED (exit_status)) { g_string_append_printf (gstr, - "Command-line `%s' was signaled with signal %s (%d)", - command_line, + "Helper was signaled with signal %s (%d)", get_signal_name (WTERMSIG (exit_status)), WTERMSIG (exit_status)); } @@ -1163,7 +1159,6 @@ js_polkit_spawn (JSContext *cx, out: g_strfreev (argv); - g_free (command_line); g_free (standard_output); g_free (standard_error); return ret; -- cgit v1.2.1