Commit graph

164 commits

Author SHA1 Message Date
Thomas Haller eabe7d856c auth: rework polkit autorization to use DBUS interface directly
This makes NetworkManager independent of <polkit/polkit.h>
development headers and libpolkit-gobject-1.so library.
Instead communicate directly with polkit using its DBUS
interface.

PolicyKit support is now always compiled in. You can control
polkit authorization with the configuration option
  [main]
  auth-polkit=yes|no

If the configure option is omitted, a build time default
value is used. This default value can be set with the
configure option --enable-polkit.

This commit adds a new class NMAuthManager that reimplements the
relevant DBUS client parts. It takes source code from the polkit
library.

https://bugzilla.gnome.org/show_bug.cgi?id=734146

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-29 13:51:11 +02:00
Thomas Haller 63a8c6a184 build: generate man/NetworkManager.conf.xml by autoconf
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-29 13:00:11 +02:00
Dan Williams 3adeffe1f1 man: clarify that keyfile is a fallback if no distro plugin is present
Distro plugins are intended to be used by default, and keyfile only if
distro plugins cannot read/write certain connection types.
2014-09-23 12:22:22 -05:00
Jiří Klimeš 6ed48691f7 man: add/update bonding and team examples in nm-settings-ifcfg-rh 2014-09-01 14:17:45 +02:00
Jiří Klimeš f27fac5109 man: generate nm-settings-ifcfg-rh(5) manual page 2014-08-29 13:59:54 +02:00
Jiří Klimeš 24edee2772 man: generate nm-settings-keyfile(5) manual page
man/nm-settings-keyfile.xml is generated via an XSLT stylesheet applied to
libnm-util/nm-keyfile-docs.xml. Then a manual page is generated from the XML.
2014-08-29 13:59:54 +02:00
Jiří Klimeš def5d6c3a7 trivial: only use spaces in nm-setting.xml
Do not mix tabs and spaces for indentation, only use spaces.
2014-08-28 19:04:14 +02:00
Jiří Klimeš c7a567ca90 cli: add 'nmcli device delete <ifname>' command (rh #1034150)
It only works for software devices. When called for a hardware device,
an error is returned and the device is not deleted.

https://bugzilla.redhat.com/show_bug.cgi?id=1034150
2014-07-22 14:24:43 +02:00
Dan Winship 377f72a66f build: fix nm-setting-docs build in various configurations
Certain build configurations (like --enable-gtk-doc
--disable-introspection) were broken with respect to nm-setting-docs.
Fix this. Also, we don't require just gobject-introspection, we need
pygobject specifically as well.
2014-06-27 17:24:57 -04:00
Dan Winship a3d02ddeef man: generate nm-settings.xml from libnm-util/nm-setting-docs.xml
Generate man/nm-settings.xml via an XSLT stylesheet applied to
libnm-util/nm-setting-docs.xml.
2014-06-19 17:45:02 -04:00
Jiří Klimeš 1553607223 man: clarify an nmcli example for adding static addresses in nmcli-examples 2014-06-16 12:48:04 +02:00
Dan Williams 1383f4bc14 dispatcher: use separate directories for pre-up/pre-down events
To ensure that NetworkManager does not block needlessly for events
which have no scripts, require scripts that respond to blocking
events to opt into the action.
2014-06-06 13:43:46 -05:00
Pavel Šimerda 186e4dcf7a dns: preliminary support for unbound (bgo #699810)
The script is called synchronously from NetworkManager so it can handle
asynchronicity itself. The long-term plan is to incorporate the script
partially into the new plugin and partially into a dnssec-trigger
library which will be used instead of dnssec-trigger daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=699810

Acked-By: Thomas Haller <thaller@redhat.com>
Acked-By: Dan Williams <dcbw@redhat.com>
2014-05-30 21:29:26 +02:00
Jiří Klimeš e88979a354 cli: add optional 'mac' argument for 'nmcli con add type bridge'
This allows setting bridge MAC either on command-line
nmcli con add type bridge con-name mybridge mac 11:22:33:44:55:66
or provide it when asked
nmcli -a con add type bridge con-name mybridge
2014-05-30 17:02:31 +02:00
Jiří Klimeš d7216505bb cli: do not restrict VPN type of created connections (rh #1100750)
There may be third-party VPN plugins nmcli is not aware of.
We still print a warning if nmcli doesn't know the type. It helps to catch up
typos.

https://bugzilla.redhat.com/show_bug.cgi?id=1100750
2014-05-28 09:37:15 +02:00
Dan Winship aba55670cc man: clarify the meaning of "nm-online --wait-for-startup"
https://bugzilla.gnome.org/show_bug.cgi?id=700651
2014-05-27 10:53:53 -04:00
Thomas Haller b5ffcf46f1 doc: update documentation to show all logging domains
Also, mention the deprecated alias HW in man/NetworkManager.conf

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-12 19:12:28 +02:00
Thomas Haller 4a22cefc6c core: add configuration main.debug and interpret environment variable NM_DEBUG
Interpret the configuration option main.debug and the
environment variable NM_DEBUG as a comma separated list
of debugging options (parsed with g_parse_debug_string()).

Currently only the option "RLIMIT_CORE" is supported, to set
the core dump size to unlimited.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-02 11:08:14 +02:00
Thomas Haller 516d66210f core: wait with "startup complete" for both IPv4 and IPv6 dynamic configuration
In case of DHCP4, DHCP6 and/or SLAAC, delay "startup complete" until
both IPv4 and IPv6 are ready. This especially has an effect on
nm-online/NetworkManager-wait-online.service, which blocks until
configuration of both IPv4 and IPv6 is ready.

We queue a pending_action when automatic configuration starts and
remove it again, when we receive an address. Before, "startup complete"
was reached when either one of the two IP protocols was configured.

https://bugzilla.redhat.com/show_bug.cgi?id=1086906

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-01 22:06:52 +02:00
Thomas Haller 9305c5bbf7 man/cli: add missing log domains to manual page and nmcli bash completion
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-04-24 17:27:47 +02:00
Dan Winship bb1c46f66d man: updates to the dispatcher section
Mention that the dispatcher kills slow scripts
(https://bugzilla.redhat.com/show_bug.cgi?id=982734) and that it runs
all scripts that have been queued, even if later events make that
"wrong". (Mentioned in https://bugzilla.gnome.org/show_bug.cgi?id=721971,
although that bug proposes changing this behavior, not documenting it.)
2014-04-18 11:33:20 -04:00
Jiří Klimeš b3cbb260ef man: use correct Mbit/s for maximum bitrate in nmcli-examples 2014-04-01 15:15:18 +02:00
Jiří Klimeš 20fb078dd6 nm-online: fix nm-online to report online status correctly (rh #1054364)
This fixes a behaviour change made by 44ac1020da.
That commit make nm-online to wait for NM finishing startup instead of waiting
for a real connection. So for NetworkManager fully initialized, but
disconnected nm-online would return 0.

$ nmcli -f RUNNING,STATE,STARTUP,CONNECTIVITY gen status
RUNNING  STATE         STARTUP  CONNECTIVITY
running  disconnected  started  none

Revert back to the original behaviour of waiting for a connection. And
introduce a new option '--wait-for-startup' waiting for NetworkManager
finishing its startup, which is useful in some cases, like
NetworkManager-wait-online.service.

https://bugzilla.redhat.com/show_bug.cgi?id=1054364
2014-03-31 08:37:10 +02:00
Jiří Klimeš d7e1ec9183 cli: accept prefix "ifname/", "uuid/" or "id/" for 'master' argument
nmcli con add type team-slave ifname em2 master team-master0
nmcli con add type team-slave ifname em2 master id/team-master0

It helps to disambiguate values for cases where they may overlap,
e.g. "team0" -> "ifname/team0" or "id/team0"
2014-03-12 10:32:37 +01:00
Jiří Klimeš 90c02cafdc cli: allow specifying 'master' for slaves as connection ID (rh #1057494)
nmcli con add type *-slave ifname em1 master <ifname|UUID|name>

'master' property of 'connection' setting has to be either interface name or
connection UUID of master connection. However, to make nmcli more convenient
for users, we also allow specifying connection name and translating it to UUID
automatically.

https://bugzilla.redhat.com/show_bug.cgi?id=1057494
2014-03-12 10:32:11 +01:00
Jiří Klimeš e3176dfa0d man: add a note about hostname to nmcli manual page 2014-02-28 14:44:22 +01:00
Thomas Haller bdc60d433d cli/man: indicate that nmcli connection delete accepts more then one connections
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-02-28 14:17:32 +01:00
Jiří Klimeš 223962f4ad man: add a simple bridge example to nmcli-examples manual page 2014-02-28 13:37:02 +01:00
Jiří Klimeš 2ef197983f man: update nmcli manual page to stress that we can remove values by name 2014-02-28 11:19:13 +01:00
Jiří Klimeš c1ace1b5b2 cli: support removing items from container-type properties in 'nmcli con modify'
Synopsis:
nmcli con modify -<property>.<setting> <value>

'value' can be empty ("") to remove the whole property value value (in this
case the behaviour is the same as without '-').
Or the 'value' is an index of the item to remove, or an option name (for a few
properties that have option names, like bond.options or ethernet.s390-options).

$ nmcli con mod myeth ipv4.dns "10.0.0.55 10.0.0.66 8.8.8.8 8.8.4.4"
---> ipv4.dns: 10.0.0.55, 10.0.0.66, 8.8.8.8, 8.8.4.4
$ nmcli con mod myeth -ipv4.dns 1
---> ipv4.dns: 10.0.0.55, 8.8.8.8, 8.8.4.4

---> bond.options: mode=balance-rr
$ nmcli con mod bond0 +bond.options "mii=500, downdelay=800"
---> bond.options: downdelay=800,miimon=500,mode=balance-rr
$ nmcli con mod bond0 -bond.options downdelay
---> bond.options: miimon=500,mode=balance-rr
2014-02-28 10:31:41 +01:00
Jiří Klimeš 363ec8de68 man: update nmcli manual page - 'nmcli con modify' description 2014-02-28 10:31:41 +01:00
Dan Winship 736bc1c7db man: NetworkManager.conf.5 fixes and updates
The [main] section is not mandatory.

Clarify in several places that the keyfile plugin is always used for
fallback, and that the [keyfile] section is normally only used if you
aren't using any other plugin.

Fix some erroneous references to "keyfile" and "ifdown" in the
ifupdown section.

Update the ifcfg-rh docs to list all currently-supported connection
types.

Swap the order of ifcfg-suse and ifupdown to make them alphabetical.
(Note that ifnet is currently missing.)

https://bugzilla.gnome.org/show_bug.cgi?id=720841
2014-02-03 10:54:11 +01:00
Jiří Klimeš 2d523bd800 cli: allow creating temporary (unsaved) connection with 'nmcli con add' 2014-01-30 10:49:51 +01:00
Jiří Klimeš 0bba6e77e5 man: update dispatcher scripts description in NetworkManager(8) manual page 2014-01-27 13:27:41 +01:00
Jiří Klimeš ee7615e147 man: document the default value for autoconnect 'nmcli con add' argument 2014-01-24 12:21:52 +01:00
Jiří Klimeš 9433ea502b man: fix typo in commands in Team example 2014-01-24 11:13:31 +01:00
Jiří Klimeš 26f8889286 cli: consolidate active and configured connections (rh #997999)
Handle connection profiles in a single 'show' command instead of 'show active'
and 'show configured'.

nmcli con show [--active] [[id|uuid|path|apath] <bla>]

nmcli con show           : display all connection profiles
nmcli con show --active  : only display active connection profiles
                           (filters out inactive profiles)

nmcli con show myeth     : display details of "myeth" profile, and also active
                           connection info (if the profile is active)
nmcli -f profile con show myeth : only display "myeth"'s static configuration
nmcli -f active  con show myeth : only display active details of "myeth"
nmcli -f connection.id,ipv4,general con show myeth
                                          : display "connection.id"a property
                                            "ipv4" setting and "GENERAL" group
                                            of active data

https://bugzilla.redhat.com/show_bug.cgi?id=997999
2014-01-23 13:45:46 +01:00
Jiří Klimeš 0ff286adcf man: add a Team example to nmcli-examples manual page 2014-01-22 17:53:28 +01:00
Jiří Klimeš d3170f3f1b trivial: fix typo in man page 2014-01-16 09:55:48 +01:00
Jiří Klimeš 080b3a43b5 man: update nmcli-examples manual page 2014-01-15 17:40:02 +01:00
Jiří Klimeš 55a92f826b man: update and define logging domains in NetworkManager.conf manual page 2014-01-15 17:40:02 +01:00
Dan Winship fc2a14d0f9 logging: allow per-domain log level overrides
Allow specifying log domains like "DEFAULT,WIFI:DEBUG" to override the
log level on a per-domain basis.
2013-12-20 10:04:10 -05:00
Thomas Haller 600763e773 man/cli: add NOTES section with disclaimer for name abbreviations
Make clear, that only full names are guaranteed to work in future
versions. The use of some abbreviations might break as new options
get added.

It would be rather complicated, to ensure, that abbreviations always
continue to work, at the additional disadvantage, that they no longer
uniquely identify an option. Instead, clearly state that using
them is not guaranteed to work in the future. Users that care about
long term compatibility should instead spell out the full names.
Abbreviations are mainly here for interactive use.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-12-18 16:50:59 +01:00
Jiří Klimeš 107fdd6b01 cli: support PPPoE connection types in 'nmcli con add' 2013-12-18 16:45:59 +01:00
Jiří Klimeš d79b56a7e9 cli: 'id' option for 'nmcli con add type vlan' is mandatory (rh #953397)
So update documentation accordingly.

https://bugzilla.redhat.com/show_bug.cgi?id=953397
2013-12-18 15:49:10 +01:00
Jiří Klimeš 72922f2068 cli: fix description of connection parameters and specify some default values 2013-12-13 09:50:09 +01:00
Jiří Klimeš 00de4a920a man: fix 'connection add' arguments descriptions in nmcli manual page 2013-12-12 13:27:09 +01:00
Dan Winship 461920bb96 cli: add NMC_RESULT_ERROR_NOT_FOUND and use as appropriate
This will allow callers to distinguish "no such connection" from
"connection failed to activate", etc.

https://bugzilla.redhat.com/show_bug.cgi?id=1022256
2013-11-22 13:51:25 -05:00
Dan Winship 9a532db182 cli: add "nmcli con load file..."
https://bugzilla.gnome.org/show_bug.cgi?id=709830
2013-11-15 13:39:40 -05:00
Jiří Klimeš 79ac1cf089 cli: add support for getting/setting hostname to nmcli (rh #1018510)
https://bugzilla.redhat.com/show_bug.cgi?id=1018510
2013-11-13 12:19:51 +01:00