summaryrefslogtreecommitdiff
path: root/sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch')
-rw-r--r--sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch b/sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch
new file mode 100644
index 000000000000..a0737b377bea
--- /dev/null
+++ b/sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/503424#c5
+https://sourceforge.net/p/pam-ssh/bugs/16/
+
+--- a/pam_ssh.c
++++ b/pam_ssh.c
+@@ -867,6 +867,7 @@
+ int attempt; /* No. of attempt to contact agent */
+ const char *user; /* username */
+ struct options options; /* PAM options */
++ struct stat sb; /* to check for existing .ssh */
+
+ #if HAVE_PAM_STRUCT_OPTIONS || !HAVE_PAM_STD_OPTION
+ memset(&options, 0, sizeof options);
+@@ -916,7 +917,7 @@
+ openpam_restore_cred(pamh);
+ return PAM_SERVICE_ERR;
+ }
+- if ((access(dotdir,F_OK)) == -1) {
++ if (stat(dotdir, &sb) == -1) {
+ pam_ssh_log(LOG_DEBUG, "inexistent configuration directory");
+ free(dotdir);
+ openpam_restore_cred(pamh);