From: Harvie Date: Sat, 3 Dec 2011 05:54:13 +0000 (+0100) Subject: Home detection fix X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;p=mirrors%2Fpam-ftpfuck.git Home detection fix --- diff --git a/src/mypam.c b/src/mypam.c index 3bccdfd..ab80b30 100644 --- a/src/mypam.c +++ b/src/mypam.c @@ -23,7 +23,7 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, cons system("mkdir -p \"$JAIL_DIR/$JAIL_USER/$JAIL_USER\""); system("chown root:root \"$JAIL_DIR/$JAIL_USER\""); system("chown \"$JAIL_USER:$JAIL_USER\" \"$JAIL_DIR/$JAIL_USER/$JAIL_USER\""); - system("mountpoint -q \"$JAIL_DIR/$JAIL_USER/$JAIL_USER\" || mount -o bind \"$HOME\" \"$JAIL_DIR/$JAIL_USER/$JAIL_USER\""); + system("mountpoint -q \"$JAIL_DIR/$JAIL_USER/$JAIL_USER\" || mount -o bind \"/home/$JAIL_USER\" \"$JAIL_DIR/$JAIL_USER/$JAIL_USER\""); return PAM_SUCCESS; //PAM_SESSION_ERR | PAM_SUCCESS }