summaryrefslogtreecommitdiff
path: root/src/polkitagent
Commit message (Collapse)AuthorAgeFilesLines
* Document deprecated functions.Miloslav Trmač2013-04-151-0/+9
| | | | | | | | 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
* polkitagent, pkexec: Respect SUID_CFLAGS and SUID_LDFLAGSVincent Untz2013-04-111-0/+6
| | | | | | This is a good way for distributors to use -fPIE/-pie. https://bugs.freedesktop.org/attachment.cgi?id=57584
* build: Remove generated introspection files on "make clean"Michael Biebl2013-01-091-0/+1
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=58869 Signed-off-by: David Zeuthen <zeuthen@gmail.com>
* build: Fix .gir generation for parallel makeRyan Lortie2012-11-131-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>
* PolkitAgent: Avoid crashing if initializing the server object failsAdam Jackson2012-10-091-2/+1
| | | | | | | | | | | Note that otherwise we return a freed server object. Since later in polkit_agent_listener_register_with_options we check against NULL to determine failure, this makes for sad times later when we call server_free() on it again. https://bugs.freedesktop.org/show_bug.cgi?id=55776 Signed-off-by: David Zeuthen <zeuthen@gmail.com>
* agenthelper-pam: Fix newline-trimming codeColin Walters2012-06-061-3/+8
| | | | | | | | First, we were using == instead of =, as the author probably intended. But after changing that, we're now assigning to const memory. Fix that by writing to a temporary string buffer. Signed-off-by: David Zeuthen <zeuthen@gmail.com>
* Store private binaries in /usr/lib/polkit-1 instead of /usr/libexecDavid Zeuthen2012-05-232-5/+7
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Make it possible to influence agent registration with an a{sv} parameterDavid Zeuthen2012-04-122-30/+76
| | | | | | | | | | | 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>
* PolkitAgentSession: Don't leak file descriptorsDavid Zeuthen2012-03-081-0/+14
| | | | | | | | This was reported here https://bugzilla.gnome.org/show_bug.cgi?id=671486 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Various builddir != srcdir fixesRyan Lortie2012-01-101-25/+17
| | | | | | | | | | | 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>
* Fix multi-line pam prompt handlingMarc Deslauriers2011-08-012-18/+24
| | | | | | | | | Some pam modules may attempt to display multi-line prompts to the user. In these cases, PolicyKit was failing. This patch fixes the issue by escaping the prompt before passing it and unescaping it again. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Specify exported pkg-config files in GIRsEvan Nemerson2011-08-011-0/+1
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=39315 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Don't show diagnostic messages intended for the administrator to the end userDavid Zeuthen2011-03-141-4/+0
| | | | | | See https://bugzilla.gnome.org/show_bug.cgi?id=644737#c6 for discussion. Signed-off-by: David Zeuthen <davidz@redhat.com>
* introspection: Add --c-include to the gir filesBenjamin Otte2011-03-111-0/+1
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Fix a couple of warnings triggered by gcc 4.6David Zeuthen2011-03-031-3/+0
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Bug 27253 – Use GOBJECT_INTROSPECTION_CHECK from gobject-introspectionAdrian Bunk2011-02-231-8/+8
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=27253 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Bug 29871 – Fix build failures with binutils-goldMichael Biebl2011-02-231-0/+1
| | | | | | Link polkit_agent_helper_1 against GLIB_LIBS. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Always pass non-zero value to g_once_init_leave()David Zeuthen2011-02-211-6/+7
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Fix up debug and timeouts in agent helperDavid Zeuthen2011-02-213-26/+34
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add some debug info that can be shown with the env var POLKIT_DEBUGDavid Zeuthen2011-02-211-13/+49
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Improve error reporting for authentication sessionsDavid Zeuthen2011-02-212-4/+54
| | | | | | | | | | | In particular ensure that we show Incorrect permissions on /opt/gnome-shell/install/libexec/polkit-agent-helper-1 as a PAM error message if the permissions on the helper are incorrect (e.g. if the helper is not setuid root). Signed-off-by: David Zeuthen <davidz@redhat.com>
* Fix-up PolkitAgentSession to use GObject propertiesDavid Zeuthen2011-02-181-4/+95
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Build gir/typelib for PolkitAgent-1.0David Zeuthen2011-02-172-2/+36
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Fix (correct) GCC warning about possibly-uninitialized variableColin Walters2010-09-101-2/+2
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Bug 29816 – Install polkitagentenumtypes.hVincent Untz2010-08-261-0/+1
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=29816 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Fix dist-checkDavid Zeuthen2010-08-201-1/+1
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Various doc cleanupsDavid Zeuthen2010-08-202-17/+32
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add textual authentication agent and use it in pkexec(1)David Zeuthen2010-08-1212-80/+966
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes pkexec(1) work when e.g. logging in via ssh(1) or the linux console but also when using `su -'. Example: [davidz@x61 ~]$ su - bateman Password: [bateman@x61 ~]$ pkexec bash ==== AUTHENTICATING FOR org.freedesktop.policykit.exec === Authentication is needed to run `/bin/bash' as the super user Authenticating as: root Password: ==== AUTHENTICATION COMPLETE === [root@x61 ~]# Summary of changes - Added a PolkitAgentTextListener class - Add new polkit_agent_listener_register() (and _unregister()) API - Deprecate polkit_agent_register_listener API - Allow registering authentication agents for PolkitUnixProcess subjects and prefer such agents to ones governing the session - Make PolkitAgentSession use the thread-default GMainContext - otherwise it won't work in spawned threads - (finally) use PolkitAgentTextListener in pkexec(1) if authorization via authentication is possible but no authentication agent was found Signed-off-by: David Zeuthen <davidz@redhat.com>
* Use polkit_authority_get_sync() instead of deprecated polkit_authority_get()David Zeuthen2010-08-092-4/+9
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add g_return_if_fail() to all public API entry pointsDavid Zeuthen2010-08-092-0/+22
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Nuke eggdbus usageDavid Zeuthen2010-07-301-4/+0
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Port PolkitAgent to gdbusDavid Zeuthen2010-07-291-165/+250
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add shadow supportAndrew Psaltis2010-07-025-82/+363
| | | | | | | | | | | | | | Added support for the shadow authentication framework instead of PAM. Enable it by passing --with-authfw=shadow to configure. This is done by splitting the polkitagenthelper source into separate parts, one that does auth with PAM, and another that does auth with shadow, sharing functions where appropriate. Also, all PAM-dependendent code in all other files has been #ifdef'd. The only affected file is src/programs/pkexec.c Signed-off-by: David Zeuthen <davidz@redhat.com>
* Bug 24235 – polkit-agent-helper may call pam_end with a stale pam handleAndreas Sandberg2009-10-211-0/+1
| | | | | | | | | polkit-agent-helper calls pam_end on pam_h without setting pam_h to NULL. This causes the error handler to call pam_end on the stale handler if the send_dbus_message procedure fails, which in turn generates a SIGSEGV. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Make private symbols accessible to libpolkitagent and libpolkitbackendMichael Biebl2009-09-131-0/+1
| | | | | | | | | libpolkit{agent,backend} use private symbols from libpolkit-gobject. As we no longer export them, the build fails. Move those symbols into a separate noinst lib libpolkit-private, which those three libs can link against. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Use _polkit_agent_marshal prefixMichael Biebl2009-09-132-3/+3
| | | | | | | Use _polkit_agent_marshal prefix with glib-genmarshal to hide the (autogenerated) symbols. Update the code accordingly. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Trim the list of exported symbolsMichael Biebl2009-09-131-0/+2
| | | | | | Add -export-symbols-regex '(^polkit_.*) to LDFLAGS for libpolkit* Signed-off-by: David Zeuthen <davidz@redhat.com>
* Use correct program name when complaining about not being setuid rootDavid Zeuthen2009-08-191-1/+1
|
* Bug 23093 – FreeBSD portability fixesJoe Marcus Clarke2009-08-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | There are a few issues with building polkit-0.93 on FreeBSD: * No clearenv() function on FreeBSD * While FreeBSD has a /proc, it is deprecated, and kinfo_proc should be used instead. * FreeBSD's printf() functions do not support the %m notation. This is only supported for syslog(). * You can't call GINT_TO_POINTER() on a 64-bit value, as this will break on 64-bit OSes. The attached patch fixes these problems. First, a check for clearenv() is added to configure. Second, I moved the check for process uid to polkit/polkitunixprocess.c. This may not be ideal, but it seems to fit, and reduces code duplication. Third, I replaces all %m with %s ... g_strerror (errno). Finally, I replaced GINT_TO_POINTER() with GSIZE_TO_POINTER. Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add support for querying and revoking temporary authorizationsDavid Zeuthen2009-07-202-13/+15
| | | | | | | Also change how authentication agents are registered (take a Subject instead of the session-id) and add convenience functions to asynchronously construct a PolkitUnixSession object given a process id (by querying ConsoleKit).
* Fix make distcheckDavid Zeuthen2009-06-081-0/+2
|
* Use an object, not a GHashTable when passing details aroundDavid Zeuthen2009-05-192-5/+9
| | | | | | This is because bindable GObject APIs should never return or accept a GHashTable, see http://bugzilla.gnome.org/show_bug.cgi?id=581686#c6 for details.
* Only allow privileged apps to check authz and add ActionLookup interfaceDavid Zeuthen2009-05-132-0/+22
| | | | | Also remove the ObtainAuthorization() call and allow apps to pass details to CheckAuthorization.
* prune TODO list and fix up single-header-file / API guard checksDavid Zeuthen2009-02-095-10/+21
|
* make authentication agents pass a session_id parameterDavid Zeuthen2009-02-081-1/+2
| | | | | | The session_id has got to be empty for now. The thinking is that in the future we might want to register an authentication agent that runs in secure desktop, e.g. a separate session from the user session.
* generate all polkit dbus code in one placeDavid Zeuthen2009-02-082-32/+16
|
* use new eggdbus feature to include enums/structs docs in the interface docsDavid Zeuthen2009-02-041-1/+2
|
* depend on EggDBus HEAD for stamp file and Docbook docs for D-Bus interfacesDavid Zeuthen2009-02-021-18/+20
| | | | make -j4 should work now
* require POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE to be definedDavid Zeuthen2009-02-017-3/+22
| | | | | Also use @stability in the docs to indicate that the interface is currently subject to change.
* fix up polkitagent docsDavid Zeuthen2009-01-313-18/+13
|