summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-06-04State that authorization rules must not rely on SpiderMonkey featureswip/js-rule-filesDavid Zeuthen1-5/+13
... e.g. we reserve the right to switch out the JS engine. Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-06-04Small updates to the "Writing polkit applications" chapterDavid Zeuthen1-74/+161
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-06-04Update pkexec(1) man page with exampleDavid Zeuthen1-0/+1
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-06-04Update links to udisks docsDavid Zeuthen1-4/+2
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-05-25Rewrite the "Writing polkit applications" chapterDavid Zeuthen1-38/+142
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-25Log when the name org.fd.PolicyKit1 has been acquiredDavid Zeuthen1-6/+6
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-25Run polkitd as an unprivileged userDavid Zeuthen7-14/+136
There's really no reason to run all this code as uid 0. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-25Remove unused DBUS_GLIB_* and GIO_* variablesDavid Zeuthen2-5/+0
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-25Ensure polkitd is rebuilt if libpolkit-backend-1.la changesDavid Zeuthen1-1/+1
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-25Move polkitd into src/polkitbackendDavid Zeuthen5-43/+27
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-25Use g_unix_signal_add() from GLib 2.30David Zeuthen5-199/+4
... instead of the one I wrote myself. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-24Clarify pkexec(1) variablesDavid Zeuthen5-38/+42
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-24Combine action and details parametersDavid Zeuthen9-352/+382
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>
2012-05-24Use a condition variable to signal that runaway killer thread is readyDavid Zeuthen1-5/+16
... instead of the unsafe g_thread_yield() busy-wait loop. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-24Terminate runaway scriptsDavid Zeuthen4-25/+205
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Use "rules", not "scripts" to refer to files in rules.dDavid Zeuthen1-3/+3
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Pass expanded identity list to the AuthenticationSessionDavid Zeuthen1-24/+24
... otherwise it things like admin-identities being set to ["unix-group:session"] won't work. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Add default rulesDavid Zeuthen3-10/+16
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Store private binaries in /usr/lib/polkit-1 instead of /usr/libexecDavid Zeuthen7-19/+16
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Mention systemd(1) in the polkitd(8) man pageDavid Zeuthen1-3/+11
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Nuke polkitbackend library, localauthority backend and extension systemDavid Zeuthen27-2751/+16
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>
2012-05-23Add a systemd .service fileDavid Zeuthen5-3/+42
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Fix distcheckDavid Zeuthen1-1/+2
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Rename --enable-systemd to --enable-libsystemd-loginDavid Zeuthen3-23/+23
It's useful to be more specific because we also want an option to install a systemd .service file which you may not want even if you are using libsystemd-login... Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Add real-world example featuring udisks2 and the drive.* variables it passesDavid Zeuthen1-1/+25
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Make polkit_details_insert() remove the key if passed value is NULLDavid Zeuthen1-1/+6
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Use <variablelist> instead of <informaltable> for Subject attributesDavid Zeuthen1-48/+64
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Mention details["polkit.message"] and add an example using detailsDavid Zeuthen1-5/+48
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-23Fix a couple typos in the docsDavid Zeuthen3-5/+5
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-22Fix spelingDavid Zeuthen1-1/+1
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-22polkitd: add reference to polkit(8) from its man pageDavid Zeuthen1-1/+4
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-22Clarify docs a bitDavid Zeuthen1-8/+6
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-22docs: update SEE ALSO to make each man page point to all other man pagesDavid Zeuthen5-8/+16
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-22docs: enclose local <citerefentry> in <link> to make links workDavid Zeuthen6-78/+29
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-22Update docsDavid Zeuthen17-872/+569
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-22Create rules.d directoriesDavid Zeuthen2-0/+11
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21Add test-cases and 10 second timeout for polkit.spawn()David Zeuthen3-11/+538
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21Mention unix-netgroup:xyz as a valid return value in addAdminRule() functionsDavid Zeuthen1-1/+2
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21Minor doc fixesDavid Zeuthen1-7/+4
Nuke the has_prefix() helper, it's just confusing. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21Add netgroup supportDavid Zeuthen6-2/+103
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21Test that subject.isInGroup() worksDavid Zeuthen2-1/+37
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21Add test cases for evaluation orderDavid Zeuthen7-11/+201
In fact, this test uncovered that we were evaluating the rules in the wrong order. Fix this. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21docs: emphasize that registered functions may actually never be calledDavid Zeuthen1-2/+11
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21Use addRule() and addAdminRule()David Zeuthen3-27/+28
... as the man page already says. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21Also load rules from /usr/share/polkit/rules.dDavid Zeuthen4-68/+139
... in addition to /etc/polkit/rules.d. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-21docs: clarify how rules files workDavid Zeuthen1-20/+51
After feedback from Matthias Clasen <mclasen@redhat.com>. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-20Also add an example of polkit.spawn() to polkit(8) man pageDavid Zeuthen1-0/+20
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-20docs: add AUTHORIZATION RULES section to the polkit(8) man pageDavid Zeuthen1-0/+238
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-18Don't include command-line in spawning error messagesDavid Zeuthen1-8/+3
We don't even know it and it's not worth reconstructing it. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-05-18Make polkit.spawn() take an array of arguments instead of a command-lineDavid Zeuthen2-17/+40
Much safer and easier this way. Signed-off-by: David Zeuthen <davidz@redhat.com>