Re: Replacing polkit JS backend

2017-10-20 Thread Jeremy Linton
Hi, As a short term solution, there are patches to move to to mozjs38. https://www.mail-archive.com/polkit-devel@lists.freedesktop.org/msg00499.html I've recently been encouraged to do the port to mozjs52 as well, although my personal opinion is that javascript is way overkill for what polkit

[PATCH v3 2/2] test: Add a test case to handle actions without explicit rules

2017-04-12 Thread Jeremy Linton
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 --- test/polkitbackend/test-polkitbackendjsauthority.c

[PATCH v3 1/2] Move polkit to mozjs38

2017-04-12 Thread Jeremy Linton
etter security/etc statement. Gnome has moved off mozjs24 and is intending to land on mozjs38 in the near future. Lets try to keep polkit in step with gnome. Signed-off-by: Jeremy Linton --- v2->v3: Check for missing rules and default to provided authorization v1->v2: Use built

Re: [PATCH v2] Move polkit to mozjs38

2017-04-04 Thread Jeremy Linton
Hi, On 04/04/2017 03:05 PM, Miloslav Trmac wrote: Hello, 2017-04-04 21:10 GMT+02:00 Jeremy Linton mailto:jeremy.lin...@arm.com>>: Update polkit to use a more recent version of the mozjs library. … v1->v2: Switch back to using initjs.j rather than init.js Another not

Re: [PATCH] Move polkit to mozjs38

2017-04-04 Thread Jeremy Linton
Hi, On 04/04/2017 02:02 PM, Miloslav Trmac wrote: 2017-03-29 21:49 GMT+02:00 Jeremy Linton mailto:jeremy.lin...@arm.com>>: Update polkit to use a more recent version of the mozjs library. Thanks. I’m afraid I haven’t had time to review in detail yet, for now just noting that polki

[PATCH v2] Move polkit to mozjs38

2017-04-04 Thread Jeremy Linton
etter security/etc statement. Gnome has moved off mozjs24 and is intending to land on mozjs38 in the near future. Lets try to keep polkit in step with gnome. Signed-off-by: Jeremy Linton --- v1->v2: Switch back to using initjs.j rather than init.js conf

[PATCH] Move polkit to mozjs38

2017-03-29 Thread Jeremy Linton
etter security/etc statement. Gnome has moved off mozjs24 and is intending to land on mozjs38 in the near future. Lets try to keep polkit in step with gnome. Signed-off-by: Jeremy Linton --- configure.ac | 2 +- src/polkitbackend/polkitbackendjsauthority.cpp

Re: [PATCH v3 1/4] change mozjs interface module to c++

2016-12-12 Thread Jeremy Linton
Hi, On 12/12/2016 09:57 AM, Colin Walters wrote: On Mon, Dec 12, 2016, at 10:48 AM, Jeremy Linton wrote: Hi, On 12/12/2016 09:18 AM, Colin Walters wrote: On Fri, Aug 26, 2016, at 02:01 PM, Jeremy Linton wrote: The JSAPI is now a full C++ interface. Convert the polkit to JavaScript

Re: [PATCH v3 1/4] change mozjs interface module to c++

2016-12-12 Thread Jeremy Linton
Hi, On 12/12/2016 10:00 AM, Colin Walters wrote: On Mon, Dec 12, 2016, at 10:48 AM, Jeremy Linton wrote: Hi, On 12/12/2016 09:18 AM, Colin Walters wrote: On Fri, Aug 26, 2016, at 02:01 PM, Jeremy Linton wrote: The JSAPI is now a full C++ interface. Convert the polkit to JavaScript

Re: [PATCH v3 1/4] change mozjs interface module to c++

2016-12-12 Thread Jeremy Linton
Hi, On 12/12/2016 09:18 AM, Colin Walters wrote: On Fri, Aug 26, 2016, at 02:01 PM, Jeremy Linton wrote: 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. Ok, https

Re: [PATCH v3 0/4] Pull polkit forward to mozjs24

2016-09-08 Thread Jeremy Linton
Ping? Has anyone had a chance to try this, or look at the code? Thanks, On 08/26/2016 02:01 PM, Jeremy Linton wrote: Polkit is out of date with respect to supported versions of mozjs. These patches start moving polkit forward again. Right now they are just to mozjs24 which is one of the

[PATCH v3 4/4] Replace autocompartment

2016-08-26 Thread Jeremy Linton
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 --- src/polkitbackend/polkitbackendjsauthority.cpp | 15 --- 1

[PATCH v3 2/4] Cleanup configure and add support for mozjs24

2016-08-26 Thread Jeremy Linton
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 --- configure.ac

[PATCH v3 1/4] change mozjs interface module to c++

2016-08-26 Thread Jeremy Linton
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 --- configure.ac | 3 +++ src/polkitbackend

[PATCH v3 0/4] Pull polkit forward to mozjs24

2016-08-26 Thread Jeremy Linton
continued to allow polkit to build with mozjs17/185 Jeremy Linton (4): change mozjs interface module to c++ Cleanup configure and add support for mozjs24 Fix warnings caused by building with C++ Replace autocompartment configure.ac | 17 +- src/polk

[PATCH v3 3/4] Fix warnings caused by building with C++

2016-08-26 Thread Jeremy Linton
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 --- src/polkitbackend/Makefile.am

Re: [PATCH 0/4] Pull polkit forward to mozjs24

2016-08-22 Thread Jeremy Linton
On 08/22/2016 02:17 AM, Kalev Lember wrote: On 08/18/2016 05:38 PM, Jeremy Linton wrote: On 08/17/2016 03:57 PM, Colin Walters wrote: It might be worth looking at kalev's work to see what differs. Are the patches visible anywhere? I don't see them in those threads. They ar

Re: [PATCH 0/4] Pull polkit forward to mozjs24

2016-08-18 Thread Jeremy Linton
On 08/17/2016 03:57 PM, Colin Walters wrote: On Thu, Aug 4, 2016, at 12:57 PM, Jeremy Linton wrote: Polkit is out of date with respect to supported versions of mozjs. These patches start moving polkit forward again. Right now they are just to mozjs24 which is one of the first C++ only JSAPI

Re: [PATCH 0/4] Pull polkit forward to mozjs24

2016-08-15 Thread Jeremy Linton
Ping? On 08/04/2016 11:57 AM, Jeremy Linton wrote: Polkit is out of date with respect to supported versions of mozjs. These patches start moving polkit forward again. Right now they are just to mozjs24 which is one of the first C++ only JSAPI versions of spidermonkey and is a good starting

[PATCH 2/4] Cleanup configure and add support for mozjs24

2016-08-04 Thread Jeremy Linton
We want to support more than two mozjs versions, so cleanup the mozjs configure selection and add an additional stanza. Signed-off-by: Jeremy Linton --- configure.ac | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index

[PATCH 3/4] Add support for mozjs24 to polkitbackendjsauthority.cpp

2016-08-04 Thread Jeremy Linton
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 --- src/polkitbackend/polkitbackendjsauthority.cpp | 71 ++ 1 file changed, 51 insertions(+), 20

[PATCH 4/4] Fix warnings caused by building with C++

2016-08-04 Thread Jeremy Linton
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, scope initializations of C++ objects that are jumped around with goto's so the compiler can determine when to destroy the objects. Signed-off-by: J

[PATCH 0/4] Pull polkit forward to mozjs24

2016-08-04 Thread Jeremy Linton
involves further effort. Jeremy Linton (4): change mozjs interface module to c++ Cleanup configure and add support for mozjs24 Add support for mozjs24 to polkitbackendjsauthority.cpp Fix warnings caused by building with C++ configure.ac | 25 ++- src

[PATCH 1/4] change mozjs interface module to c++

2016-08-04 Thread Jeremy Linton
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 --- configure.ac | 3 +++ src/polkitbackend