summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test: Add a test case to handle actions without explicit rulesmozjs52Jeremy Linton2018-03-291-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>
* jsauthority: re-enable JITRay Strode2018-03-281-6/+3
| | | | seems to work with mozjs52
* jsauthority: switch from JS_ConvertArguments to JS::CallArgsFromVpRay Strode2018-03-281-19/+14
|
* jsauthority: stop using JS_GetStringCharsZRay Strode2018-03-281-9/+6
| | | | it's not around anymore.
* jsauthority: fix up set_property methodsRay Strode2018-03-281-26/+35
|
* jsauthority: use JS::Evaluate instead of JS_EvaluateScriptRay Strode2018-03-281-28/+21
| | | | | JS_EvaluateScript is no longer in the API set, so use JS::Evaluate instead.
* jsauthority: adapt arguments for new JS_ExecuteScript APIRay Strode2018-03-281-1/+0
| | | | JS_ExecuteScript no longer takes a global argument.
* jsauthority: adapt arguments for new JS::Compile APIRay Strode2018-03-281-6/+1
| | | | | | | The global object is implicit now and the result is an out arg. This commit adapts to the new api.
* jsauthority: root some locals to the contextRay Strode2018-03-281-4/+4
|
* jsauthority: redo how global objects are set upRay Strode2018-03-281-23/+25
| | | | | | | | This commit drops usage of JS_AddObjectRoot and switches the global object over to being wrapped in a JS::Heap pointer. It stops using JS_DefineObject which no longer seems to be available, and adds a new JS::FireOnNewGlobalHook which seems to be required.
* jsauthority: use InterruptCallback api instead of OperationCallbackRay Strode2018-03-281-5/+7
| | | | seems like it got renamed.
* jsauthority: Fix up JS_CallFunctionName invocationsRay Strode2018-03-281-28/+28
| | | | The way args are passed in changed.
* jsauthority: JSVAL_IS_NULL (o) to o.isNull()Ray Strode2018-03-281-1/+1
|
* jsauthority: JSVAL_IS_STRING (s) to s.isString()Ray Strode2018-03-281-3/+3
|
* jsauthority: JSVAL_TO_STRING (s) to s.toString()Ray Strode2018-03-281-3/+3
|
* jsauthority: JSVAL_TO_OBJECT (o) to o.toObjectOrNull()Ray Strode2018-03-281-2/+2
|
* jsauthority: s/BOOLEAN_TO_JSVAL/JS::BooleanValue/Ray Strode2018-03-281-1/+1
|
* jsauthority: s/STRING_TO_JSVAL/JS::StringValue/Ray Strode2018-03-281-4/+4
|
* jsauthority: s/OBJECT_TO_JSVAL/JS::ObjectValue/Ray Strode2018-03-281-1/+1
| | | | | This commit does a global search and replace for OBJECT_TO_JSVAL to JS::ObjectValue()
* jsauthority: s/JSVAL_VOID/JS::UndefinedValue()/Ray Strode2018-03-281-1/+1
| | | | | This commit does a global search and replace for JSVAL_VOID to JS::UndefinedValue()
* jsauthority: s/JSVAL_NULL/JS::NullValue()/Ray Strode2018-03-281-6/+6
| | | | | This commit does a global search and replace for JSVAL_NULL to JS::NullValue()
* jsauthority: s/jsval/JS::Value/Ray Strode2018-03-281-28/+28
| | | | The API got renamed in mozjs31.
* jsauthority: s/JSBool/bool/Ray Strode2018-03-281-23/+23
| | | | It's been gone since mozjs31
* jsauthority: pass "%s" format string to report functionsRay Strode2018-03-281-1/+1
| | | | This just avoids the potential for security problems down the line.
* jsauthority: add UTF8 suffix to renamed functionsRay Strode2018-03-281-6/+6
|
* jsauthority: JS::SetWarningReporter instead of JS_SetErrorReporterRay Strode2018-03-281-3/+2
| | | | | | | This commit changes the code to use JS::SetWarningReporter instead of JS_SetErrorReporter. The latter, as far as I can tell, is just a slightly renamed version of the former with the args moved around a little bit.
* jsauthority: change how JIT is disabledRay Strode2018-03-281-3/+4
| | | | | | JS_SetOptions seems to be replaced with JS::ContextOptionsRef now. Also, disabling the JIT seems to be three options now instead of just one.
* jsauthority: call JS_InitSelfHostedCodeRay Strode2018-03-281-0/+3
| | | | This is now required
* jsauthority: call JS_InitRay Strode2018-03-281-0/+3
| | | | This is now required
* jsauthority: change how setVersion is calledRay Strode2018-03-281-1/+1
| | | | it's now part of a behaviors method in CompartmentOptions
* jsauthority: get rid of JSRuntimeRay Strode2018-03-281-8/+2
| | | | Seems like JSContext is the only thing that matters now.
* jsauthority: use JS_FN instead of JS_FSRay Strode2018-03-281-3/+3
| | | | since it doesn't crash if i do that
* jsauthority: fix how classes are definedRay Strode2018-03-281-18/+31
| | | | | | | | | | | mozjs no longer has public stub functions that implementers of JSClass objects are supposed to use. Instead NULL means to use the default stub implementations. Furthermore, the structure has been broken out into a JSClassOps sub structure now. This commit adapts the code to the new layout.
* configure: bump mozjs requirement to 52Ray Strode2018-03-221-1/+1
| | | | This is going to briefly break the build.
* Fix a typo in polkit(8)Miloslav Trmač2017-10-091-1/+1
| | | | | | Reported by Perter Klotz <peter.klotz99@gmail.com>. https://bugs.freedesktop.org/show_bug.cgi?id=103144
* Add Chinese (Taiwan) translationMiloslav Trmač2017-09-042-0/+197
| | | | | | By Cheng-Chia Tseng <pswo10680@gmail.com>. https://bugs.freedesktop.org/show_bug.cgi?id=102492
* Add hr.pomuzena2017-04-242-0/+205
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=100764
* polkitpermission: Fix a memory leak on authority changesRui Matos2017-04-041-0/+1
| | | | | | Signed-off-by: Rui Matos <tiagomatos@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=99741
* Add Indonesian translation by Andika TriwidadaMiloslav Trmač2017-02-132-0/+206
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=99790
* build: Pull in GCC warning infra from ostreeColin Walters2016-12-127-70/+318
| | | | | | | | | I'm trying to keep a relatively standard set around, and the code there is cleaner than what we had before. Also, injecting as WARN_CFLAGS rather than changing CFLAGS during autoconf avoids any surprises from new warnings breaking autoconf checks.
* Replace autocompartmentJeremy Linton2016-12-121-7/+8
| | | | | | | | The autocompartment definition in the previous patches seems to be fine, but constructing the autocompartment for the lifetime of the global object is probably a better way to handle this. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
* Fix warnings caused by building with C++Jeremy Linton2016-12-122-70/+70
| | | | | | | | | C++ needs explicit casts for many pointer type conversions For example char * to void * should have a cast. Fix a number of these cases. Also, correct a white space indentation error left in the last patch for review clarity. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
* Switch to hard requiring mozjs24Jeremy Linton2016-12-122-63/+25
| | | | | | | | | | | Remove mozjs185 and mozjs17 from autoconf and replace them with mozjs24. Now that polkitbackendjsauthority is compiling in C++ mode and the autoconf supports mozjs24, update the module so that it builds with mozjs24. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
* change mozjs interface module to c++Jeremy Linton2016-12-124-1/+12
| | | | | | | | 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>
* gettext: switch to default-translate "no"Peter Hutterer2016-11-081-2/+3
| | | | | | | | | | | | | | | | | | | | The default appears to be to translate all entries. This rule never takes effect, the path to /action/message and /action/description is wrong (/action is not a root node). Since we wanted them to be translated, it doesn't matter. But it also translates all other tags (vendor, allow_any, etc.) and that causes polkit to be unhappy, it can't handle the various language versions of "no" ** (polkitd:27434): WARNING **: Unknown PolkitImplicitAuthorization string 'tidak' Switch to a default of "no" and explicitly include the message and description strings to be translated. The patch was modified for PolicyKit by Ondrej Holy <oholy@redhat.com>. https://bugs.freedesktop.org/show_bug.cgi?id=98366
* Add Slovak translation by Dusan Kazik <prescott66@gmail.com>Miloslav Trmač2016-08-092-0/+212
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=97238
* Add gettext support for .policy filesMatthias Clasen2016-07-153-0/+18
| | | | | | | gettext can extract strings from and merge them back into xml file formats, with the help of .its files. https://bugs.freedesktop.org/show_bug.cgi?id=96940
* data: Set GIO_USE_VFS=local in the environmentPhilip Withnall2016-06-065-0/+19
| | | | | | | | | | | | There is no need for polkit to ever use GVFS to load files from non-local sources, so it's best to avoid loading GVFS code, and to just rely on the local implementation in GIO instead. This reduces the attack surface of polkit. Implemented for the daemon, pkaction, pkcheck, pkexec and pkttyagent, because none of them need remote file access. https://bugs.freedesktop.org/show_bug.cgi?id=95487
* polkit: Add g_autoptr() support for GObject-derived polkit typesPhilip Withnall2016-05-041-0/+17
| | | | | | | | | | Add G_DEFINE_AUTOPTR_CLEANUP_FUNC calls to polkittypes.h, so that g_autoptr() can be used with polkit objects. This is conditional on GLib ≥ 2.44.0 being available. It does not bump polkit’s dependency on GLib. https://bugs.freedesktop.org/show_bug.cgi?id=95065
* Added Turkish translationMuhammet Kara2016-04-152-0/+212
|