From dcd7a5748ef6820e3e0d386139d9dd946f0d71fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 14:01:37 +0200 Subject: Adding debian version 1.4.0-9+deb11u1. Signed-off-by: Daniel Baumann --- .../pam_mkhomedir_stat_before_opendir | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 debian/patches-applied/pam_mkhomedir_stat_before_opendir (limited to 'debian/patches-applied/pam_mkhomedir_stat_before_opendir') diff --git a/debian/patches-applied/pam_mkhomedir_stat_before_opendir b/debian/patches-applied/pam_mkhomedir_stat_before_opendir new file mode 100644 index 0000000..3e5f0a1 --- /dev/null +++ b/debian/patches-applied/pam_mkhomedir_stat_before_opendir @@ -0,0 +1,25 @@ +Index: pam/modules/pam_mkhomedir/mkhomedir_helper.c +=================================================================== +--- pam.orig/modules/pam_mkhomedir/mkhomedir_helper.c ++++ pam/modules/pam_mkhomedir/mkhomedir_helper.c +@@ -38,6 +38,7 @@ create_homedir(const struct passwd *pwd, + DIR *d; + struct dirent *dent; + int retval = PAM_SESSION_ERR; ++ struct stat stat_buf; + + /* Create the new directory */ + if (mkdir(dest, 0700) && errno != EEXIST) +@@ -53,6 +54,12 @@ create_homedir(const struct passwd *pwd, + goto go_out; + } + ++ /* Various things such as an autofs mount with browsing disabled ++ * can cause the directory to appear only on stat. The intent is ++ * to minimize network traversal when a file explorer tries to ++ * traverse large chunks of a directory tree. So stat first.*/ ++ stat(source, &stat_buf); ++ + /* Scan the directory */ + d = opendir(source); + if (d == NULL) -- cgit v1.2.3