diff options
author | David Zeuthen <davidz@redhat.com> | 2010-08-12 16:51:51 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-08-12 16:51:51 -0400 |
commit | 42177383585e1e01cd6150f891176afcd4538a82 (patch) | |
tree | 924bcbd61405b7c0c504718f02791aefa7bcfaf6 /docs | |
parent | 17f0600529dc926ae4a0c85dc56c393cc09e4011 (diff) | |
download | polkit-42177383585e1e01cd6150f891176afcd4538a82.tar.gz |
Add textual authentication agent and use it in pkexec(1)
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>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/polkit/polkit-1-docs.xml | 1 | ||||
-rw-r--r-- | docs/polkit/polkit-1-sections.txt | 19 | ||||
-rw-r--r-- | docs/polkit/polkit-1.types | 1 |
3 files changed, 20 insertions, 1 deletions
diff --git a/docs/polkit/polkit-1-docs.xml b/docs/polkit/polkit-1-docs.xml index 19c228a..06510ca 100644 --- a/docs/polkit/polkit-1-docs.xml +++ b/docs/polkit/polkit-1-docs.xml @@ -100,6 +100,7 @@ <part id="ref-authentication-agent-api"> <title>Authentication Agent API Reference</title> <xi:include href="xml/polkitagentlistener.xml"/> + <xi:include href="xml/polkitagenttextlistener.xml"/> <xi:include href="xml/polkitagentsession.xml"/> </part> diff --git a/docs/polkit/polkit-1-sections.txt b/docs/polkit/polkit-1-sections.txt index ef72acb..85b5d59 100644 --- a/docs/polkit/polkit-1-sections.txt +++ b/docs/polkit/polkit-1-sections.txt @@ -369,7 +369,9 @@ PolkitAgentListener PolkitAgentListenerClass polkit_agent_listener_initiate_authentication polkit_agent_listener_initiate_authentication_finish -polkit_agent_register_listener +PolkitAgentRegisterFlags +polkit_agent_listener_register +polkit_agent_listener_unregister <SUBSECTION Standard> POLKIT_AGENT_LISTENER POLKIT_AGENT_IS_LISTENER @@ -381,6 +383,21 @@ POLKIT_AGENT_LISTENER_GET_CLASS </SECTION> <SECTION> +<FILE>polkitagenttextlistener</FILE> +<TITLE>PolkitAgentTextListener</TITLE> +PolkitAgentTextListener +polkit_agent_text_listener_new +<SUBSECTION Standard> +POLKIT_AGENT_TEXT_LISTENER +POLKIT_AGENT_IS_TEXT_LISTENER +POLKIT_AGENT_TYPE_TEXT_LISTENER +polkit_agent_text_listener_get_type +POLKIT_AGENT_TEXT_LISTENER_CLASS +POLKIT_AGENT_IS_TEXT_LISTENER_CLASS +POLKIT_AGENT_TEXT_LISTENER_GET_CLASS +</SECTION> + +<SECTION> <FILE>polkittemporaryauthorization</FILE> <TITLE>PolkitTemporaryAuthorization</TITLE> PolkitTemporaryAuthorization diff --git a/docs/polkit/polkit-1.types b/docs/polkit/polkit-1.types index 2cab12a..e50812b 100644 --- a/docs/polkit/polkit-1.types +++ b/docs/polkit/polkit-1.types @@ -26,3 +26,4 @@ polkit_backend_local_authorization_store_get_type polkit_agent_session_get_type polkit_agent_listener_get_type +polkit_agent_text_listener_get_type |