summaryrefslogtreecommitdiff
path: root/src/polkit
AgeCommit message (Collapse)AuthorFilesLines
2013-04-18Add a FIXME to polkitprivate.hMiloslav Trmač1-0/+10
See discussion in https://bugs.freedesktop.org/show_bug.cgi?id=63573 .
2013-04-15Add annotations for element types of returned listsMiloslav Trmač1-15/+15
... to silence warnings when g-ir-scanner warnings are enabled. https://bugs.freedesktop.org/show_bug.cgi?id=63573
2013-04-15Fix an obvious docstring typo.Miloslav Trmač1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=63573
2013-04-15Fold enum documentation into relevant classesMiloslav Trmač1-8/+0
Fold PolkitImplicitAuthorization and PolkitCheckAuthorizationFlags into the relevant classes in the section list; polkit-1-docs.xml is already not including the enum documents. https://bugs.freedesktop.org/show_bug.cgi?id=63573
2013-04-15Document deprecated functions.Miloslav Trmač1-0/+7
All of these are a part of public API with some external users. Do the minimum to avoid a warning; ideally we should also add a *_DISABLE_DEPRECATED macro etc. https://bugs.freedesktop.org/show_bug.cgi?id=63573
2013-04-15Move polkit_temporary_authorization_new to private header file.Miloslav Trmač2-5/+5
The related new_for_gvariant() is private already, this seems also intended to be private. searchco.de doesn't show any external users. https://bugs.freedesktop.org/show_bug.cgi?id=63573
2012-11-13build: Fix .gir generation for parallel makeRyan Lortie1-0/+2
As per the intructions in the introspection Makefile, we should have a line declaring a dependency between the .gir and .la files. https://bugs.freedesktop.org/show_bug.cgi?id=57077 Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-05-23Rename --enable-systemd to --enable-libsystemd-loginDavid Zeuthen1-3/+3
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-23Make polkit_details_insert() remove the key if passed value is NULLDavid Zeuthen1-1/+6
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-12Make it possible to influence agent registration with an a{sv} parameterDavid Zeuthen2-0/+186
Additionally, add a "fallback" option. Also add support in this in the pkttyagent(1) program. This slightly breaks libpolkit-backend API by adding a GVariant* param to one of the class vfuncs... but that API is already declared unstable so that's fine. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-02-06PolkitUnixSession: Actually return TRUE if a session existsDavid Zeuthen1-7/+5
Also, don't treat the integer returned by sd_session_get_uid() as a boolean because that's just confusing. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-02-06PolkitUnixSession: Set error if we cannot find a session for the given pidDavid Zeuthen1-5/+16
Also, don't treat the integer returned by sd_pid_get_session() as a boolean because that's just confusing. Also, don't confuse memory supposed to be freed by g_free() and free(3) with each other. See https://bugzilla.redhat.com/show_bug.cgi?id=787222 for more details. Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-01-10Various builddir != srcdir fixesRyan Lortie1-21/+14
Fix autogen.sh to work when run from the builddir. Also: switch over to using the gobject-introspection Makefile (which is out-of-tree safe) instead of hardcoding our own version. https://bugs.freedesktop.org/show_bug.cgi?id=44599 Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-01-03Add optional systemd supportMatthias Clasen2-1/+491
When configured with --enable-systemd, this patch makes polkit use systemd for session tracking instead of ConsoleKit. Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-22Bug 43610 - Add netgroup supportNikki VonHollen8-6/+373
https://bugs.freedesktop.org/show_bug.cgi?id=43610 Added netgroup support and additional unit tests with MockLibc support. Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-08-01Specify exported pkg-config files in GIRsEvan Nemerson1-0/+1
https://bugs.freedesktop.org/show_bug.cgi?id=39315 Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-01Make PolkitUnixProcess also record the uid of the processDavid Zeuthen3-116/+273
This is needed to avoid possible TOCTTOU issues since a process can change both its real uid and effective uid. Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-31PolkitUnixProcess: Clarify that the real uid is returned, not the effective oneDavid Zeuthen1-16/+50
On Linux, also switch to parsing /proc/<pid>/status instead of relying on the st_uid returned by stat(2) to be the uid we want. This was pointed out by Neel Mehta <nmehta@google.com>. Thanks! Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-11introspection: Add --c-include to the gir filesBenjamin Otte1-0/+1
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-03Fix a couple of warnings triggered by gcc 4.6David Zeuthen1-3/+0
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-03Deprecated PolkitBackendActionLookupDavid Zeuthen1-13/+9
Instead, pass the untranslated message as polkit.message and set the gettext domain on polkit.gettext_domain. For printf()-style messages, occurences of the form $(name_of_key) in the translated version of polkit.message are expanded with the value of the property name_of_key. See the pkexec(1) mechanism for an example of how to use this. Additionally, the property polkit.icon_name can be set to the icon. Note that not all authentication agents use this - in particular, gnome-shell does not. It is no longer possible to set the details to be shown in the authentication dialog. It was never a good idea to hide information there anyway. Instead, the mechanism should format a meaningful message. Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-23Allow overriding message shown in authentication dialogDavid Zeuthen1-0/+14
This is much easier than writing a PolkitBackendActionLookup class and installing an extension. On the downside it requires the caller to be uid 0. Example: http://people.freedesktop.org/~david/polkit-pass-messages.png Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-23Bug 29712 – Use monotonic for temporary authorizationsDavid Zeuthen1-0/+6
https://bugs.freedesktop.org/show_bug.cgi?id=29712 Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-23Bug 27253 – Use GOBJECT_INTROSPECTION_CHECK from gobject-introspectionAdrian Bunk1-8/+8
https://bugs.freedesktop.org/show_bug.cgi?id=27253 Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-23Fix a memory leakDavid Zeuthen1-0/+2
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-22Bug 30653 – No way to detect cancellation in pkexecDavid Zeuthen3-5/+54
https://bugs.freedesktop.org/show_bug.cgi?id=30653 Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-17Add missing GObject Introspection annotationsDavid Zeuthen12-60/+53
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-10Remove duplicate definitions of enumeration typesColin Walters3-12/+0
These are defined in polkitenumtypes.h, don't re-define them. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-20Various doc cleanupsDavid Zeuthen6-56/+121
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-12Fix scanning of unix-process subjectsDavid Zeuthen1-10/+12
In particular accept both "unix-process:<pid>,<starttime>" and "unix-process:<pid>". For the latter, return an error if we cannot lookup the starttime (for example if the given pid references a non-existing process). Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-09Update GI annotationsDavid Zeuthen15-99/+96
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-09Add g_return_if_fail() to all public API entry pointsDavid Zeuthen11-0/+79
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-09PolkitAuthority: Add g_return_if_fail() checksDavid Zeuthen1-6/+136
Also fix a locking bug. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-09PolkitAuthority: Implement failable initializationDavid Zeuthen3-42/+289
... and deprecate polkit_authority_get(). Also fix up locking in PolkitAuthority. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-07Add a GPermission implementationDavid Zeuthen5-0/+906
Based on code from Matthias Clasen <mclasen@redhat.com>. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-03Remove Lock Down functionalityDavid Zeuthen4-257/+0
This is better implemented as a separate set of extension to the local authority. The only current known user, PolkitLockButton, will be ported away from using these interfaces. Since polkit still hasn't reached 1.0 this removal of functionality is OK especially since the NEWS file has already wanred something like this may happen. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-08-02Implement polkit_temporary_authorization_new_for_gvariant()David Zeuthen3-5/+36
This is hit by the authentication agent in order to display a padlock when temporary authorizations exist. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-30Make polkitd accept --replace and gracefully handle SIGINTDavid Zeuthen1-1/+1
E.g. actually clean up everything before exiting. This makes it much easier to chase memory leaks. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-30Nuke eggdbus usageDavid Zeuthen10-806/+294
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-29Port PolkitAgent to gdbusDavid Zeuthen2-27/+157
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-29Port PolkitBackendInteractiveAuthority to gdbusDavid Zeuthen2-3/+29
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-28Port CK class to gdbusDavid Zeuthen1-0/+8
Also simplify the code it by using the on-disk database. Makes everything a lot simpler. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-28Port core bits to gdbusDavid Zeuthen9-727/+1009
Signed-off-by: David Zeuthen <davidz@redhat.com>
2009-11-13Properly validate all arguments passed via D-BusDavid Zeuthen2-6/+11
2009-11-11Port lockdown from pklalockdown(1) to D-Bus methodsDavid Zeuthen3-10/+11
Also rename the action from org.freedesktop.policykit.localauthority.lockdown to org.freedesktop.policykit.lockdown since any authority implementation can now implement this. This changes only ABI/API used by e.g. polkit-gnome. This is fine since we're not at 1.0 yet.
2009-11-11Add methods AddLockdownForAction() and RemoveLockdownForAction()David Zeuthen2-0/+268
Now to implement this in the interactive authority...
2009-10-16Bug 24566 – Properly _ref authority in singleton constructorAlexander Sack1-1/+3
http://bugs.freedesktop.org/show_bug.cgi?id=24566 Signed-off-by: David Zeuthen <davidz@redhat.com>
2009-09-29Clarify when AllowUserInteraction should and shouldn't be usedDavid Zeuthen1-0/+10
See https://bugzilla.redhat.com/show_bug.cgi?id=526053 for more details.
2009-09-16Add properties with information about the currently used authorityDavid Zeuthen7-5/+230
Also bump requirement on EggDBus to 0.6 (to be released later) for a bug-fix with flag properties.
2009-09-14Fix process start time when using polkit_unix_process_new_full()Bastien Nocera1-2/+5
When using polkit_unix_process_new_full() the start-time wasn't being set from the process' PID if it wasn't passed to the function. Signed-off-by: David Zeuthen <davidz@redhat.com>