Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libfido2 debug output is written to stderr #274

Open
mlelstv opened this issue Aug 20, 2022 · 1 comment
Open

libfido2 debug output is written to stderr #274

mlelstv opened this issue Aug 20, 2022 · 1 comment

Comments

@mlelstv
Copy link

mlelstv commented Aug 20, 2022

When you use the debug option, libfido2 is initialized with FIDO_DEBUG, which sends debug output to stderr by default. This is impractical, debug output should go wherever the PAM debug output is sent to.

This patch configures a log handler in libfido2 that redirects libfido2 debug output accordingly.

pam-u2f.diff.txt

@LDVG
Copy link
Contributor

LDVG commented Aug 30, 2022

Thank you for the patch!

While I would like to apply this, I'm a bit concerned at what happens when the application calls pam_end() and pam-u2f is unloaded. After this, if any other part of the program calls into libfido2, its log handler could be pointing to an unloaded function. To handle this safely, I believe we'd need a way of restoring libfido2's internal log handler (requiring changes to libfido2). Until that is possible, I think this will have to wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants