<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/nm-auth-manager.c, branch th/strsplit</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>auth-manager: use the correct function to deallocate a GError</title>
<updated>2018-05-02T12:55:01+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-04-26T20:48:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=2244352583100166efe655f6fccba86039c8daab'/>
<id>2244352583100166efe655f6fccba86039c8daab</id>
<content type='text'>
This one ruins the party.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This one ruins the party.
</pre>
</div>
</content>
</entry>
<entry>
<title>auth-manager: drop an unused variable</title>
<updated>2018-04-23T06:26:05+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2018-04-23T06:25:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=40ce80cb50c36dc0ee66175920a72bf918a5b7ba'/>
<id>40ce80cb50c36dc0ee66175920a72bf918a5b7ba</id>
<content type='text'>
src/nm-auth-manager.c:673:24: error: unused variable 'error_disposing' [-Werror,-Wunused-variable]
        gs_free_error GError *error_disposing = NULL;
                              ^

Fixes: 2ea2df3184d45567fa9c44f5ef90634a779bfb75
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
src/nm-auth-manager.c:673:24: error: unused variable 'error_disposing' [-Werror,-Wunused-variable]
        gs_free_error GError *error_disposing = NULL;
                              ^

Fixes: 2ea2df3184d45567fa9c44f5ef90634a779bfb75
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: drop duplicate c-list.h header</title>
<updated>2018-04-18T13:22:14+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-04-06T14:40:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=19876b4cfed86f79c43ba8d6e57f6383deb43e6f'/>
<id>19876b4cfed86f79c43ba8d6e57f6383deb43e6f</id>
<content type='text'>
Use the one from the project just imported.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the one from the project just imported.
</pre>
</div>
</content>
</entry>
<entry>
<title>auth-manager: fix potential issue iterating modified CList in _dbus_new_proxy_cb()</title>
<updated>2018-04-18T05:51:29+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-04-18T05:51:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a99d51cb501d4a4022273aeb0622e1a8eaac2657'/>
<id>a99d51cb501d4a4022273aeb0622e1a8eaac2657</id>
<content type='text'>
In the loop, we invoke callbacks. What the callbacks do, is out of control
of NMAuthManager. For example, they could cancel or schedule new
requests. Especially, cancelling invalidate the stored @safe pointer.

Fix that, by always iterate from the start of the list.

Fixes: d0563f0733ed293d67e9a0f6503e28c3f1c08f1b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the loop, we invoke callbacks. What the callbacks do, is out of control
of NMAuthManager. For example, they could cancel or schedule new
requests. Especially, cancelling invalidate the stored @safe pointer.

Fix that, by always iterate from the start of the list.

Fixes: d0563f0733ed293d67e9a0f6503e28c3f1c08f1b
</pre>
</div>
</content>
</entry>
<entry>
<title>auth-manager: fix processing calls in _dbus_new_proxy_cb()</title>
<updated>2018-04-17T14:22:34+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-04-17T14:17:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0fa57069ad98e9f2d98b93aba6a41cadd095b284'/>
<id>0fa57069ad98e9f2d98b93aba6a41cadd095b284</id>
<content type='text'>
In the first loop, the element is removed only when the callback is
executed. The second loop never removes the current element. Use the
for_each macro for both.

Fixes: d0563f0733ed293d67e9a0f6503e28c3f1c08f1b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the first loop, the element is removed only when the callback is
executed. The second loop never removes the current element. Use the
for_each macro for both.

Fixes: d0563f0733ed293d67e9a0f6503e28c3f1c08f1b
</pre>
</div>
</content>
</entry>
<entry>
<title>core: fix wrong assertion when disposing NMAuthManager</title>
<updated>2018-04-17T14:01:36+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-04-17T14:01:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=cbeabaa00011ace3c6893427511eb36abee3d5a4'/>
<id>cbeabaa00011ace3c6893427511eb36abee3d5a4</id>
<content type='text'>
The list should be empty on disposal.

Fixes: 2ea2df3184d45567fa9c44f5ef90634a779bfb75
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The list should be empty on disposal.

Fixes: 2ea2df3184d45567fa9c44f5ef90634a779bfb75
</pre>
</div>
</content>
</entry>
<entry>
<title>auth-manager: don't process idle calls when the proxy creation finishes</title>
<updated>2018-04-17T08:17:25+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2018-04-16T12:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d0563f0733ed293d67e9a0f6503e28c3f1c08f1b'/>
<id>d0563f0733ed293d67e9a0f6503e28c3f1c08f1b</id>
<content type='text'>
The list of calls contains two kinds of elements: (1) calls that don't
need a D-Bus request and are only waiting for the asynchronous
invocation of the callback in an idle function; (2) calls that need a
D-Bus request and are waiting for the D-Bus proxy.

When the proxy creation finishes, only (2) calls must be canceled (if
the creation failed) or started (if the proxy was created).

Fixes: 798b2a7527bddadcec37b48183da313fbc961e45

https://bugzilla.redhat.com/show_bug.cgi?id=1567807
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The list of calls contains two kinds of elements: (1) calls that don't
need a D-Bus request and are only waiting for the asynchronous
invocation of the callback in an idle function; (2) calls that need a
D-Bus request and are waiting for the D-Bus proxy.

When the proxy creation finishes, only (2) calls must be canceled (if
the creation failed) or started (if the proxy was created).

Fixes: 798b2a7527bddadcec37b48183da313fbc961e45

https://bugzilla.redhat.com/show_bug.cgi?id=1567807
</pre>
</div>
</content>
</entry>
<entry>
<title>auth-manager: let NMAuthChain always call to NMAuthManager for dummy requests</title>
<updated>2018-04-13T07:09:46+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-04-09T14:04:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=798b2a7527bddadcec37b48183da313fbc961e45'/>
<id>798b2a7527bddadcec37b48183da313fbc961e45</id>
<content type='text'>
NMAuthChain's nm_auth_chain_add_call() used to add special handling for
the NMAuthSubject. This handling really belongs to NMAuthManager for two
reasons:
 - NMAuthManager already goes through the effort of scheduling an idle
   handler to handle the case where no GDBusProxy is present. It can
   just as well handle the special cases where polkit-auth is disabled
   or when we have internal requests.
 - by NMAuthChain doing special handling, it makes it more complicated
   to call nm_auth_manager_check_authorization() directly. Previously,
   the NMAuthChain had additional logic, which means you either were
   forced to create an NMAuthChain, or you had to reimplement special
   handling like nm_auth_chain_add_call().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NMAuthChain's nm_auth_chain_add_call() used to add special handling for
the NMAuthSubject. This handling really belongs to NMAuthManager for two
reasons:
 - NMAuthManager already goes through the effort of scheduling an idle
   handler to handle the case where no GDBusProxy is present. It can
   just as well handle the special cases where polkit-auth is disabled
   or when we have internal requests.
 - by NMAuthChain doing special handling, it makes it more complicated
   to call nm_auth_manager_check_authorization() directly. Previously,
   the NMAuthChain had additional logic, which means you either were
   forced to create an NMAuthChain, or you had to reimplement special
   handling like nm_auth_chain_add_call().
</pre>
</div>
</content>
</entry>
<entry>
<title>auth-manager: always compile D-Bus calls to polkit</title>
<updated>2018-04-13T07:09:46+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-04-09T16:13:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=41abf9f8e81423eff0ef888d17a5454d0b5750bf'/>
<id>41abf9f8e81423eff0ef888d17a5454d0b5750bf</id>
<content type='text'>
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.

Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.

Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.

Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.

Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
</pre>
</div>
</content>
</entry>
<entry>
<title>auth-manager: rework auth-manager's API</title>
<updated>2018-04-13T07:09:46+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-04-09T11:27:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=2ea2df3184d45567fa9c44f5ef90634a779bfb75'/>
<id>2ea2df3184d45567fa9c44f5ef90634a779bfb75</id>
<content type='text'>
Don't use the GAsyncResult pattern for internal API of auth-manager. Instead,
use a simpler API that has a more strict API and simpler use.

- return a call-id handle when scheduling the authorization request.
  The request is always scheduled asynchronsously and thus call-id
  is never %NULL.
- the call-id can be used to cancel the request. It can be used exactly
  once, and only before the callback is invoked.
- the async keeps the auth-manager alive. It needs to do so, because
  when cancelling the request we might not yet be done: instead we
  might still need to issue a CancelCheckAuthorization call (which
  we need to handle as well).
- the callback is always invoked exactly once.

Currently NMAuthManager's API effectivly is only called by NMAuthChain.
The point of this is to make NMAuthManager's API more consumable, and
thus let users use it directly (instead of using the NMAuthChain layer).

As well known, we don't do a good job during shutdown of NetworkManager
to release all resources and cancel pending requests. This rework also
makes it possible to actually get this right. See the comment in
nm_auth_manager_force_shutdown(). But yes, it is still a bit complicated
to do a controlled shutdown, because we cannot just synchronously
complete. We need to issue CancelCheckAuthorization D-Bus calls, and
give these requests time to complete. The new API introduced by this patch
would make that easier.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't use the GAsyncResult pattern for internal API of auth-manager. Instead,
use a simpler API that has a more strict API and simpler use.

- return a call-id handle when scheduling the authorization request.
  The request is always scheduled asynchronsously and thus call-id
  is never %NULL.
- the call-id can be used to cancel the request. It can be used exactly
  once, and only before the callback is invoked.
- the async keeps the auth-manager alive. It needs to do so, because
  when cancelling the request we might not yet be done: instead we
  might still need to issue a CancelCheckAuthorization call (which
  we need to handle as well).
- the callback is always invoked exactly once.

Currently NMAuthManager's API effectivly is only called by NMAuthChain.
The point of this is to make NMAuthManager's API more consumable, and
thus let users use it directly (instead of using the NMAuthChain layer).

As well known, we don't do a good job during shutdown of NetworkManager
to release all resources and cancel pending requests. This rework also
makes it possible to actually get this right. See the comment in
nm_auth_manager_force_shutdown(). But yes, it is still a bit complicated
to do a controlled shutdown, because we cannot just synchronously
complete. We need to issue CancelCheckAuthorization D-Bus calls, and
give these requests time to complete. The new API introduced by this patch
would make that easier.
</pre>
</div>
</content>
</entry>
</feed>
