summaryrefslogtreecommitdiff
path: root/src/polkitbackend/polkitbackendjsauthority.c
Commit message (Collapse)AuthorAgeFilesLines
* Make it work when using ConsoleKit instead of libsystemd-loginDavid Zeuthen2012-06-061-9/+29
| | | | | | | | ... 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-241-82/+24
| | | | | | | | | | 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>
* Use a condition variable to signal that runaway killer thread is readyDavid Zeuthen2012-05-241-5/+16
| | | | | | ... instead of the unsafe g_thread_yield() busy-wait loop. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Terminate runaway scriptsDavid Zeuthen2012-05-241-25/+175
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Use "rules", not "scripts" to refer to files in rules.dDavid Zeuthen2012-05-231-3/+3
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Nuke polkitbackend library, localauthority backend and extension systemDavid Zeuthen2012-05-231-7/+1
| | | | | | | | | | | 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-211-11/+435
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add netgroup supportDavid Zeuthen2012-05-211-0/+41
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Use addRule() and addAdminRule()David Zeuthen2012-05-211-3/+3
| | | | | | ... 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-211-63/+123
| | | | | | ... in addition to /etc/polkit/rules.d. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Don't include command-line in spawning error messagesDavid Zeuthen2012-05-181-8/+3
| | | | | | We don't even know it and it's not worth reconstructing it. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Make polkit.spawn() take an array of arguments instead of a command-lineDavid Zeuthen2012-05-181-13/+40
| | | | | | Much safer and easier this way. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add polkit.spawn() to spawn external programsDavid Zeuthen2012-05-181-0/+120
| | | | | | | ... and also add polkit.quote() for quoting arguments when constructing the command-line. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Make it possible for JS code to change detailsDavid Zeuthen2012-05-181-6/+54
| | | | | | | | | | | | | | | | 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>
* Emit ::Changed signal after reloading rulesDavid Zeuthen2012-05-181-0/+2
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Collect garbageDavid Zeuthen2012-05-181-0/+11
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add a couple of more error checksDavid Zeuthen2012-05-181-10/+19
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Clean up code a bitDavid Zeuthen2012-05-181-108/+64
| | | | | | | 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-75/+206
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Include seat and session in Subject objectDavid Zeuthen2012-05-181-24/+61
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add experimental authority backend using JavaScript rule filesDavid Zeuthen2012-05-171-0/+831
Signed-off-by: David Zeuthen <davidz@redhat.com>