-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open file handlers manually using open() and fdopen() instead of usin…
…g fopen() A previous commit (d51124e) added the `e` flag to the `fopen()` calls. However this flag is not supported on all platforms (MacOS) and will be silently dropped (see #145). This patch works around those issues by manually opening the file descriptor using `open()` with the `O_CLOEXEC` flag, and invoking `fd_open()` on the resulting file descriptor to open an appropriate `FILE` stream. This makes sure that all files used by pam_yubico will be opened with the `O_CLOEXEC` flag on all supported platforms to mitigate issues with missing `fclose()` invocation (see #136).
- Loading branch information
Showing
3 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters