From 62d6b56fd3b90f682c4272a8e7a139f2d7e3e6be Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 27 Feb 2023 23:13:30 +0100 Subject: [PATCH] plugins: only run pam_console_apply if available Signed-off-by: Joachim Wiberg --- plugins/x11-common.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/x11-common.c b/plugins/x11-common.c index f7a03e91..22a9a4ab 100644 --- a/plugins/x11-common.c +++ b/plugins/x11-common.c @@ -41,16 +41,13 @@ static void setup(void *arg) return; } - if (fexist("/var/run/console/console.lock")) + if (fexist("/var/run/console/console.lock") && which("pam_console_apply")) run("pam_console_apply", "pam-console"); } static plugin_t plugin = { .name = __FILE__, - .hook[HOOK_NETWORK_UP] = { - .cb = setup - }, - .depends = { "bootmisc", } + .hook[HOOK_SVC_PLUGIN] = { .cb = setup }, }; PLUGIN_INIT(plugin_init)