Commit Graph

403 Commits

Author SHA1 Message Date
Lubomir Rintel
fa6375cd8b cli: add nmcli d reapply
Client support for O.FD.NM.Device.Reapply().
2016-01-10 23:13:34 +01:00
Thomas Haller
39d6976e89 build: minor change creating symlinks in install-exec-hook for nmtui 2016-01-07 17:41:58 +01:00
Michael Biebl
39fc73eed9 build: use symlinks for nmtui
Make /usr/bin/nmtui-* symbolic links to /usr/bin/nmtui.

https://bugzilla.gnome.org/show_bug.cgi?id=759824
2016-01-07 17:41:53 +01:00
Thomas Haller
db80ec05ab build: rename directory "include" to "shared"
Up to now, the "include" directory contained (only) header files that were
used project-wide by libs, core, clients, et al.

Since the directory now also contains a non-header file, the "include"
name is misleading. Instead of adding yet another directory that is
project-wide, with non-header-only content, rename the "include"
directory to "shared".
2015-12-24 11:42:37 +01:00
Beniamino Galvani
29b93602fc tun: add support for MTU and cloned-mac-address properties
Make it possible to change ethernet.mtu and
ethernet.cloned-mac-address properties of tun/tap devices
(cloned-mac-address is meaningful only for taps).
2015-12-19 12:06:33 +01:00
Beniamino Galvani
9c837e95a3 vxlan: add support for MTU and cloned-mac-address properties
Make it possible to change ethernet.mtu and
ethernet.cloned-mac-address properties of vxlan devices.
2015-12-19 12:06:33 +01:00
Beniamino Galvani
1ff712d5d0 ip-tunnel: add a MTU property
Add a new ip-tunnel.mtu property which can be used to change the MTU
of the tunnel interface.
2015-12-19 12:06:33 +01:00
Jiří Klimeš
73dcc3310c cli: (bash completion): add new settings to completion of '--fields' 2015-12-17 16:42:54 +01:00
Jiří Klimeš
6391a20114 cli: add bash completion for arguments of tun, ip-tunnel, macvlan, vxlan
for 'nmcli connection add type ...'
2015-12-17 16:28:42 +01:00
Jiří Klimeš
016db38ce2 cli: use '|' instead of ',' for delimiting the modes
to be consistent with other options
2015-12-17 16:20:10 +01:00
Jiří Klimeš
81dcf9b218 cli: really fix the description this time
Fixes: 3a6cd8204f
2015-12-17 16:10:32 +01:00
Thomas Haller
0959109b19 cli: fix spelling in user visible texts
https://bugzilla.gnome.org/show_bug.cgi?id=759555

Reported-by: Anders Jonsson <anders.jonsson@norsjovallen.se>
2015-12-17 12:25:26 +01:00
Jiří Klimeš
d0d96c1a13 cli: check ip-tunnel mode right after it is read 2015-12-16 16:12:24 +01:00
Jiří Klimeš
89db31bf7b cli: enable TAB-completion for macvlan.mode in editor 2015-12-16 16:10:08 +01:00
Jiří Klimeš
f8ed5ed239 cli: enable TAB-completion for "MACVLAN mode: " in nmcli -a con add type macvlan 2015-12-16 16:10:08 +01:00
Jiří Klimeš
835bdaaf1f cli: enable TAB-completion for ip-tunnel.mode in editor 2015-12-16 15:52:43 +01:00
Jiří Klimeš
9fb2a02b3a cli: enable TAB-completion for "Tunnel mode: " in nmcli -a con add type ip-tun 2015-12-16 14:36:28 +01:00
Jiří Klimeš
ff38790b12 cli: there are 5 optional arguments for vxlan connections 2015-12-16 14:21:15 +01:00
Jiří Klimeš
3a6cd8204f cli: remove stray space from help description 2015-12-16 14:20:05 +01:00
Jiří Klimeš
39f0ecbd36 cli: (trivial) fix a copy-paste error in a comment
Fixes: c3e6e25239
2015-12-16 14:18:47 +01:00
Beniamino Galvani
36f055fad9 cli: document ip-tunnel connection type 2015-12-16 14:03:28 +01:00
Beniamino Galvani
f4dd37fdcb cli: allow specifying a 'dev' option when adding IP tunnels 2015-12-16 14:03:26 +01:00
Beniamino Galvani
e62c0c2547 cli: fix error handling in creation of IP tunnels
Fixes: 7da440b798
2015-12-16 11:42:19 +01:00
Jiří Klimeš
56518bb8a1 cli: monitor whether NetworkManager is running
Print a message when NetworkManager is not running upon 'nmcli monitor' start.
2015-12-14 16:37:57 +01:00
Jiří Klimeš
800bd1aa18 cli: primary connection is not NMConnection, but NMActiveConnection
And use nm_client_get_primary_connection() accessor function instead of reading
NM_CLIENT_PRIMARY_CONNECTION property directly.

(process:31760): libnm-CRITICAL **: nm_connection_get_id: assertion 'NM_IS_CONNECTION (connection)' failed
(process:31760): libnm-CRITICAL **: nm_connection_get_uuid: assertion 'NM_IS_CONNECTION (connection)' failed

Fixes: d03f347b9d
2015-12-14 16:04:49 +01:00
Jiří Klimeš
a1536fe3d1 tui: prefill a secret in the entry if we have a value 2015-12-12 20:06:35 +01:00
Jiří Klimeš
2e345faa7e tui: allow connecting to OpenConnect
by running "openconnect --authenticate" and getting secrets from it
2015-12-12 20:06:35 +01:00
Jiří Klimeš
fb62fc76cb cli: do not present secrets from openconnect to the user for confirmation
It is pointless to present them and require user to press Return for each
password prompt.
2015-12-12 20:06:35 +01:00
Jiří Klimeš
45fc268890 cli: make asking VPN secrets for OpenConnect really work
by running nm_vpn_openconnect_authenticate_helper() and filling the obtained
secrets to the array sent to NM.
2015-12-12 20:06:17 +01:00
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