diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-10-30 15:45:43 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-11-07 11:21:35 +0100 |
commit | 0d9c9208026a8c5c14b657bceb477931fd35375d (patch) | |
tree | 084650b6126059806a8a4c76bc2b8ee94cbf2f17 /clients/cli/connections.c | |
parent | 9e6e6344cb114c5d79eae52594547112d6f800e9 (diff) | |
download | NetworkManager-jk/nmcli-agent-command.tar.gz |
cli: add 'nmcli agent' commandjk/nmcli-agent-command
Synopsis:
nmcli agent { secret | polkit | all }
The command runs separate NetworkManager secret agent or session polkit agent, or both.
It is useful when
- no other secret agent is available (such as GUI nm-applet, gnome-shell, KDE applet)
- no other polkit agent is available (such as polkit-gnome-authentication-agent-1,
polkit-kde-authentication-agent-1 or lxpolkit)
Diffstat (limited to 'clients/cli/connections.c')
-rw-r--r-- | clients/cli/connections.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 717945b33d..554e2107e6 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -36,6 +36,7 @@ #include "settings.h" #include "connections.h" #include "nm-secret-agent-simple.h" +#include "polkit-agent.h" /* define some prompts for connection editor */ #define EDITOR_PROMPT_SETTING _("Setting name? ") @@ -8796,6 +8797,9 @@ do_connections (NmCli *nmc, int argc, char **argv) { GError *error = NULL; + /* Register polkit agent */ + nmc_start_polkit_agent_start_try (nmc); + /* Set completion function for 'nmcli con' */ rl_attempted_completion_function = (rl_completion_func_t *) nmcli_con_tab_completion; |