summaryrefslogtreecommitdiffstats
path: root/debian/patches-applied/pam_mkhomedir_stat_before_opendir
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:22:53 +0000
commitf4b22a2f215f6f80558d9e4075c9de306c8b9953 (patch)
tree05142dd668b11fc304d1c15faa52dee3784f8fa0 /debian/patches-applied/pam_mkhomedir_stat_before_opendir
parentAdding upstream version 1.5.2. (diff)
downloadpam-f4b22a2f215f6f80558d9e4075c9de306c8b9953.tar.xz
pam-f4b22a2f215f6f80558d9e4075c9de306c8b9953.zip
Adding debian version 1.5.2-6+deb12u1.debian/1.5.2-6+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-applied/pam_mkhomedir_stat_before_opendir')
-rw-r--r--debian/patches-applied/pam_mkhomedir_stat_before_opendir25
1 files changed, 25 insertions, 0 deletions
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..aec49b6
--- /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
+@@ -39,6 +39,7 @@
+ DIR *d;
+ struct dirent *dent;
+ int retval = PAM_SESSION_ERR;
++ struct stat stat_buf;
+
+ /* Create the new directory */
+ if (mkdir(dest, 0700) && errno != EEXIST)
+@@ -54,6 +55,12 @@
+ 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)