diff options
author | Per Jessen <per@jessen.ch> | 2022-04-22 18:15:36 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2022-06-30 20:59:39 +0000 |
commit | 42404548721c653317c911c83d885e2fc7fbca70 (patch) | |
tree | af3e4c4e2f38f7005880a6420b6fd5f88bc71f1a /modules/pam_faillock | |
parent | 543e122a80e25e9597cff418b837e214114bad1f (diff) | |
download | pam-42404548721c653317c911c83d885e2fc7fbca70.tar.gz pam-42404548721c653317c911c83d885e2fc7fbca70.tar.bz2 pam-42404548721c653317c911c83d885e2fc7fbca70.zip |
pam_motd: do not rely on all filesystems providing a filetype
When using scandir() to look for MOTD files to display, we wrongly
relied on all filesystems providing a filetype. This is a fix to divert
to lstat() when we have no filetype. To maintain MT safety, it isn't
possible to use lstat() in the scandir() filter function, so all of the
filtering has been moved to an additional loop after scanning all the
motd dirs.
Also, remove superfluous alphasort from scandir(), we are doing
a qsort() later.
Resolves: https://github.com/linux-pam/linux-pam/issues/455
Diffstat (limited to 'modules/pam_faillock')
0 files changed, 0 insertions, 0 deletions