<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/shared, branch th/device-availability</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>libnm-core: fix int comparisons in team setting</title>
<updated>2018-10-07T11:57:11+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-10-07T11:56:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=72b45417712186b0247ba5a69e42d54a27763fb0'/>
<id>72b45417712186b0247ba5a69e42d54a27763fb0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shared/nm-utils: avoid a coverity warning</title>
<updated>2018-10-06T08:03:48+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-10-04T07:37:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e4154895ff7da736ed0021280324aeb718a50408'/>
<id>e4154895ff7da736ed0021280324aeb718a50408</id>
<content type='text'>
 1. NetworkManager-1.14.0/shared/nm-utils/nm-shared-utils.c:1242: value_overwrite: Overwriting previous write to "ch" with value from "v".
 2. NetworkManager-1.14.0/shared/nm-utils/nm-shared-utils.c:1239: assigned_value: Assigning value from "++str[0]" to "ch" here, but that stored value is overwritten before it can be used.
 #  1237|   				if (ch &gt;= '0' &amp;&amp; ch &lt;= '7') {
 #  1238|   					v = v * 8 + (ch - '0');
 #  1239|-&gt; 					ch = (++str)[0];
 #  1240|   				}
 #  1241|   			}

Don't assign ch when it is going to be overwritten.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 1. NetworkManager-1.14.0/shared/nm-utils/nm-shared-utils.c:1242: value_overwrite: Overwriting previous write to "ch" with value from "v".
 2. NetworkManager-1.14.0/shared/nm-utils/nm-shared-utils.c:1239: assigned_value: Assigning value from "++str[0]" to "ch" here, but that stored value is overwritten before it can be used.
 #  1237|   				if (ch &gt;= '0' &amp;&amp; ch &lt;= '7') {
 #  1238|   					v = v * 8 + (ch - '0');
 #  1239|-&gt; 					ch = (++str)[0];
 #  1240|   				}
 #  1241|   			}

Don't assign ch when it is going to be overwritten.
</pre>
</div>
</content>
</entry>
<entry>
<title>keyfile: split automatically setting ID/UUID for keyfile</title>
<updated>2018-10-04T09:03:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-10-02T17:53:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=837d44ffa4bfb3ef1a1cd786336dcd2415e9259b'/>
<id>837d44ffa4bfb3ef1a1cd786336dcd2415e9259b</id>
<content type='text'>
keyfile already supports omitting the "connection.id" and
"connection.uuid". In that case, the ID would be taken from the
keyfile's name, and the UUID was generated by md5 hashing the
full filename.

No longer do this during nm_keyfile_read(), instead let all
callers call nm_keyfile_read_ensure_*() to their liking. This is done
for two reasons:

 - a minor reason is, that one day we want to expose keyfile API
   as public API. That means, we also want to read keyfiles from
   stdin, where there is no filename available. The implementation
   which parses stdio needs to define their own way of auto-generating
   ID and UUID. Note how nm_keyfile_read()'s API no longer takes a
   filename as argument, which would be awkward for the stdin case.

 - Currently, we only support one keyfile directory, which (configurably)
   is "/etc/NetworkManager/system-connections".
   In the future, we want to support multiple keyfile dirctories, like
   "/var/run/NetworkManager/profiles" or "/usr/lib/NetworkManager/profiles".
   Here we want that a file "foo" (which does not specify a UUID) gets the
   same UUID regardless of the directory it is in. That seems better, because
   then the UUID won't change as you move the file between directories.
   Yes, that means, that the same UUID will be provided by multiple
   files, but NetworkManager must already cope with that situation anyway.
   Unfortunately, the UUID generation scheme hashes the full path. That
   means, we must hash the path name of the file "foo" inside the
   original "system-connections" directory.
   Refactor the code so that it accounds for a difference between the
   filename of the keyfile, and the profile_dir used for generating
   the UUID.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
keyfile already supports omitting the "connection.id" and
"connection.uuid". In that case, the ID would be taken from the
keyfile's name, and the UUID was generated by md5 hashing the
full filename.

No longer do this during nm_keyfile_read(), instead let all
callers call nm_keyfile_read_ensure_*() to their liking. This is done
for two reasons:

 - a minor reason is, that one day we want to expose keyfile API
   as public API. That means, we also want to read keyfiles from
   stdin, where there is no filename available. The implementation
   which parses stdio needs to define their own way of auto-generating
   ID and UUID. Note how nm_keyfile_read()'s API no longer takes a
   filename as argument, which would be awkward for the stdin case.

 - Currently, we only support one keyfile directory, which (configurably)
   is "/etc/NetworkManager/system-connections".
   In the future, we want to support multiple keyfile dirctories, like
   "/var/run/NetworkManager/profiles" or "/usr/lib/NetworkManager/profiles".
   Here we want that a file "foo" (which does not specify a UUID) gets the
   same UUID regardless of the directory it is in. That seems better, because
   then the UUID won't change as you move the file between directories.
   Yes, that means, that the same UUID will be provided by multiple
   files, but NetworkManager must already cope with that situation anyway.
   Unfortunately, the UUID generation scheme hashes the full path. That
   means, we must hash the path name of the file "foo" inside the
   original "system-connections" directory.
   Refactor the code so that it accounds for a difference between the
   filename of the keyfile, and the profile_dir used for generating
   the UUID.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: avoid invoking g_free() with NULL from gs_free cleanup attribute</title>
<updated>2018-10-04T08:58:50+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-09-27T12:20:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d060b7b3798033d3109a3cbf664d1b44f36c394e'/>
<id>d060b7b3798033d3109a3cbf664d1b44f36c394e</id>
<content type='text'>
In general, it's fine to pass %NULL to g_free().

However, consider:

    char *
    foo (void)
    {
        gs_free char *value = NULL;

        value = g_strdup ("hi");
        return g_steal_pointer (&amp;value);
    }

gs_free, gs_local_free(), and g_steal_pointer() are all inlinable.
Here the compiler can easily recognize that we always pass %NULL to
g_free(). But with the previous implementation, the compiler would
not omit the call to g_free().

Similar patterns happen all over the place:

    gboolean
    baz (void)
    {
        gs_free char *value = NULL;

        if (!some_check ())
            return FALSE;

        value = get_value ();
        if (!value)
            return FALSE;

        return TRUE;
    }

in this example, g_free() is only required after setting @value to
non-NULL.

Note that this does increase the binary side a bit (4k for libnm, 8k
for NetworkManager, with "-O2").
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In general, it's fine to pass %NULL to g_free().

However, consider:

    char *
    foo (void)
    {
        gs_free char *value = NULL;

        value = g_strdup ("hi");
        return g_steal_pointer (&amp;value);
    }

gs_free, gs_local_free(), and g_steal_pointer() are all inlinable.
Here the compiler can easily recognize that we always pass %NULL to
g_free(). But with the previous implementation, the compiler would
not omit the call to g_free().

Similar patterns happen all over the place:

    gboolean
    baz (void)
    {
        gs_free char *value = NULL;

        if (!some_check ())
            return FALSE;

        value = get_value ();
        if (!value)
            return FALSE;

        return TRUE;
    }

in this example, g_free() is only required after setting @value to
non-NULL.

Note that this does increase the binary side a bit (4k for libnm, 8k
for NetworkManager, with "-O2").
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: add nm_strndup_a() helper</title>
<updated>2018-10-04T08:58:50+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-09-21T13:45:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=ba491a6674d322371ed1c989afc1ecee79a63c1a'/>
<id>ba491a6674d322371ed1c989afc1ecee79a63c1a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2018-09-30T19:14:55+00:00</updated>
<author>
<name>Rafael Fontenelle</name>
<email>rafaelff@gnome.org</email>
</author>
<published>2018-09-30T14:30:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=34fd62899003f8c25356214d93f6b71c2eb567df'/>
<id>34fd62899003f8c25356214d93f6b71c2eb567df</id>
<content type='text'>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/21

[thaller@redhat.com: fix generated clients/common/settings-docs.h.in file
   and fix wrong change in src/systemd/src/libsystemd/sd-event/sd-event.c]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/21

[thaller@redhat.com: fix generated clients/common/settings-docs.h.in file
   and fix wrong change in src/systemd/src/libsystemd/sd-event/sd-event.c]
</pre>
</div>
</content>
</entry>
<entry>
<title>all: pass O_CLOEXEC flag to g_mkstemp()</title>
<updated>2018-09-21T08:39:30+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-09-12T14:31:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=20a7e489eebe897ef531b52c0dbaed3d87e39c40'/>
<id>20a7e489eebe897ef531b52c0dbaed3d87e39c40</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>build: autodetect ebpf support</title>
<updated>2018-09-19T15:23:11+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-09-19T14:38:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=81a565ebe5ded63c1da77500808d44dfd73d9df8'/>
<id>81a565ebe5ded63c1da77500808d44dfd73d9df8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>build: allow disabling eBPF support in n-acd</title>
<updated>2018-09-18T13:32:36+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-09-04T06:25:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=691c71a7f2a1d2816a11165480e45355dcf032cb'/>
<id>691c71a7f2a1d2816a11165480e45355dcf032cb</id>
<content type='text'>
Add a configure option to disable eBPF support in n-acd.

Note that, even if eBPF is not supported, n-acd requires a kernel &gt;
3.19, which means that the setsockopt(..., SO_ATTACH_BPF) option must
be defined. To allow building on older kernels without modifying the
n-acd code, we inject the SO_ATTACH_BPF value as a preprocessor define
in the compiler the command line.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a configure option to disable eBPF support in n-acd.

Note that, even if eBPF is not supported, n-acd requires a kernel &gt;
3.19, which means that the setsockopt(..., SO_ATTACH_BPF) option must
be defined. To allow building on older kernels without modifying the
n-acd code, we inject the SO_ATTACH_BPF value as a preprocessor define
in the compiler the command line.
</pre>
</div>
</content>
</entry>
<entry>
<title>acd: adapt NM code and build options</title>
<updated>2018-09-18T13:32:36+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-09-04T09:10:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d9a4b59c18e36f2b577744b7fe6710d71161ca12'/>
<id>d9a4b59c18e36f2b577744b7fe6710d71161ca12</id>
<content type='text'>
Adapt the nm-acd-manager.c code to the new API and also tweak build
options to the new project structure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adapt the nm-acd-manager.c code to the new API and also tweak build
options to the new project structure.
</pre>
</div>
</content>
</entry>
</feed>
