You are not logged in.

#1 2019-06-11 13:54:06

miomio
Member
Registered: 2016-01-17
Posts: 167

Did someone press my keyboard while xsecurelock'd?

Using xsecurelock here and not sure if I'm just looking at a false +ve or whether I should be setting up motion detection on my webcam, but if you run xsecurelock like I do by a bash alias then when you unlock you'll be able to see output in the terminal such as:

2019-06-11T13:42:57Z 16691 xsecurelock: AUTH_TIMEOUT hit.
2019-06-11T13:42:57Z 16691 xsecurelock: authproto child failed with status 1.
2019-06-11T13:42:57Z 16679 xsecurelock: auth child failed with status 1.
User defined signal 1
User defined signal 1
User defined signal 1

^Which happens when a key has been pressed, the password prompt has displayed, and no password has been entered before the xsecurelock timeout (XSECURELOCK_AUTH_TIMEOUT).

However, the other evening I noticed the following output:

2019-06-11T13:44:53Z 16746 xsecurelock: authproto child failed with status 1.
2019-06-11T13:44:53Z 16734 xsecurelock: auth child failed with status 1.
User defined signal 1
User defined signal 1
User defined signal 1

Obviously ignore the time shown here as I'm just replicating it, but notice how there is no AUTH_TIMEOUT message. I put this down to a "meh", but it was nagging me and turns out you can replicate this by pressing a key, waiting for the prompt, then hitting escape key before the timeout kicks in.

Is this somebody accidentally hitting my keyboard or can this be triggered by an erroneous system-level process?

Last edited by miomio (2019-06-11 13:55:06)

Offline

#2 2019-06-11 15:41:32

seth
Member
Registered: 2012-09-03
Posts: 51,055

Re: Did someone press my keyboard while xsecurelock'd?

You could try whether a scheduled "xdotool key a" triggers this, but if xsecurelock watches regular xinput events, it cannot separate between HW keys and events generated through the xtest extension (what some media player might do in order to prevent screensavers)

Offline

#3 2019-06-11 16:07:14

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: Did someone press my keyboard while xsecurelock'd?

seth wrote:

but if xsecurelock watches regular xinput events, it cannot separate between HW keys and events generated through the xtest extension (what some media player might do in order to prevent screensavers)

Could this be determined from journal log?

Offline

#4 2019-06-11 16:56:22

seth
Member
Registered: 2012-09-03
Posts: 51,055

Re: Did someone press my keyboard while xsecurelock'd?

Not if the client (iff any) doesn't log "I'm now gonna fake a keypress. I'm now gonna fake a keypress. I'm now gonna fake a keypress…" to the journal.
You could run showkey/evtest etc. next to future xsecurelock to see whether any events arrive on a lower level.

Offline

#5 2019-06-11 19:59:37

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: Did someone press my keyboard while xsecurelock'd?

Turns out the xdotool can replicate:

2019-06-11T13:44:53Z 16746 xsecurelock: authproto child failed with status 1.
2019-06-11T13:44:53Z 16734 xsecurelock: auth child failed with status 1.
User defined signal 1
User defined signal 1
User defined signal 1

With a `sleep 15 && xdotool key a && sleep 2 && xdotool key Escape`, but not without including at least two key presses where the last is Escape otherwise xsecurelock registers the press and waits for user input which triggers timeout which gives the `AUTH_TIMEOUT hit` line.

How does that add to your first reply?

Offline

#6 2019-06-11 20:12:54

seth
Member
Registered: 2012-09-03
Posts: 51,055

Re: Did someone press my keyboard while xsecurelock'd?

Means it's still possible but unlikely that this is some automated synthetic event.
Sounds more like somebody woke the terminal, encountered a locked screen (screensaver?) and tried to quit that.
I highly doubt that there's a great desire for any benign client to fire synthetic escape keys, which because of their specific meaning could cause all sorts of havoc.

Offline

#7 2019-06-13 13:02:14

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: Did someone press my keyboard while xsecurelock'd?

I use a bluetooth mouse which means there's a USB dongle in the machine. Perhaps the dongle picked up a "rogue" packet from a neighbour (as might happen if neighbour uses bluetooth for any appliances in their home) ?

Offline

#8 2019-06-13 13:08:56

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,978
Website

Re: Did someone press my keyboard while xsecurelock'd?

@miomio
Do you, by any chance, have a cat?


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#9 2019-06-13 14:06:42

seth
Member
Registered: 2012-09-03
Posts: 51,055

Re: Did someone press my keyboard while xsecurelock'd?

The problem with the BT & cat theory is the escape key - chances that happened randomly (unless it also works for hundreds of random inputs where escape is randomly among them, not necessarily the last one) are rather low.

Offline

Board footer

Powered by FluxBB