Commit c8e16501 authored by David Zeuthen's avatar David Zeuthen
Browse files

Make pkcheck(1) report if the authentication dialog was dismissed


Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent 4746ff30
...@@ -124,6 +124,13 @@ KEY3=VALUE3 ...@@ -124,6 +124,13 @@ KEY3=VALUE3
exits with a return value of 2 and a diagnostic message is printed on standard error. exits with a return value of 2 and a diagnostic message is printed on standard error.
Details are printed on standard output. Details are printed on standard output.
</para> </para>
<para>
If the specificied process is not authorized because the
authentication dialog / request was dismissed by the user,
<command>pkcheck</command> exits with a return value of 3 and a
diagnostic message is printed on standard error. Details are
printed on standard output.
</para>
<para> <para>
If an error occured while checking for authorization, <command>pkcheck</command> exits If an error occured while checking for authorization, <command>pkcheck</command> exits
with a return value of 127 with a diagnostic message printed on standard error. with a return value of 127 with a diagnostic message printed on standard error.
......
...@@ -325,6 +325,11 @@ main (int argc, char *argv[]) ...@@ -325,6 +325,11 @@ main (int argc, char *argv[])
} }
ret = 2; ret = 2;
} }
else if (polkit_authorization_result_get_dismissed (result))
{
g_printerr ("Authentication request was dismissed.\n");
ret = 3;
}
else else
{ {
g_printerr ("Not authorized.\n"); g_printerr ("Not authorized.\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment