Jiří Klimeš
ea54b7f2c0
clients: add a helper function to get required openconnect VPN secrets
...
OpenConnect needs three secrets - COOKIE, HOST and FINGERPRINT. They can be
obtained by authenticating to the server. This can be performed by running
"openconnect --authenticate <host>" and the three values are printed to stdout.
Note that the function may (probably will) interactively ask user for
his credentials.
Alternatively, it would be possible to dlopen() libopenconnect and call its
functions. However, as that would be more complicated and would also require
implementing functionality that openconnect simply does for free for us, it is
not worth it, I think.
2015-12-12 17:37:30 +01:00
Jiří Klimeš
8dfafac17c
clients: add vpn_type member to secret structure in secret agent
...
It is useful to know what VPN type the secret belongs to.
2015-12-12 17:37:30 +01:00
Jiří Klimeš
6dd1e2673e
clients: move vpn_get_secret_names() to nm-vpn-helpers
...
It should eventually move into libnm and ideally the data be obtained from VPN
plugins.
(No functional change, only moving the function).
2015-12-12 17:37:30 +01:00
Jiří Klimeš
de86c23fbe
clients: enable VPN secrets for nmtui/nmcli secret agent (rh #975185 )
...
It allows nmcli and nmtui to ask for VPN passwords and thus successfully
activate VPN connections.
https://bugzilla.redhat.com/show_bug.cgi?id=975185
2015-12-12 17:37:30 +01:00
Beniamino Galvani
7da440b798
cli: add vxlan support
2015-12-09 16:36:46 +01:00
Beniamino Galvani
c3e6e25239
cli: add macvlan support
2015-12-09 14:30:08 +01:00
Jiří Klimeš
3e5fea9820
cli: TAB-complete yes/no for boolean properties in the editor
2015-12-09 09:31:36 +01:00
Jiří Klimeš
e29b844f42
cli: produce new line after readline when echoing was off
...
The new line was missing.
Adding termios_new.c_lflag |= (ECHONL | ICANON); did not help. Why?
Fixes: a14306c2ce
2015-12-07 17:33:03 +01:00
Jiří Klimeš
629de4e689
cli: add global --show-secrets option
...
- it controls echoing passwords input on terminal
- it replaces --show-secrets in 'nmcli connection show', which is deprecated now
- it replaces --show-password in 'nmcli device wifi hotspot', which is deprecated now
2015-12-07 14:14:58 +01:00
Jiří Klimeš
23aff47826
cli: use nmc_readline_echo() for asking password in 'nmcli con add'
2015-12-07 14:14:58 +01:00
Jiří Klimeš
1056408fd4
cli: use nmc_readline_echo() for asking password in 'nmcli dev wifi connect'
2015-12-07 14:14:58 +01:00
Jiří Klimeš
02388060c1
cli: use new nmc_readline_echo() in polkit agent
2015-12-07 14:14:58 +01:00
Jiří Klimeš
a14306c2ce
cli: do not echo passwords on terminal when asking for them
...
adds nmc_readline_echo() function that can disable displaying characters.
2015-12-07 14:14:58 +01:00
Lubomir Rintel
da528b5ccd
cli: drop an extra newline
2015-12-07 11:23:39 +01:00
Lubomir Rintel
b38a5f4cb4
cli: avoid using tmp template after it goes out of scope
...
Fixes: 3892b839af
2015-12-07 11:05:52 +01:00
Lubomir Rintel
4ffed27959
cli: improve the error reporting a bit
2015-12-07 10:51:49 +01:00
Jiří Klimeš
3892b839af
cli: add 'nmcli connection export' (rh #1034105 )
...
Synopsis:
nmcli connection export [ id | uuid | path] <ID> [<output file>]
for exporting VPN connections.
https://bugzilla.redhat.com/show_bug.cgi?id=1034105
2015-12-07 09:11:20 +01:00
Jiří Klimeš
9a0e4bae47
cli: add 'nmcli connection import' (rh #1034105 )
...
Synopsis:
nmcli connection import [--temporary] type <type> file <file to import>
Only VPN configurations can be imported at the moment.
https://bugzilla.redhat.com/show_bug.cgi?id=1034105
2015-12-07 09:11:06 +01:00
Jiří Klimeš
f28d311d13
clients: accept service without org.freedesktop.NetworkManager prefix
...
in nm_vpn_get_plugin_by_service()
2015-12-05 21:29:00 +01:00
Jiří Klimeš
96ab3a8a5c
clients: add GError parameter to nm_vpn_get_plugin_by_service()
2015-12-05 21:29:00 +01:00
Lubomir Rintel
d03f347b9d
cli: add nmcli monitor
...
https://bugzilla.redhat.com/show_bug.cgi?id=1034158
2015-12-05 12:16:23 +01:00
Lubomir Rintel
e92e06bdc7
cli,connections: add connection monitor
2015-12-05 12:16:06 +01:00
Lubomir Rintel
9b49284f0c
cli,devices: add device monitor
2015-12-05 12:16:04 +01:00
Lubomir Rintel
2a646a74dd
cli,devices: factor out parsing of the interface list
...
This is duplicated already and the monitor will use it.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
225f6594c4
cli,devices: factor out device_state_to_color()
...
We'll use this for device status monitor too.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
88ae8d2b13
cli: turn should_wait into a semaphore
...
Count the exit blockers. We'll want to terminate the device monitor in case all
monitored devices vanish.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
67caad44c3
cli: move the decision whether to use colors to nmc_colorize()
...
This allows us to use a conditionally colorized output outside
print_required_fields().
2015-12-05 12:05:17 +01:00
Jiří Klimeš
4c437863fa
cli: remove duplicated checks for running Networkmanager
...
It is already performed in do_connections().
2015-12-03 16:12:26 +01:00
Beniamino Galvani
b614a5ec61
cli: add support for IP tunnel settings
2015-12-01 17:39:41 +01:00
Jiří Klimeš
cb049d2500
cli: allow TAB-completion for tun.mode in nmcli editor
...
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
d374352b99
cli: allow TAB-completion of "Mode:" in 'nmcli -a con add type tun'
...
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
18b7a9a42f
cli: ask user before requiring optional parameters for 'nmcli -a con add type tun'
...
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
6ffe4b61f7
cli: fix an error in setting s390-options in nmcli editor
...
nmcli> set eth.s390-options portno=
(process:4711): libnm-CRITICAL **: nm_setting_wired_add_s390_option: assertion 'value_len > 0 && value_len < 200' failed
2015-11-28 19:48:02 +01:00
Jiří Klimeš
5f9b8b887d
cli: fix an error in nmcli editor when setting vpn.data/vpn.secrets
...
nmcli> set vpn.data haha=
(process:3951): libnm-CRITICAL **: nm_setting_vpn_add_data_item: assertion 'strlen (item) > 0' failed
nmcli> set vpn.secrets haha=
(process:3951): libnm-CRITICAL **: nm_setting_vpn_add_secret: assertion 'strlen (secret) > 0' failed
2015-11-28 19:48:02 +01:00
Jiří Klimeš
1b0be2bab0
cli: fix a crash in 'nmcli -a con clone'
...
when providing empty arguments.
Fixes: 0c65b28960
2015-11-28 19:48:02 +01:00
Jiří Klimeš
191f213c49
clients: (trivial) remove unused commented code in nm-vpn-helpers
2015-11-26 11:09:15 +01:00
Jiří Klimeš
b8d6bd1a98
clients: move clients/tui/vpn-helpers.c to clients/common/nm-vpn-helpers.c
...
The file has not been used up to now. But it is going to be used by both
nmtui and nmcli later.
2015-11-26 11:08:44 +01:00
Jiří Klimeš
4a06701e88
cli: add 'strongswan' and 'fortisslvpn' to known VPN types
2015-11-25 17:14:02 +01:00
Jiří Klimeš
579fd36566
cli: improve error messages for 'nmcli device set'
...
Fixes: 4dffbf8f6a
2015-11-25 16:39:00 +01:00
Jiří Klimeš
542200f539
clients: check errors of polkit_unix_session_new_for_process_sync()
...
polkit_unix_session_new_for_process_sync() can fail. And calling
polkit_agent_listener_register() with NULL PolkitSubject results in errors.
https://bugzilla.gnome.org/show_bug.cgi?id=758625
2015-11-25 12:08:07 +01:00
Beniamino Galvani
c223e811f1
nmcli/bash-completion: add completion for 'tun' connection mode
2015-11-25 11:53:04 +01:00
Beniamino Galvani
64c6b124d2
cli: add support for tun settings
...
Add nmcli support for adding and modifying TUN/TAP connections.
2015-11-25 11:39:57 +01:00
Jiří Klimeš
847f3b646b
cli: make a prompt a translatable string in do_connection_clone()
...
Fixes: 0c65b28960
2015-11-24 15:22:06 +01:00
Beniamino Galvani
cba0f4e3c4
cli: add ipv4.dhcp-fqdn property
2015-11-23 22:09:06 +01:00
Joel Holdsworth
8051038b4d
build/nmcli: make nmcli build optional
...
https://mail.gnome.org/archives/networkmanager-list/2015-November/msg00043.html
https://mail.gnome.org/archives/networkmanager-list/2015-November/msg00063.html
2015-11-19 13:51:59 +01:00
Dan Williams
06442276c9
cli: add support for GSM setting device-id, sim-id, and sim-operator-id properties
2015-11-18 15:50:52 +01:00
Dan Williams
3ac82f2c75
nmcli: add support for WiFi MAC address randomization property
2015-11-18 15:37:42 +01:00
Jiří Klimeš
0c65b28960
cli: add 'nmcli connection clone' for cloning connections (bgo #757627 )
...
Synopsis:
nmcli connection clone [--temporary] [id|uuid|path] <ID> <new name>
It copies the <ID> connection as <new name>. The command is very useful
if there is a connection, but another one is needed for a related
configuration. One can copy the existing profile and modify it for the
new situation.
For example:
$ nmcli con clone main-eth second-eth
$ nmcli con modify second-eth connection.interface-name em4
https://bugzilla.gnome.org/show_bug.cgi?id=757627
2015-11-18 09:37:44 +01:00
Jiří Klimeš
2c8c4ce2e4
nm-online: do not put \r to a translatable string (bgo #758102 )
...
msgmerge complains with
"warning: internationalized messages should not contain the '\r' escape sequence"
Found by Anders Jonsson <anders.jonsson@norsjovallen.se>
https://bugzilla.gnome.org/show_bug.cgi?id=758102
2015-11-16 15:19:53 +01:00
Jiří Klimeš
b92397f925
all: fix typos in the code and update translations for that (bgo #758102 )
...
Found by Anders Jonsson <anders.jonsson@norsjovallen.se>
https://bugzilla.gnome.org/show_bug.cgi?id=758102
2015-11-16 14:29:14 +01:00