<feed xmlns='http://www.w3.org/2005/Atom'>
<title>swaylock/.git/comm.c, branch v1.8.5</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/'/>
<entry>
<title>fix missing include for sigaction</title>
<updated>2025-08-09T07:08:53+00:00</updated>
<author>
<name>Łukasz P. Michalik</name>
<email>lpmichalik@googlemail.com</email>
</author>
<published>2025-08-09T06:51:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=c48320819613e81a09e0481aaa2b92c93fba0d73'/>
<id>c48320819613e81a09e0481aaa2b92c93fba0d73</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Ignore SIGUSR1 in the backend child process</title>
<updated>2025-04-27T16:30:04+00:00</updated>
<author>
<name>Kenny Levinsen</name>
<email>kl@kl.wtf</email>
</author>
<published>2025-04-27T16:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=ae8011a3548f32980af9e915189b1d48f019f77f'/>
<id>ae8011a3548f32980af9e915189b1d48f019f77f</id>
<content type='text'>
If a user calls `killall -USR1 swaylock`, they may end up signalling the
password backend. As the password backend forked before SIGUSR1 handling
was set up, it inherits the default handler and terminates.

Set the SIGUSR1 handler to SIG_IGN in the child process.

Fixes: https://github.com/swaywm/swaylock/issues/409
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a user calls `killall -USR1 swaylock`, they may end up signalling the
password backend. As the password backend forked before SIGUSR1 handling
was set up, it inherits the default handler and terminates.

Set the SIGUSR1 handler to SIG_IGN in the child process.

Fixes: https://github.com/swaywm/swaylock/issues/409
</pre>
</div>
</content>
</entry>
<entry>
<title>comm: assert that password size is positive</title>
<updated>2025-03-21T21:31:38+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-21T00:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=9f70dd4ca6b0942b83202c9e81eebf0547bdccad'/>
<id>9f70dd4ca6b0942b83202c9e81eebf0547bdccad</id>
<content type='text'>
If it's not, we may be reading before the buffer bounds later.
(The password buffer size is aligned to the page size.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If it's not, we may be reading before the buffer bounds later.
(The password buffer size is aligned to the page size.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Assert that password buffer is NULL-terminated</title>
<updated>2025-03-18T21:31:44+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-12T07:36:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=429e860a37daf096a136c5ae5d28271aaf99b6ac'/>
<id>429e860a37daf096a136c5ae5d28271aaf99b6ac</id>
<content type='text'>
read_comm_request() just copies bytes around. handle_conversation()
relies on the fact that the password buffer is NULL-terminated.
Make sure that's the case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
read_comm_request() just copies bytes around. handle_conversation()
relies on the fact that the password buffer is NULL-terminated.
Make sure that's the case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "comm: improve robustness"</title>
<updated>2025-03-16T16:49:49+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-15T00:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=3415a7c9c10e6f5dace06cd222edd825e41e771d'/>
<id>3415a7c9c10e6f5dace06cd222edd825e41e771d</id>
<content type='text'>
This reverts commit e0ca5adecd0b0f89f20322c9b410b460e8f73c5b.

See 285d0292914b ("comm: improve robustness") for details.

Also add EINTR handling.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e0ca5adecd0b0f89f20322c9b410b460e8f73c5b.

See 285d0292914b ("comm: improve robustness") for details.

Also add EINTR handling.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "comm: improve robustness"</title>
<updated>2025-03-15T00:12:50+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-15T00:12:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=e0ca5adecd0b0f89f20322c9b410b460e8f73c5b'/>
<id>e0ca5adecd0b0f89f20322c9b410b460e8f73c5b</id>
<content type='text'>
This reverts commit 285d0292914bf6361a1a32ce1561a6d3fb6ebeca.

This got accidentally pushed to master.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 285d0292914bf6361a1a32ce1561a6d3fb6ebeca.

This got accidentally pushed to master.
</pre>
</div>
</content>
</entry>
<entry>
<title>comm: improve robustness</title>
<updated>2025-03-14T22:49:37+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-14T22:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=285d0292914bf6361a1a32ce1561a6d3fb6ebeca'/>
<id>285d0292914bf6361a1a32ce1561a6d3fb6ebeca</id>
<content type='text'>
swaylock was performing some read() calls with a &gt;1 size and didn't
handle partial reads. Fix this by introducing two helpers, read_full()
and write_full(), to read/write a complete buffer.

read_comm_request() needs to make the difference between EOF at the
start of a message vs. in the middle, so needs to return a tri-state.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
swaylock was performing some read() calls with a &gt;1 size and didn't
handle partial reads. Fix this by introducing two helpers, read_full()
and write_full(), to read/write a complete buffer.

read_comm_request() needs to make the difference between EOF at the
start of a message vs. in the middle, so needs to return a tri-state.
</pre>
</div>
</content>
</entry>
<entry>
<title>Better handle subprocess crashes</title>
<updated>2025-03-12T10:17:13+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-12T00:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=34e0aabc51074a2476d27148c4f755d558da3ec9'/>
<id>34e0aabc51074a2476d27148c4f755d558da3ec9</id>
<content type='text'>
On my machine EOF doesn't trigger POLLHUP (not sure why), instead
read() returns zero. It just prints the following message in a
loop:

    [comm.c:101] Failed to read pw result: Success

Better handle this case in read_comm_reply() by making a difference
between a failed read() and a failed authentication.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On my machine EOF doesn't trigger POLLHUP (not sure why), instead
read() returns zero. It just prints the following message in a
loop:

    [comm.c:101] Failed to read pw result: Success

Better handle this case in read_comm_reply() by making a difference
between a failed read() and a failed authentication.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use mlock for password buffer</title>
<updated>2022-06-15T08:49:32+00:00</updated>
<author>
<name>Robin Ebert</name>
<email>ebertrobin2002@gmail.com</email>
</author>
<published>2022-05-30T09:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=bdeb891378bfcb2dc79de41cfeb6a62807d09b20'/>
<id>bdeb891378bfcb2dc79de41cfeb6a62807d09b20</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check password without blocking</title>
<updated>2019-01-17T11:42:13+00:00</updated>
<author>
<name>emersion</name>
<email>contact@emersion.fr</email>
</author>
<published>2019-01-17T11:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=c77f0eb4ed6af1fad071be0113b3822b96b561aa'/>
<id>c77f0eb4ed6af1fad071be0113b3822b96b561aa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
