<feed xmlns='http://www.w3.org/2005/Atom'>
<title>swaylock/.git/comm.c, branch v1.8.1</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>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>
<entry>
<title>Move PAM into a child process</title>
<updated>2019-01-17T08:53:23+00:00</updated>
<author>
<name>emersion</name>
<email>contact@emersion.fr</email>
</author>
<published>2019-01-16T22:35:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=0c7932a3af97dd0416dc2156dc82dfe0b8e3951d'/>
<id>0c7932a3af97dd0416dc2156dc82dfe0b8e3951d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
