summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* build: add option to skip building polkitdPeter Eisenmann2022-09-071-1/+3
|
* Make netgroup support optionalA. Wilcox2022-07-143-1/+11
| | | | | | | | | | | | | | | | | On at least Linux/musl and Linux/uclibc, netgroup support is not available. PolKit fails to compile on these systems for that reason. This change makes netgroup support conditional on the presence of the setnetgrent(3) function which is required for the support to work. If that function is not available on the system, an error will be returned to the administrator if unix-netgroup: is specified in configuration. (sam: rebased for Meson and Duktape.) Closes: https://gitlab.freedesktop.org/polkit/polkit/-/issues/14 Closes: https://gitlab.freedesktop.org/polkit/polkit/-/issues/163 Closes: https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/52 Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
* Remove autotools build systemJan Rybar2022-05-093-146/+0
|
* test: Extend timeout for test-polkitbackendjsauthoritySimon McVittie2022-02-211-0/+1
|
* Added support for duktape as JS engineGustavo Lima Chaves2022-01-252-3/+5
| | | | | Original author: Wu Xiaotian (@yetist) Resurrection author, runaway-killer author: Gustavo Lima Chaves (@limachaves)
* Revert "Merge branch 'pwithnall/polkit-51-usr-local-share-is-my-homeboy' ↵revert-2c8287fbJan Rybar2021-04-136-118/+12
| | | | | into 'master'" This reverts merge request !75
* test: Fix a typo in a commentJan Rybar2021-02-256-12/+118
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* build: Port to meson build systemJan Rybar2020-10-267-5/+112
| | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools.
* add polkitbackendjsauthoritytest-wrapper.py into release tarballXℹ Ruoyao2020-07-311-1/+4
|
* ci: Add a CIBastien Nocera2020-02-213-4/+69
| | | | Just compiles and installs polkit
* tests: add tests for high uidsZbigniew Jędrzejewski-Szmek2018-12-044-0/+96
|
* test: Add a test case to handle actions without explicit rulesJeremy Linton2018-04-031-0/+8
| | | | | | | | | | | 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
* tests: Correct boundary test for overflowColin Walters2018-04-031-1/+1
| | | | | | The offset has to be strictly less than the max. https://bugs.freedesktop.org/show_bug.cgi?id=87716
* Move to current GLibMiloslav Trmač2018-04-035-5/+0
| | | | | | | | | | Set up glib to use the installed version for deprecation warnings instead of limiting ourselves to [2.30,2.34]; this will let us use newer API, and help us keep up to date with future deprecations. Then fix all the warnings (as of GLib 2.44.1). https://bugs.freedesktop.org/show_bug.cgi?id=91198
* change mozjs interface module to c++Jeremy Linton2016-12-121-0/+3
| | | | | | | | The JSAPI is now a full C++ interface. Convert the polkit to JavaScript interface module to C++ compilation in order to support newer versions of spidermonkey. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
* s/INCLUDES/AM_CPPFLAGS/gMiloslav Trmač2015-06-082-2/+2
| | | | | | | to silence warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') https://bugs.freedesktop.org/show_bug.cgi?id=80767
* build: Start using git.mkColin Walters2015-06-036-0/+12
| | | | | | | | I was looking at: https://bugs.freedesktop.org/show_bug.cgi?id=85504 But polkit, particularly because of its use of recursive make, is a good fit for git.mk.
* Port internals non-deprecated PolkitProcess API where possibleColin Walters2013-11-111-4/+4
| | | | | We can't port everything, but in PolkitPermission and these test cases, we can use _for_owner() with the right information.
* Fix various memory leaks.Miloslav Trmač2013-04-152-1/+6
| | | | | | | | | | | | The XML_ParserCreate_MM one was found by Florian Weimer in https://bugzilla.redhat.com/show_bug.cgi?id=888728 . This should cover everything found by valgrind on the JS authority test, augmented with a call to polkit_backend_authority_enumerate_actions() to verify the XML_ParserCreate_MM case. https://bugs.freedesktop.org/show_bug.cgi?id=63492
* configure: Specify GLib min/max versionColin Walters2013-04-121-0/+1
| | | | | | Mainly to avoid deprecation warnings about g_type_init(). https://bugs.freedesktop.org/show_bug.cgi?id=63440
* mocklibc: Only require autoconf 2.63Colin Walters2013-04-111-1/+1
| | | | It still works, and this lets polkit build on RHEL6.
* Introduce a polkit.Result enumeration for authorization rulesDavid Zeuthen2012-07-064-32/+32
| | | | | | | | | | | | | | This way an authorization rule can do this return polkit.Result.YES; which is slightly nicer than return "yes"; https://bugs.freedesktop.org/show_bug.cgi?id=50983 Signed-off-by: David Zeuthen <zeuthen@gmail.com>
* Make it work when using ConsoleKit instead of libsystemd-loginDavid Zeuthen2012-06-061-0/+2
| | | | | | | | ... although it would be nicer to just rip out the CK bits and simply hard-require libsystemd-login instead - it should work just fine on non-systemd systems, same way systemd-udev works fine there. Signed-off-by: David Zeuthen <zeuthen@gmail.com>
* Combine action and details parametersDavid Zeuthen2012-05-245-82/+139
| | | | | | | | | | This also removes the ability to change detail parameters which is actually a good thing. If we later need a way to change the authentication message, we can always add something like polkit.addAuthenticationMessageRule() so the user can register a function returning a string. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Terminate runaway scriptsDavid Zeuthen2012-05-242-0/+23
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Nuke polkitbackend library, localauthority backend and extension systemDavid Zeuthen2012-05-234-409/+0
| | | | | | | | | | | Any backend can now be implemented in JavaScript (if so desired) so we don't need any of this any more. Note that the libpolkitbackend library was never declared stable (the preprocessor symbol POLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE had to be defined) so removing it is not an API/ABI break. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add test-cases and 10 second timeout for polkit.spawn()David Zeuthen2012-05-212-0/+103
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add netgroup supportDavid Zeuthen2012-05-213-2/+43
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Test that subject.isInGroup() worksDavid Zeuthen2012-05-212-1/+37
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add test cases for evaluation orderDavid Zeuthen2012-05-216-9/+199
| | | | | | | In fact, this test uncovered that we were evaluating the rules in the wrong order. Fix this. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Use addRule() and addAdminRule()David Zeuthen2012-05-211-8/+5
| | | | | | ... as the man page already says. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Also load rules from /usr/share/polkit/rules.dDavid Zeuthen2012-05-213-5/+16
| | | | | | ... in addition to /etc/polkit/rules.d. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Make it possible for JS code to change detailsDavid Zeuthen2012-05-182-12/+4
| | | | | | | | | | | | | | | | For example, to set the authentication message, a JS function can simply do details["polkit.message"] = "Hey dude, XYZ, I need your password"; This can also be used to pass data back to the mechanism. To make this work properly, we also introduce a slight change: the a{ss} passed back to the mechanism (part of the AuthorizationResult structure) will be initialized with the a{ss} the app passed itself in the CheckAuthorization() call. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Clean up code a bitDavid Zeuthen2012-05-182-0/+4
| | | | | | | Also, move init code into init.js instead of using a C string for it... Signed-off-by: David Zeuthen <davidz@redhat.com>
* Pass details to JS functions and simplify how Subject instances are constructedDavid Zeuthen2012-05-181-5/+5
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add experimental authority backend using JavaScript rule filesDavid Zeuthen2012-05-173-0/+189
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Bug 43610 - Add netgroup supportNikki VonHollen2011-12-2239-105/+2381
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=43610 Added netgroup support and additional unit tests with MockLibc support. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Bug 43608 – Add unit testsNikki VonHollen2011-12-2012-0/+797
| | | | | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=43608 Basic unittest support and a few tests. Adds basic unit tests for: PolkitIdentity, PolkitUnixUser, PolkitUnixGroup, PolkitBackendLocalAuthorizationStore, and PolkitBackendLocalAuthority. Signed-off-by: David Zeuthen <davidz@redhat.com>
* prepare for merge of rewritten PolicyKitDavid Zeuthen2009-01-2716-326/+0
|
* bump to version 0.90 and ensure we're parallel installable with 0.9David Zeuthen2008-07-312-0/+0
| | | | | | | | | | | | | | | | This is the first move towards 1.0; also - kill the config file - merge libpolkit and libpolkit-dbus Now to write a system daemon that libpolkit will use for the backend. Expect HEAD to be broken for a few weeks at least. Also see http://ometer.com/parallel.html for what "parallel installable" means. As a result, all the binaries, man pages, .policy file dir and so forth have been renamed too. I expect the API to change a bit. So some (not much though) porting to PolicyKit 1.0 will be required by current users.
* update .gitignore filesDavid Zeuthen2007-11-292-0/+0
|
* add .gitignore files to get test tree structure in the repoDavid Zeuthen2007-11-294-0/+0
|
* add unit test framework to the rest of the library sourcesDavid Zeuthen2007-11-111-16/+22
|
* tweak how we do coverage reportingDavid Zeuthen2007-11-111-6/+7
|
* add unit tests of PolKitPolicyCacheDavid Zeuthen2007-11-0811-11/+37
|
* use unique action namesDavid Zeuthen2007-11-089-10/+10
|
* also dist test .policy filesDavid Zeuthen2007-11-061-1/+11
|
* increase test coverage for PolKitPolicyFileDavid Zeuthen2007-11-069-0/+221
|
* add unit test framework with gcov coverage support (make check-coverage)David Zeuthen2007-11-032-0/+62
This is what it looks like ============================================================================== Test coverage for module polkit: ============================================================================== polkit-sysdeps.c : 0% (0 of 38) polkit-error.c : 0% (0 of 44) polkit-result.c : 0% (0 of 16) polkit-context.c : 0% (0 of 213) polkit-action.c : 34% (20 of 58) polkit-seat.c : 0% (0 of 34) polkit-session.c : 0% (0 of 97) polkit-caller.c : 0% (0 of 81) polkit-policy-file-entry.c : 0% (0 of 72) polkit-policy-file.c : 0% (0 of 220) polkit-policy-cache.c : 0% (0 of 98) polkit-policy-default.c : 0% (0 of 67) polkit-debug.c : 0% (0 of 15) polkit-utils.c : 0% (0 of 42) polkit-config.c : 0% (0 of 263) polkit-authorization.c : 0% (0 of 162) polkit-authorization-constraint.c : 0% (0 of 107) polkit-authorization-db.c : 0% (0 of 222) Source lines : 6919 Actual statements : 1849 Executed statements : 20 Test coverage : 1%