diff options
author | Bastien Nocera <hadess@hadess.net> | 2020-01-28 12:08:45 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2020-02-04 14:01:29 +0100 |
commit | 18d4aa6d7d8dcd0128416e4f47f337b9f40da44e (patch) | |
tree | da2d43e2ac1c874dbcad76e6f7163b13de8051a0 /pam | |
parent | 046ec8dbf4f038b3bf573ffc0215d86b38873909 (diff) |
pam: Use systemd to check whether a session is remote
Closes: #3
Diffstat (limited to 'pam')
-rw-r--r-- | pam/pam_fprintd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c index 82d191d..7423a09 100644 --- a/pam/pam_fprintd.c +++ b/pam/pam_fprintd.c @@ -32,6 +32,7 @@ #include <libintl.h> #include <systemd/sd-bus.h> +#include <systemd/sd-login.h> #define PAM_SM_AUTH #include <security/pam_modules.h> @@ -604,6 +605,9 @@ is_remote (pam_handle_t *pamh) return true; } + if (sd_session_is_remote (NULL) > 0) + return true; + return false; } |