14 lines
526 B
Diff
14 lines
526 B
Diff
diff -up Linux-PAM-1.3.1/modules/pam_faillock/faillock.c.faillock-create-tallydir Linux-PAM-1.3.1/modules/pam_faillock/faillock.c
|
|
--- Linux-PAM-1.3.1/modules/pam_faillock/faillock.c.faillock-create-tallydir 2024-01-08 11:32:02.122392119 +0100
|
|
+++ Linux-PAM-1.3.1/modules/pam_faillock/faillock.c 2024-01-08 11:33:10.916515943 +0100
|
|
@@ -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);
|