I'm using the following script to allow any wheel group user to manage libvirt: polkit.addRule( function( action, subject ) { polkit.log( "action=" + action ) ; polkit.log( "subject=" + subject ) ; if ( ( action.id == "org.libvirt.unix.manage" || action.id == "org.libvirt.unix.monitor" ) && subject.active && subject.isInGroup( "wheel" ) ) { polkit.log( "Returning polkit.Result.YES" ) ; return polkit.Result.YES; } } ) ; The script is located at /etc/polkit-1/rules.d/80-libvirt-manage.rules on Fedora 19. The installed polkit version is polkit-0.112-1.fc19.x86_64 Most of the time the script works well, but sometimes (apparently when many libvirt operations are going on) it fails with "Terminating runaway script". I've managed to recreate this by simply executing virsh operations in a tight loop, for example: while :; do virsh -c qemu:///system list; done It doesn't happen often, though.
The documentation for JS_SetOperationCallback says: "Set a callback function that is automatically called periodically while JavaScript code runs" So from what I understand it may be called by mozjs without being triggered by rkt_on_timeout() and terminate the script at any given time, because js_operation_callback() assumes that if it was called it was due to a timeout.
Fixed in polkit-0.113. Thanks for your report.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.