| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
[1/5] Compiling C object 'clients/common/913ef36@@nmc-base@sta/nm-client-utils.c.o'.
../clients/common/nm-client-utils.c:528: warning: "NDEBUG" redefined
528 | #define NDEBUG
|
<command-line>: note: this is the location of the previous definition
|
|
|
|
|
| |
Add new VRF setting and connection types to libnm-core and support
them in nmcli.
|
|
|
|
| |
nmc_readline_helper()
|
| |
|
|
|
|
|
| |
Its source-func argument has the right signature. Otherwise, this is an
easy to make mistake.
|
|
|
|
| |
Fixes: 3bda3fb60c10 ('nmtui: initial import of nmtui')
|
|
|
|
|
|
| |
Also the child fds are set to -1 so that nm_close() doesn't throw an assertion.
Fixes: df1d214b2 (clients: polkit-agent: implement polkit agent without using libpolkit)
|
|
|
|
| |
is not found
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
After a user entered a secret it would get stored in the readline
history data structure (in plain text) and eventually get leaked.
This commit instructs readline to not store any secret in its
history and fixes a non-related memory leak.
|
|
|
|
| |
This is a bug and leads either to a leak or a crash.
|
|
|
|
|
|
| |
The abbreviations "ns" and "ms" seem not very clear to me. Spell them
out to nsec/msec. Also, in parts we already used the longer abbreviations,
so it wasn't consistent.
|
|
|
|
|
| |
I think "ms" as abbreviation is too short and unclear. Also, it's
not used consistently. Rename variable.
|
|
|
|
| |
`nmcli con show`
|
|
|
|
|
|
|
| |
This will be necessary to sort a list of text that contains text to
replace. The use case is to get all UUIDs from the server, but some
of these UUIDs are dynamic. So, in order to have a fixed sort order,
we need to handle sorting the list, based on the replacement.
|
|
|
|
| |
Will be used to get all connection from the test stub server.
|
|
|
|
|
|
|
| |
We want to issue a nmcli command with the connection's UUID in the command
line. As the command line is stored to disk and compared, we cannot use UUIDs
that are randomly generated. Instead, we need to support replacing the text
in the command line.
|
|
|
|
|
|
|
| |
TestNmcli
It had no bad effect, but the cmd was a tuple with one string, and not
a string.
|
| |
|
|
|
|
|
|
| |
The variable name should say what it is, not what it is used for.
E.g. we would use the very same replacements for stderr. Rename
so that it can (by its name) used for different purposes.
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1745574
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLMNR and mDNS settings can have their global default value configured
in "NetworkManager.conf".
Global default values should work the way that all regular values of the property
can be configured explicitly in the connection profile. The special "default" value
only indicates to allow lookup of the global default, but it should not have a
meaning of its own.
Note that if mDNS/LLMNR settings are left unspecified, we will set the
argument to SetLinkMulticastDNS() and SetLinkLLMNR() functions to "",
which means that systemd-resolved decides on a default. Also, depending
on the DNS plugin, the default value differs. This is all fine however.
In this case, the ultimate default value depends on other things (like
the DNS plugin), but each possible value is in fact explicitly
configurable. We also do that for "ipv6.ip6-privacy".
Anyway, cleanup the documentation a bit and try to better explain what
the default is.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids unnecessarily fetching permissions, which are not needed
most of the time.
During `nmcli general permissions` we require to fetch the permissions. This is
now solved better, because previously the code waited for any permissions to be
not UNKNOWN. That was a hack, because there are cases where all permissions would
be UNKNOWN (hidepid mount option) and nmcli would hang.
There is a downside too: for `nmcli general permissions` we now first
need to wait for NMClient to initialize, before starting to fetch
permissions. Previously, we would call GetPermissions() in parallel
with initializing NMClient. It now takes longer.
That should be fixed be refactoring the code in nmcli to not wait for
NMClient to be fully initialized, before requesting the permissions.
|
|
|
|
|
| |
This will allow us to set construct parameters to the instance, like
NM_CLIENT_INSTANCE_FLAGS.
|
|
|
|
| |
nm-online doesn't care about the permissions. Don't fetch them.
|
|
|
|
|
| |
This will allow us to set construct parameters to the instance, like
NM_CLIENT_INSTANCE_FLAGS.
|
|
|
|
| |
nm-cloud-setup doesn't care about the permissions. Don't fetch them.
|
| |
|
|
|
|
| |
nmtui doesn't care about the permissions. Don't fetch them.
|
|
|
|
|
|
|
|
| |
Using sync init (nm_client_new()) has an overhead as it requires an internal
GMainContext to ensure preserving the order of D-Bus messages. Let's avoid
that by using the async init. Note that the difference here is that we will
iterate the caller's GMainContext while creating the instance. But that
is no problem for nmtui at that point.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example with
mount -o remount,rw,hidepid=1 /proc/
all permission checks will fail with an error. Internally, we map the
failure to NM_AUTH_CALL_RESULT_UNKNOWN.
<trace> [1575645672.5958] auth: call[1069]: CheckAuthorization(org.freedesktop.NetworkManager.enable-disable-connectivity-check), subject=unix-process[pid=468316, uid=1000, start=1912881]
<trace> [1575645672.6295] auth: call[1069]: completed: failed: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to open file “/proc/468316/status”: No such file or directory
<debug> [1575645672.6296] manager: unknown auth chain result 0
First of all, we should not log a debug message about that (we already log the
result of permission checks separately).
Also, we should include the unknown result in the response. The permission was
checked, and omitting it from GetPermissions() result seems wrong (even if we
failed to get the result).
Note that "unknown" is now a new possible return value on D-Bus. But
see how nm_permission_result_to_client() would map such a value to
"unknown" as well. So, it's probably a fine extension of the D-Bus API.
Note that NMClient API is currently quite limited. The user won't know
whether permissions were received (and if they were received, they
could not distinguish between UNKNOWN and absent). Hence, returning
all permissions as unknown (or not at all) causes `nmcli general permissions`
to hang. The solution here is to improve NMClient API to allow the user
to know when the permissions are received. But this patch doesn't
fix the hanging of nmcli nor the limitation of NMClient's API.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
"nm-cloud-setup" can by configured via environment variables. Mark all the
names of such variables with NMCS_ENV_VARIABLE() macro. This allows to grep
for them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"nm-cloud-setup" is supposed to work without configuration.
However, it (obviously) fetches data from the network you are connected to (which
might be untrusted or controlled by somebody malicious). The tool cannot
protect you against that, also because the meta data services uses HTTP and not
HTTPS. It means, you should run the tool only when it's suitable for your
environment, that is: in the right cloud.
Usually, the user/admin/distributor would know for which cloud the enable the tool.
It's also wasteful to repeatedly probe for the unavailable cloud.
So, instead disable all providers by default and require to opt-in by setting an
environment variable.
This can be conveniently done via `systemctl edit nm-cloud-provider.service` to
set Environment=. Of course, a image can also pre-deploy such am override file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want that when the user installs the package, that the
dispatcher script automatically executes the tool. Instead, the user
should use `systemctl enable/disable` to control whether the service
is active (of via the timer).
Hence, let the dispatcher script check whether the service is enabled.
That leads to a different problem, that we need to make it possible for
"nm-cloud-setup.service" to be enabled in the first place. As such, add
a [Install] section and let it be wanted by NetworkManager.service. The
problem with this is that now the tool will run very early, just after
NetworkManager started. At that point, it might not yet have setup
networking. But that should be acceptable, after all, the tool either
fails to fetch meta data that early, or it succeeds. Very likely, it
will by aborted by dispatcher's restart command.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a tool for automatically configuring networking in a cloud
environment.
Currently it only supports IPv4 on EC2, but it's intended for extending
to other cloud providers (Azure). See [1] and [2] for how to configure
secondary IP addresses on EC2. This is what the tool currently aims to
do (but in the future it might do more).
[1] https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ubuntu-secondary-network-interface/
It is inspired by SuSE's cloud-netconfig ([1], [2]) and ec2-net-utils
package on Amazon Linux ([3], [4]).
[1] https://www.suse.com/c/multi-nic-cloud-netconfig-ec2-azure/
[2] https://github.com/SUSE-Enceladus/cloud-netconfig
[3] https://github.com/aws/ec2-net-utils
[4] https://github.com/lorengordon/ec2-net-utils.git
It is also intended to work without configuration. The main point is
that you boot an image with NetworkManager and nm-cloud-setup enabled,
and it just works.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using the dhclient DHCP backend users can tweak the behavior in
the dhclient configuration file. One of the options that was reported
as useful in the past was the FQDN flags [1] [2].
Add native support for FQDN flags to NM by introducing new
ipv{4,6}.dhcp-hostname-flags properties.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1684595
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1255507
|
|
|
|
|
|
|
|
|
| |
Add a new 'carrier' flag to the InterfaceFlags property of devices to
indicate the current carrier state.
The new flag is equivalent to the 'lower-up' flag for all devices
except the ones that use a non-standard carrier detection mechanism
like NMDeviceAdsl.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow changing the cloned MAC address for OVS bridges and
interfaces. The MAC address set on the bridge is propagated by ovs to
the local interface (the one with the same name as the bridge), while
all other internal interfaces use the address defined in the interface
connection.
https://bugzilla.redhat.com/show_bug.cgi?id=1763734
https://bugzilla.redhat.com/show_bug.cgi?id=1740557
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/321
|
|
|
|
|
| |
Support a new DHCP IAID special value 'stable' that generates the IAID
based on the stable-id, a per-host key and the interface name.
|
|
|
|
|
| |
Add new ipv4.dhcp-iaid and ipv6.dhcp-iaid properties to specify a DHCP
IAID.
|