<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git, branch th/cli-command-cleanup</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>cli/polkit: make parsing polkit-agent-helper-1 protocol more conforming</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-06T08:54:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b954aa96f7ca72aaa4e1fa25bfb19130f696a005'/>
<id>b954aa96f7ca72aaa4e1fa25bfb19130f696a005</id>
<content type='text'>
- in io_watch_have_data(), ensure that we handle incomplete lines
that don't yet have a newline by waiting for more data. That means,
if the current content of the in_buffer does not have a newline, we
wait longer.

- in io_watch_have_data(), implement (and ignore) certain commands
instead of failing the request.

- in io_watch_have_data(), no longer g_compress() the entire line.
"polkitagenthelper-pam.c" never backslash escapes the command, it
only escapes the arguments. Of course, there should be no difference
in practice, except that we don't want to handle escape sequences
in the commands.

- in io_watch_have_data(), compare SUCCESS/FAILURE literally.
"polkitagenthelper-pam.c" never appends any trailing garbage to these
commands, and we shouldn't handle that (although "polkitagentsession.c"
does).

- when io_watch_have_data() completes with success, we cannot destroy
AuthRequest right away. It probably still has data pending that we first
need to write to the polkit helper. Wait longer, and let io_watch_can_write()
complete the request.

- ensure we always answer the GDBusMethodInvocation. Otherwise, it gets
leaked.

- use NMStrBuf instead of GString.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- in io_watch_have_data(), ensure that we handle incomplete lines
that don't yet have a newline by waiting for more data. That means,
if the current content of the in_buffer does not have a newline, we
wait longer.

- in io_watch_have_data(), implement (and ignore) certain commands
instead of failing the request.

- in io_watch_have_data(), no longer g_compress() the entire line.
"polkitagenthelper-pam.c" never backslash escapes the command, it
only escapes the arguments. Of course, there should be no difference
in practice, except that we don't want to handle escape sequences
in the commands.

- in io_watch_have_data(), compare SUCCESS/FAILURE literally.
"polkitagenthelper-pam.c" never appends any trailing garbage to these
commands, and we shouldn't handle that (although "polkitagentsession.c"
does).

- when io_watch_have_data() completes with success, we cannot destroy
AuthRequest right away. It probably still has data pending that we first
need to write to the polkit helper. Wait longer, and let io_watch_can_write()
complete the request.

- ensure we always answer the GDBusMethodInvocation. Otherwise, it gets
leaked.

- use NMStrBuf instead of GString.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli/polkit: suppress stderr from polkit-agent-helper when prompting for polkit authentication</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-09T09:59:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=de2c6f318de54277bcb145269c3df259d3d2743c'/>
<id>de2c6f318de54277bcb145269c3df259d3d2743c</id>
<content type='text'>
Otherwise, we get an additional error message form the helper:

  $ nmcli --ask device wifi rescan
  System policy prevents Wi-Fi scans
  (action_id: org.freedesktop.NetworkManager.wifi.scan)
  password (user): •••••••
  polkit-agent-helper-1: pam_authenticate failed: Authentication failure
  Error: org.freedesktop.NetworkManager.wifi.scan request failed: not authorized.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise, we get an additional error message form the helper:

  $ nmcli --ask device wifi rescan
  System policy prevents Wi-Fi scans
  (action_id: org.freedesktop.NetworkManager.wifi.scan)
  password (user): •••••••
  polkit-agent-helper-1: pam_authenticate failed: Authentication failure
  Error: org.freedesktop.NetworkManager.wifi.scan request failed: not authorized.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli/polkit: rework parsing identities for polkit request</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-06T15:01:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b3cbd35c547e1ab5c76dbb37a174ff82cd7d2a7b'/>
<id>b3cbd35c547e1ab5c76dbb37a174ff82cd7d2a7b</id>
<content type='text'>
The identities are in a nested dictionary of variants. We only want
to pick the "unix-user" values that we can handle.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The identities are in a nested dictionary of variants. We only want
to pick the "unix-user" values that we can handle.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli/polkit: reject unknown D-Bus methods</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-06T11:57:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7c979bcbfc0985274d63b89c27b751ce78613519'/>
<id>7c979bcbfc0985274d63b89c27b751ce78613519</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cli/polkit: rename NM_POLKIT_LISTENER_SIGNAL_REQUEST signal to "request-sync"</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-06T10:06:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=66274db2be06c7d77d5188b97869a5d8aae1c5c8'/>
<id>66274db2be06c7d77d5188b97869a5d8aae1c5c8</id>
<content type='text'>
The response is blocking, which generally is rather ugly. Let's not fix
that now, but at least rename the signal so that it clearly points this
out.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The response is blocking, which generally is rather ugly. Let's not fix
that now, but at least rename the signal so that it clearly points this
out.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli/polkit: avoid G_DECLARE_FINAL_TYPE() in nm-polkit-listener.h</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-06T07:28:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=9eacd99330876b72310e7fd1f4b4c1de13e58088'/>
<id>9eacd99330876b72310e7fd1f4b4c1de13e58088</id>
<content type='text'>
G_DECLARE_FINAL_TYPE() is glib 2.44, while we currently still only require glib 2.40.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
G_DECLARE_FINAL_TYPE() is glib 2.44, while we currently still only require glib 2.40.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: fix returning EAGAIN from nm_utils_fd_read()</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-06T10:54:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0bbc7659af4ae0ca28904ce95b252718c6660f75'/>
<id>0bbc7659af4ae0ca28904ce95b252718c6660f75</id>
<content type='text'>
We cannot just swallow EAGAIN and pretend that not bytes were read.

read() returning zero means end of file. The caller needs to distinguish
between end of file and EAGAIN.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We cannot just swallow EAGAIN and pretend that not bytes were read.

read() returning zero means end of file. The caller needs to distinguish
between end of file and EAGAIN.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared/strbuf: fix signedness of integer comparison in nm_str_buf_append_printf()</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-09T11:23:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=fd81eeb1c007c969fb6dc224aa8fe7043f43b171'/>
<id>fd81eeb1c007c969fb6dc224aa8fe7043f43b171</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shared/strbuf: rename private, mutable fields in NMStrBuf structure</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-09T10:48:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=809487d1b693b5a515b0ee02028e8dee8841a192'/>
<id>809487d1b693b5a515b0ee02028e8dee8841a192</id>
<content type='text'>
NMStrBuf is not an opaque structure, so that we can allocate it on the
stack or embed it in a struct.

But most of the fields should not be touched outside of the
implementation.

Also, "len" and "allocated" fields may be accessed directly, but
they should not be modified.

Rename the fields to make that clearer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NMStrBuf is not an opaque structure, so that we can allocate it on the
stack or embed it in a struct.

But most of the fields should not be touched outside of the
implementation.

Also, "len" and "allocated" fields may be accessed directly, but
they should not be modified.

Rename the fields to make that clearer.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared/strbuf: add nm_str_buf_is_initalized() helper</title>
<updated>2020-04-09T19:51:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-04-06T13:28:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=cd51ea0ced42aceb00bab370bb98fce0b077a4a3'/>
<id>cd51ea0ced42aceb00bab370bb98fce0b077a4a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
