<feed xmlns='http://www.w3.org/2005/Atom'>
<title>swaylock/.git/password.c, branch v1.7.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>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>Delete whole utf8 character on backspace</title>
<updated>2022-03-22T21:11:27+00:00</updated>
<author>
<name>Johan Malm</name>
<email>jgm323@gmail.com</email>
</author>
<published>2022-03-20T20:59:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=11030b73509f698973f81c0cd7b8d6c83598d867'/>
<id>11030b73509f698973f81c0cd7b8d6c83598d867</id>
<content type='text'>
...rather than just the last byte of the password buffer.

Demostrate the need for this by taking the following steps:
- Apply the patch below (before this commit).
- Set keyboard layout to one where utf8 characters longer than one byte
  can be obtained, for example åäö using Swedish layout
  (XKB_DEFAULT_LAYOUT=se).
- Type "åäö" then press backspace and observe that it takes two
  backspaces to delete each character fully, and therefore six
  backspaces to fully clear the password buffer.

diff --git a/password.c b/password.c
index e1a1d9a..b640cd3 100644
--- a/password.c
+++ b/password.c
@@ -29,6 +29,7 @@ void clear_password_buffer(struct swaylock_password *pw) {
 static bool backspace(struct swaylock_password *pw) {
 	if (pw-&gt;len != 0) {
 		pw-&gt;buffer[--pw-&gt;len] = 0;
+		fprintf(stderr, "%s\n", pw-&gt;buffer);
 		return true;
 	}
 	return false;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...rather than just the last byte of the password buffer.

Demostrate the need for this by taking the following steps:
- Apply the patch below (before this commit).
- Set keyboard layout to one where utf8 characters longer than one byte
  can be obtained, for example åäö using Swedish layout
  (XKB_DEFAULT_LAYOUT=se).
- Type "åäö" then press backspace and observe that it takes two
  backspaces to delete each character fully, and therefore six
  backspaces to fully clear the password buffer.

diff --git a/password.c b/password.c
index e1a1d9a..b640cd3 100644
--- a/password.c
+++ b/password.c
@@ -29,6 +29,7 @@ void clear_password_buffer(struct swaylock_password *pw) {
 static bool backspace(struct swaylock_password *pw) {
 	if (pw-&gt;len != 0) {
 		pw-&gt;buffer[--pw-&gt;len] = 0;
+		fprintf(stderr, "%s\n", pw-&gt;buffer);
 		return true;
 	}
 	return false;
</pre>
</div>
</content>
</entry>
<entry>
<title>Submit password by pressing Ctrl+m</title>
<updated>2019-08-15T15:47:27+00:00</updated>
<author>
<name>HardDie</name>
<email>oleg1995sysoev@yandex.ru</email>
</author>
<published>2019-08-15T13:17:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=ba31e2eaee6a08514a449916491f9a446e745770'/>
<id>ba31e2eaee6a08514a449916491f9a446e745770</id>
<content type='text'>
As it work in emacs style console</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As it work in emacs style console</pre>
</div>
</content>
</entry>
<entry>
<title>Submit password by pressing Ctrl+m (close #75)</title>
<updated>2019-04-29T14:37:47+00:00</updated>
<author>
<name>Gabriel Sanches</name>
<email>g@lonemaker.com</email>
</author>
<published>2019-04-29T14:10:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=84bfc6c7edf1465096f6663c6d931981bd924280'/>
<id>84bfc6c7edf1465096f6663c6d931981bd924280</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>
<entry>
<title>Implement logging and remove wlroots dependency</title>
<updated>2019-01-15T04:30:54+00:00</updated>
<author>
<name>Brian Ashworth</name>
<email>bosrsf04@gmail.com</email>
</author>
<published>2019-01-15T04:30:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=e3935ad1431623b5e3966e95cd75b45e7e00e278'/>
<id>e3935ad1431623b5e3966e95cd75b45e7e00e278</id>
<content type='text'>
This implements a simpler version of the wlroots logger for swaylock.
With this logger, the dependency on wlroots can be dropped. This also
adds a debug flag and disables debugging output by default
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements a simpler version of the wlroots logger for swaylock.
With this logger, the dependency on wlroots can be dropped. This also
adds a debug flag and disables debugging output by default
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert swaylock into standalone project</title>
<updated>2019-01-14T02:16:47+00:00</updated>
<author>
<name>Drew DeVault</name>
<email>sir@cmpwn.com</email>
</author>
<published>2019-01-14T02:15:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=b90637e2a6e854d586b977ed9b80b806edeb12dd'/>
<id>b90637e2a6e854d586b977ed9b80b806edeb12dd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>swaylock: Fix caps lock not updating immediately</title>
<updated>2019-01-02T22:28:14+00:00</updated>
<author>
<name>Oscar Cowdery Lack</name>
<email>oscar.cowderylack@gmail.com</email>
</author>
<published>2019-01-02T22:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=aae74613c6650a69ffa52f8f65a76d45edc66998'/>
<id>aae74613c6650a69ffa52f8f65a76d45edc66998</id>
<content type='text'>
Partially fixes #2788. This change makes it so the lock screen is
redrawn whenever the caps lock modifier state changes, rather
on relying on the keypress event. This didn't work because
caps lock is disabled when the key is released, not pressed,
so the caps lock indicator does not go away until the next
keypress event.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partially fixes #2788. This change makes it so the lock screen is
redrawn whenever the caps lock modifier state changes, rather
on relying on the keypress event. This didn't work because
caps lock is disabled when the key is released, not pressed,
so the caps lock indicator does not go away until the next
keypress event.
</pre>
</div>
</content>
</entry>
<entry>
<title>swaylock: Submit password on Ctrl-D</title>
<updated>2018-12-23T11:08:03+00:00</updated>
<author>
<name>Milkey Mouse</name>
<email>milkeymouse@meme.institute</email>
</author>
<published>2018-12-20T20:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=51838df9162fc3173538187c2b12f31fc35dcfb1'/>
<id>51838df9162fc3173538187c2b12f31fc35dcfb1</id>
<content type='text'>
Ctrl-D functions as EOF in most cases on the terminal. login(1) &amp; many other
programs check the password on EOF, same as Enter. To make behavior consistent,
have swaylock submit the password on Ctrl-D.

This commit moves the handling for Enter into its own static function, which is
now also called on Ctrl-D.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ctrl-D functions as EOF in most cases on the terminal. login(1) &amp; many other
programs check the password on EOF, same as Enter. To make behavior consistent,
have swaylock submit the password on Ctrl-D.

This commit moves the handling for Enter into its own static function, which is
now also called on Ctrl-D.
</pre>
</div>
</content>
</entry>
</feed>
