diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 12:01:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 12:01:37 +0000 |
commit | dcd7a5748ef6820e3e0d386139d9dd946f0d71fa (patch) | |
tree | 66900ada5e764c3422a91836695cdef113bbb883 /debian/patches-applied/pam_faillock_create_directory | |
parent | Adding upstream version 1.4.0. (diff) | |
download | pam-dcd7a5748ef6820e3e0d386139d9dd946f0d71fa.tar.xz pam-dcd7a5748ef6820e3e0d386139d9dd946f0d71fa.zip |
Adding debian version 1.4.0-9+deb11u1.debian/1.4.0-9+deb11u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-applied/pam_faillock_create_directory')
-rw-r--r-- | debian/patches-applied/pam_faillock_create_directory | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/patches-applied/pam_faillock_create_directory b/debian/patches-applied/pam_faillock_create_directory new file mode 100644 index 0000000..420e293 --- /dev/null +++ b/debian/patches-applied/pam_faillock_create_directory @@ -0,0 +1,31 @@ +commit d54870f993e97fe75e2cd0470a3701d5af22877c +Author: Changqing Li <changqing.li@windriver.com> +Date: Tue Jan 12 14:45:34 2021 +0800 + + faillock: create tallydir before creating tallyfile + + The default tallydir is "/var/run/faillock", and this default + tallydir may not exist. + + Function open may fail as tallydir does not exist when creating + the tallyfile. Therefore, faillock will not work well. + + Fix this problem by creating tallydir before creating tallyfile + when the tallydir does not exist. + + Signed-off-by: Changqing Li <changqing.li@windriver.com> + +Index: pam/modules/pam_faillock/faillock.c +=================================================================== +--- pam.orig/modules/pam_faillock/faillock.c ++++ pam/modules/pam_faillock/faillock.c +@@ -74,6 +74,9 @@ open_tally (const char *dir, const char + + if (create) { + flags |= O_CREAT; ++ if (access(dir, F_OK) != 0) { ++ mkdir(dir, 0755); ++ } + } + + fd = open(path, flags, 0600); |