Commit graph

62 commits

Author SHA1 Message Date
Patrick Schleizer
142ea21189
fix 2025-05-21 12:42:16 -04:00
Patrick Schleizer
a969fa350e
fix 2025-05-21 12:40:27 -04:00
Patrick Schleizer
f023651c98
nounset 2025-05-21 12:35:37 -04:00
Patrick Schleizer
f086787464
fix 2025-05-21 12:35:23 -04:00
Patrick Schleizer
d7643954d1
minor 2025-05-21 12:33:50 -04:00
Patrick Schleizer
aa905fc887
further validation of output of faillock 2025-05-21 12:32:16 -04:00
Patrick Schleizer
92d3a36a0f
fix 2025-05-21 12:29:01 -04:00
Patrick Schleizer
2c1abb23e0
output 2025-05-21 12:26:46 -04:00
Patrick Schleizer
0801b96ae7
output 2025-05-21 12:25:49 -04:00
Patrick Schleizer
ef8515ba82
improve error handling 2025-05-21 12:23:45 -04:00
Patrick Schleizer
784867e24b
fix 2025-05-21 12:21:45 -04:00
Patrick Schleizer
e1bae1c68a
fix 2025-05-21 11:50:59 -04:00
Patrick Schleizer
353b6e83c5
test that wc is functional
https://github.com/Kicksecure/security-misc/pull/305#issuecomment-2892378246
2025-05-21 07:20:13 -04:00
Patrick Schleizer
5930e27052
pam-info: improve error handling
https://github.com/Kicksecure/security-misc/pull/305#issuecomment-2892378246
2025-05-21 07:05:25 -04:00
Patrick Schleizer
5c981e0891
pam-info: fix, consistently write errors and warnings to stderr 2025-05-21 06:55:09 -04:00
Patrick Schleizer
405880e63b
handle case of non-existence of /proc/cmdline 2025-05-18 06:44:42 -04:00
Patrick Schleizer
88235cc97b
refactoring 2025-05-18 06:44:04 -04:00
Patrick Schleizer
601ea77b00
end-of-options 2025-05-18 06:42:39 -04:00
Patrick Schleizer
d8feca1276
printf 2025-05-18 06:41:41 -04:00
Patrick Schleizer
7f2ba0980d
refactoring 2025-05-18 06:40:50 -04:00
DMHalford
91a76db66b
Prevent erroneous "Login blocked after [negative number] attempts" errors
For root, faillock appears to always* return an empty string (i.e. no table headers are present), yielding a zero-initialized pam_faillock_output_count and thus resulting in the calculation of a negative failed_login_counter value.

This can cause erroneous errors of the form "ERROR: Login blocked after [negative number] attempts" during sudo-ing and screen unlocking.

This commit modifies the initialization of failed_login_counter such that it cannot be negative and prevents the display of these incorrect warnings.

* Only rudimentary local tests were conducted
2025-05-15 15:42:50 -04:00
DMHalford
6c3be9ced0
Prevent erroneous "Login blocked after [negative number] attempts" errors
For root, faillock appears to always* return an empty string (i.e. no table headers are present), yielding a zero-initialized pam_faillock_output_count and thus resulting in the calculation of a negative failed_login_counter value.

This can cause erroneous errors of the form "ERROR: Login blocked after [negative number] attempts" during sudo-ing and screen unlocking.

This commit modifies the initialization of failed_login_counter such that it cannot be negative and prevents the display of these incorrect warnings.

* Only rudimentary tests were conducted
2025-05-15 15:06:10 -04:00
Patrick Schleizer
06e1e44b00
comments 2025-04-25 05:51:21 -04:00
Aaron Rainbolt
74ca63d12c
Mass-change "PERSISTENCE mode USERNAME" to "PERSISTENCE Mode - USERNAME Session" 2025-04-09 21:01:41 -05:00
Patrick Schleizer
39f4f5b607
comments 2025-04-08 06:53:08 -04:00
Patrick Schleizer
173606891a
output 2025-04-08 06:48:29 -04:00
Patrick Schleizer
7c150d116d
LANG=C str_replace: no longer requires LANG=C, therefore removed 2025-01-30 07:45:08 -05:00
Patrick Schleizer
33114f771a
copyright 2024-12-31 13:26:21 -05:00
Aaron Rainbolt
6602fb102d
Adjust pam-info messaging for sysmaint mode 2024-12-24 20:52:34 -06:00
Aaron Rainbolt
2f3a2bce77
Add warning about using non-sysmaint accounts in sysmaint mode 2024-12-20 11:04:22 -06:00
Patrick Schleizer
175b442d5b
use long option name 2024-12-19 05:56:50 -05:00
Aaron Rainbolt
9d69cd1912
Add sysmaint account lock detection 2024-12-18 21:34:37 -06:00
Patrick Schleizer
566cda5e4b
output 2024-10-21 05:47:38 -04:00
Patrick Schleizer
5991a23049
comment 2024-10-21 05:47:25 -04:00
Aaron Rainbolt
690e8dd826
Avoid faillock lock/tally reset on reboot or timeout 2024-10-19 23:52:51 -05:00
Patrick Schleizer
b6433309fd
use end-of-options 2024-10-18 12:45:02 -04:00
Raja Grewal
1bb843ec38
Update Copyright (C) to 2024 2024-05-11 13:18:36 +10:00
Raja Grewal
7a4212dd76
Update copyright 2023-03-30 17:08:47 +11:00
Patrick Schleizer
421f03ae9e
fix 2022-11-24 07:20:56 -05:00
Patrick Schleizer
a806c782d7
fix 2022-11-24 07:00:23 -05:00
Patrick Schleizer
39b35ef9ac
fix 2022-11-24 06:49:15 -05:00
Patrick Schleizer
d05c101721
debugging 2022-11-24 06:31:24 -05:00
Patrick Schleizer
497b5b4544
fix 2022-11-24 06:14:04 -05:00
Patrick Schleizer
e5255a630a
pam-info: support non-root environments (such as during graphical display manager login and xscreensaver) 2022-11-22 05:57:30 -05:00
Patrick Schleizer
09e6af5c08
pam-info refactoring 2022-11-16 02:01:23 -05:00
Patrick Schleizer
caf0099064
pam-info refactoring 2022-11-16 02:00:32 -05:00
Patrick Schleizer
487f63bb01
comment 2022-11-16 01:56:01 -05:00
Patrick Schleizer
f59f959a8d
pam-info fix 2022-11-16 01:55:14 -05:00
Patrick Schleizer
ae113442a1
pam-info refactoring 2022-11-16 01:49:45 -05:00
Patrick Schleizer
bb6b509d06
pam-info refactoring 2022-11-16 01:44:21 -05:00