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

Do not run (or allow to disable) motd updates in non-interactive sessions #452

Open
cpaelzer opened this issue Apr 6, 2022 · 0 comments
Labels

Comments

@cpaelzer
Copy link

cpaelzer commented Apr 6, 2022

Hi,
we love the pam_motd feature that was discussed and implmented as part of #47.
It is in heavy use in Ubuntu, so heavy that I recently had to cut down some of the things executed a bit to not slow down login too much :-)
Now everything is either fast or caches results as recommended which is much better, but not perfect.

Out of working on that bug a question came up which is: "Wouldn't it be better to not execute (or make if configurable to behave that way) those motd scripts at all if the login that is processed by pam is non-interactive?"
After all within a non-interactive session we can assume that there will be nobody that is able to consume/perceive the messages that we generate.

I see a few checks for interactivity in conf/pam_conv1/pam_conv_l.c and doc/specs/parse_l.c but none seems directly applicable/reusable for modules/pam_motd/pam_motd.c. Due to that and since I wasn't sure how the stance to this would be in general I didn't yet try to implement it yet. Instead filed this issue to check how you all generally think about it and if there might be any suggestions how/where to best implement it.

P.S. If I'm just failing to see a little tweak to pam.conf* that would already make it behave that way I'm equally happy to learn about that instead :-)

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

No branches or pull requests

2 participants