diff options
author | Jeremy Linton <jeremy.linton@arm.com> | 2017-04-12 22:26:30 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-04-03 14:16:48 -0400 |
commit | ca50ffa0ba9c5936f5482f3a56f2a12ebe145152 (patch) | |
tree | 7a2a4529c07feea38e3bf5c16ec2a43df33e4c0c /test | |
parent | e155a9c83ec8b8a50d1dd45d2be450f8e2dbd419 (diff) | |
download | polkit-ca50ffa0ba9c5936f5482f3a56f2a12ebe145152.tar.gz |
test: Add a test case to handle actions without explicit rules
An implicit authorization parameter is provided to
polkit_backend_js_authority_check_authorization_sync() for actions
without corresponding explicit rules. Assure that is honored rather
than simply being denied.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
https://bugs.freedesktop.org/show_bug.cgi?id=105865
Diffstat (limited to 'test')
-rw-r--r-- | test/polkitbackend/test-polkitbackendjsauthority.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c index 984110c..b484a26 100644 --- a/test/polkitbackend/test-polkitbackendjsauthority.c +++ b/test/polkitbackend/test-polkitbackendjsauthority.c @@ -182,6 +182,14 @@ static const RulesTestCase rules_test_cases[] = { NULL, POLKIT_IMPLICIT_AUTHORIZATION_AUTHENTICATION_REQUIRED, }, + /* actions without explict rules aren't automatically NOT_AUTHORIZED */ + { + "basic2", + "net.company.productA.action2", + "unix-user:john", + NULL, + POLKIT_IMPLICIT_AUTHORIZATION_UNKNOWN, + }, /* Ordering tests ... we have four rules files, check they are * evaluated in order by checking the detail set by each rules |