diff options
author | David Zeuthen <davidz@redhat.com> | 2011-02-22 16:49:44 -0500 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2011-02-22 16:49:44 -0500 |
commit | 986d7c293c6b35899a1e7bc6437f18775220dc47 (patch) | |
tree | adc44e825b13404b47668096377fd574254931fd /src/programs | |
parent | 8d96c2ec128eedbd668823dc563bc68ea44b933d (diff) | |
download | polkit-986d7c293c6b35899a1e7bc6437f18775220dc47.tar.gz |
Bug 30653 – No way to detect cancellation in pkexec
https://bugs.freedesktop.org/show_bug.cgi?id=30653
Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'src/programs')
-rw-r--r-- | src/programs/pkexec.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c index fbd700d..40042e4 100644 --- a/src/programs/pkexec.c +++ b/src/programs/pkexec.c @@ -714,10 +714,19 @@ main (int argc, char *argv[]) } else { - log_message (LOG_WARNING, TRUE, - "Error executing command as another user: Not authorized"); - g_printerr ("\n" - "This incident has been reported.\n"); + if (polkit_authorization_result_get_dismissed (result)) + { + log_message (LOG_WARNING, TRUE, + "Error executing command as another user: Request dismissed"); + ret = 126; + } + else + { + log_message (LOG_WARNING, TRUE, + "Error executing command as another user: Not authorized"); + g_printerr ("\n" + "This incident has been reported.\n"); + } goto out; } |