From 290a34482d37a1bdd6f0c6f2dc28b4c1a5989293 Mon Sep 17 00:00:00 2001 From: Grzegorz Blach Date: Sat, 10 Sep 2016 23:42:27 +0200 Subject: [PATCH] Set PAM_USER to 'root' --- please.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/please.c b/please.c index 0aeb8d5..ebc069a 100644 --- a/please.c +++ b/please.c @@ -52,6 +52,9 @@ int authenticate() pam_err = pam_start("please", username, &pamc, &pamh); PAM_RETURN_ON_FAILURE; + pam_err = pam_set_item(pamh, PAM_USER, "root"); + PAM_RETURN_ON_FAILURE; + pam_err = pam_set_item(pamh, PAM_RUSER, username); PAM_RETURN_ON_FAILURE;