From 0c7932a3af97dd0416dc2156dc82dfe0b8e3951d Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 16 Jan 2019 23:35:14 +0100 Subject: Move PAM into a child process --- include/comm.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 include/comm.h (limited to 'include/comm.h') diff --git a/include/comm.h b/include/comm.h new file mode 100644 index 0000000..8d3ff09 --- /dev/null +++ b/include/comm.h @@ -0,0 +1,8 @@ +#ifndef _SWAYLOCK_COMM_H +#define _SWAYLOCK_COMM_H + +bool spawn_comm_child(void); +ssize_t read_comm_request(char **buf_ptr); +bool write_comm_reply(bool success); + +#endif -- cgit v1.2.3 From c77f0eb4ed6af1fad071be0113b3822b96b561aa Mon Sep 17 00:00:00 2001 From: emersion Date: Thu, 17 Jan 2019 12:42:13 +0100 Subject: Check password without blocking --- include/comm.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/comm.h') diff --git a/include/comm.h b/include/comm.h index 8d3ff09..defc2f4 100644 --- a/include/comm.h +++ b/include/comm.h @@ -1,8 +1,18 @@ #ifndef _SWAYLOCK_COMM_H #define _SWAYLOCK_COMM_H +#include + +struct swaylock_password; + bool spawn_comm_child(void); ssize_t read_comm_request(char **buf_ptr); bool write_comm_reply(bool success); +// Requests the provided password to be checked. The password is always cleared +// when the function returns. +bool write_comm_request(struct swaylock_password *pw); +bool read_comm_reply(void); +// FD to poll for password authentication replies. +int get_comm_reply_fd(void); #endif -- cgit v1.2.3