<div dir="ltr">Hello,<br><div><div class="gmail_extra"><div class="gmail_quote">2017-04-04 21:10 GMT+02:00 Jeremy Linton <span dir="ltr"><<a href="mailto:jeremy.linton@arm.com" target="_blank">jeremy.linton@arm.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Update polkit to use a more recent version of the mozjs library.<br></blockquote><div>… <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> 
v1->v2: Switch back to using initjs.j rather than init.js<br></blockquote><div><br></div><div>Another not-really-a-review:<br></div><div>    Mirek<br></div><div><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
@@ -1209,10 +1207,13 @@ polkit_backend_js_authority_ch<wbr>eck_authorization_sync (PolkitBackendInteractiveAu<br>
       goto out;<br>
     }<br>
<br>
+  argv[0].setObject(argv0.toObje<wbr>ct());<br>
+  argv[1].setObject(argv1.toObje<wbr>ct());<br>
+<br>
   if (!call_js_function_with_runawa<wbr>y_killer (authority,<br>
                                              "_runRules",<br>
-                                             G_N_ELEMENTS (argv),<br>
-                                             argv,<br>
+                                             //                 G_N_ELEMENTS (argv),<br>
+                                             &argv,<br>
                                              &rval))<br>
     {<br>
       polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),<br>
@@ -1220,22 +1221,17 @@ polkit_backend_js_authority_ch<wbr>eck_authorization_sync (PolkitBackendInteractiveAu<br>
       goto out;<br>
     }<br>
<br>
-  if (JSVAL_IS_NULL (rval))<br>
-    {<br>
-      /* this fine, means there was no match, use implicit authorizations */<br>
-      good = TRUE;<br>
-      goto out;<br>
-    }<br>
-<br>
-  if (!JSVAL_IS_STRING (rval))<br>
+  if (!rval.isString())<br></blockquote><div><br><br></div></div>Removing this null check means that when polkit._runRules returns null, “ret” is set to POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED instead of “implicit”.  To reproduce, on an unmodified Fedora box, interactively logged in, compare the result of<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">pkcheck -p $$ -a <a href="http://org.fedoraproject.FirewallD1.info">org.fedoraproject.FirewallD1.info</a><br></blockquote><br>(and perhaps observe the “WARNING **: Expected a string” messages on stdout when polkitd is running interactively.)<br></div><div class="gmail_extra">    Mirek<br></div><div class="gmail_extra"><br></div></div></div>