<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/settings, branch th/fix-python-test</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>settings: drop redundant check from have_connection_for_device()</title>
<updated>2019-09-23T11:13:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-07T11:02:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=2a506d8a0964424a0df04319a629082969e4fe63'/>
<id>2a506d8a0964424a0df04319a629082969e4fe63</id>
<content type='text'>
have_connection_for_device() really should just call nm_device_check_connection_compatible().
Note that nm_device_check_connection_compatible() of course checks the
connection type already, so this is redundant.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
have_connection_for_device() really should just call nm_device_check_connection_compatible().
Note that nm_device_check_connection_compatible() of course checks the
connection type already, so this is redundant.
</pre>
</div>
</content>
</entry>
<entry>
<title>settings: shortcut check for whether to create auto-default wired connection</title>
<updated>2019-09-23T11:13:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-07T11:01:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=3e39d2a5861a162cd6afb92ff60bee71fb0b2517'/>
<id>3e39d2a5861a162cd6afb92ff60bee71fb0b2517</id>
<content type='text'>
This check is only useful for devices that implement new_default_connection.
We can shortcut the possibly expensive checks like have_connection_for_device(),
which need to iterate all profiles.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This check is only useful for devices that implement new_default_connection.
We can shortcut the possibly expensive checks like have_connection_for_device(),
which need to iterate all profiles.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: fix wrongly generating "Wired connection 1" (auto-default) for ethernet with MAC</title>
<updated>2019-09-23T11:13:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-07T10:51:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=5aa50d7c87c85591f2dada6dd0af8efdfb1cf837'/>
<id>5aa50d7c87c85591f2dada6dd0af8efdfb1cf837</id>
<content type='text'>
If a profile has only "ethernet.mac-address" set, but
"connection.interface-name" not, then the previous check

    iface = nm_setting_connection_get_interface_name (s_con);
    if (!nm_streq0 (iface, nm_device_get_iface (device)))
         continue;

would wrongly consider the profile not matching for the device.
As a result, we would wrongly create a auto-default connection.

Fix that. We already call nm_device_check_connection_compatible()
above. That is fully suitable to compare the interface name and
the MAC address. We don't need to duplicate this check (wrongly).

See also commit 77d01c909470 ('settings: ignore incompatible connections
when looking for existing ones') for how this code changed.

https://bugzilla.redhat.com/show_bug.cgi?id=1727909
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a profile has only "ethernet.mac-address" set, but
"connection.interface-name" not, then the previous check

    iface = nm_setting_connection_get_interface_name (s_con);
    if (!nm_streq0 (iface, nm_device_get_iface (device)))
         continue;

would wrongly consider the profile not matching for the device.
As a result, we would wrongly create a auto-default connection.

Fix that. We already call nm_device_check_connection_compatible()
above. That is fully suitable to compare the interface name and
the MAC address. We don't need to duplicate this check (wrongly).

See also commit 77d01c909470 ('settings: ignore incompatible connections
when looking for existing ones') for how this code changed.

https://bugzilla.redhat.com/show_bug.cgi?id=1727909
</pre>
</div>
</content>
</entry>
<entry>
<title>core: extend nm_shutdown_wait_obj_*() to support notification via a GCancellable</title>
<updated>2019-09-22T14:05:50+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-23T05:45:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=eae69e33dd1865f24544c135b366eb343c5a46e6'/>
<id>eae69e33dd1865f24544c135b366eb343c5a46e6</id>
<content type='text'>
Now nm_shutdown_wait_obj_*() supports two styles:

 - NM_SHUTDOWN_WAIT_TYPE_OBJECT: this just registers a weak pointer
   on a source GObject. As long as the object is not destroyed
   (and the object is not unregistered), the shutdown gets blocked.

 - now new is NM_SHUTDOWN_WAIT_TYPE_CANCELLABLE: this source object
   is a GCancellable, and during shutdown, the system will cancel
   the instances to notify about the shutdown. That aside, the GCancellable
   is tracked exactly like a regular NM_SHUTDOWN_WAIT_TYPE_OBJECT (meaning:
   a weak pointer is registered and shutdown gets delayed as long as the instance
   lives).

As the rest of the shutdown, it's not yet implemented on the shutdown-side.
What is now possible is to register such cancellables, so that users can make
use of this API before we fix shutdown. We cannot fix it all at the same time,
so first users must be ready for this approach.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now nm_shutdown_wait_obj_*() supports two styles:

 - NM_SHUTDOWN_WAIT_TYPE_OBJECT: this just registers a weak pointer
   on a source GObject. As long as the object is not destroyed
   (and the object is not unregistered), the shutdown gets blocked.

 - now new is NM_SHUTDOWN_WAIT_TYPE_CANCELLABLE: this source object
   is a GCancellable, and during shutdown, the system will cancel
   the instances to notify about the shutdown. That aside, the GCancellable
   is tracked exactly like a regular NM_SHUTDOWN_WAIT_TYPE_OBJECT (meaning:
   a weak pointer is registered and shutdown gets delayed as long as the instance
   lives).

As the rest of the shutdown, it's not yet implemented on the shutdown-side.
What is now possible is to register such cancellables, so that users can make
use of this API before we fix shutdown. We cannot fix it all at the same time,
so first users must be ready for this approach.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add and use NM_MANAGER_GET macro</title>
<updated>2019-09-22T14:05:50+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-23T14:45:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=5131cc42455f0de7bb7538ecd2b9d811fb246d2c'/>
<id>5131cc42455f0de7bb7538ecd2b9d811fb246d2c</id>
<content type='text'>
For our singleton getters we usually have such a macro. See NM_PLATFORM_GET
and NM_SETTINGS_GET.

Add such a macro for NMManager and use it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For our singleton getters we usually have such a macro. See NM_PLATFORM_GET
and NM_SETTINGS_GET.

Add such a macro for NMManager and use it.
</pre>
</div>
</content>
</entry>
<entry>
<title>all: SPDX header conversion</title>
<updated>2019-09-10T09:19:56+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2019-09-10T09:19:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=24028a22467275671df71cc6a8054036b37d8f03'/>
<id>24028a22467275671df71cc6a8054036b37d8f03</id>
<content type='text'>
  $ find * -type f |xargs perl contrib/scripts/spdx.pl
  $ git rm contrib/scripts/spdx.pl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  $ find * -type f |xargs perl contrib/scripts/spdx.pl
  $ git rm contrib/scripts/spdx.pl
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add audit log for the SaveHostname call</title>
<updated>2019-09-05T09:42:01+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2019-09-04T06:54:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=2ca8b511e6a6e3171c95b7343e28bd4552c02e1d'/>
<id>2ca8b511e6a6e3171c95b7343e28bd4552c02e1d</id>
<content type='text'>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/260
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/260
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add defines for common authentication-related error messages</title>
<updated>2019-09-05T09:41:57+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2019-09-04T08:18:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=4bd192a350dde461cea2324f29d8f89906854c56'/>
<id>4bd192a350dde461cea2324f29d8f89906854c56</id>
<content type='text'>
All D-Bus method call implementations use similar error messages when
authenticating requests; add defines for them to ensure the same exact
message is reused.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All D-Bus method call implementations use similar error messages when
authenticating requests; add defines for them to ensure the same exact
message is reused.
</pre>
</div>
</content>
</entry>
<entry>
<title>settings/keyfile: check whether profile can be re-read before writing to disk and fail</title>
<updated>2019-08-27T09:45:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-27T09:06:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=3b8aab2999454d748f6d47911d4f8a7af40a3fcd'/>
<id>3b8aab2999454d748f6d47911d4f8a7af40a3fcd</id>
<content type='text'>
First of all, keyfile writer (and reader) are supposed to be able to store
every profile to disk and re-read a valid profile back. Note that the profile
might be modified in the process, for example, blob certificates are written
to a file. So, the result might no be exactly the same, but it must still be
valid (and should only diverge in expected ways from the original, like mangled
certificates).

Previously, we would re-read the profile after writing to disk. If that failed,
we would only fail an assertion but otherwise proceeed. It is a bug
after all. However, it's bad to check only after writing to file,
because it results in a unreadable profile on disk, and in the first
moment it appears that noting went wrong. Instead, we should fail early.

Note that nms_keyfile_reader_from_keyfile() must entirely operate on the in-memory
representation of the keyfile. It must not actually access any files on disk. Hence,
moving this check before writing the profile must work. Otherwise, that would be
a separate bug. Actually, keyfile reader and writer violate this. I
added FIXME comments for that. But it doesn't interfere with this
patch.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
First of all, keyfile writer (and reader) are supposed to be able to store
every profile to disk and re-read a valid profile back. Note that the profile
might be modified in the process, for example, blob certificates are written
to a file. So, the result might no be exactly the same, but it must still be
valid (and should only diverge in expected ways from the original, like mangled
certificates).

Previously, we would re-read the profile after writing to disk. If that failed,
we would only fail an assertion but otherwise proceeed. It is a bug
after all. However, it's bad to check only after writing to file,
because it results in a unreadable profile on disk, and in the first
moment it appears that noting went wrong. Instead, we should fail early.

Note that nms_keyfile_reader_from_keyfile() must entirely operate on the in-memory
representation of the keyfile. It must not actually access any files on disk. Hence,
moving this check before writing the profile must work. Otherwise, that would be
a separate bug. Actually, keyfile reader and writer violate this. I
added FIXME comments for that. But it doesn't interfere with this
patch.
</pre>
</div>
</content>
</entry>
<entry>
<title>settings/keyfile: log reason why re-read connection cannot be normalized</title>
<updated>2019-08-27T08:44:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-25T11:25:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=1c2c7d3cb740fa9f68612698b7d9e3a5a7e68a2d'/>
<id>1c2c7d3cb740fa9f68612698b7d9e3a5a7e68a2d</id>
<content type='text'>
It's a bug either way, but let's log what exactly went wrong.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's a bug either way, but let's log what exactly went wrong.
</pre>
</div>
</content>
</entry>
</feed>
