From 3edc7b4e0b2c54b15fcf2aedd4629f16639a4151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 30 Apr 2003 00:40:24 +0000 Subject: [PATCH] Set $HOME to the correct directory (within the chroot tree). --- lib/libpam/modules/pam_chroot/pam_chroot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpam/modules/pam_chroot/pam_chroot.c b/lib/libpam/modules/pam_chroot/pam_chroot.c index 5a467b5f8c2d..447e5f78dd10 100644 --- a/lib/libpam/modules/pam_chroot/pam_chroot.c +++ b/lib/libpam/modules/pam_chroot/pam_chroot.c @@ -94,6 +94,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags __unused, openpam_log(PAM_LOG_ERROR, "chdir(): %m"); return (PAM_SESSION_ERR); } + pam_setenv(pamh, "HOME", cwd, 1); return (PAM_SUCCESS); }