-
Notifications
You must be signed in to change notification settings - Fork 277
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
v1.6.0: pam_env test always crashes in pam_open_session() #738
Comments
There shouldn't be any pam modules or pam config files loaded from the running system. |
Could it be something related to --enable-econf configuration? We don't test this in CI yet because it needs libeconf >= 0.5.0. |
It's my first assumption as well. The |
That was our assumption first, too, but disabling libeconf did not change the picture. |
Does it happen with other tests as well? I mean, did you try to disable the test and let others run, too? |
Also, tst-pam_env-retval.c was already present in v1.5.3. |
In v1.5.3 it worked |
Tried to reproduce locally,
doesn't show any attempts to access system pam files. |
Can reproduce it. Not sure if this is how it happened, though:
Since VENDORDIR is set, the supposedly non-existing file is parsed. This leads to a successful pam_open_session which in turn makes the test fail. |
Copying lt-tst-pam_env-retval.c from 1.5.3 to 1.6.0 let the test suite pass. Ok, to make the thing complicated:
So there are two bugs, one with libeconf support in pam_env and a second one with current toolchain? |
This fit's with my strace, that files from the system and the build directory are mixed up. |
It cannot be an explanation though, because 1.5.3 fails with my instructions as well... |
I don't have a reproducer yet, but I think I can fix the !USE_ECONF case. |
* modules/pam_env/pam_env.c (_parse_config_file) [!USE_ECONF && VENDOR_DEFAULT_CONF_FILE]: Do not fallback to vendor pam_env.conf file if the config file is specified via module arguments. Link: #738 Fixes: v1.5.3~69 ("pam_env: Use vendor specific pam_env.conf and environment as fallback")
* modules/pam_env/pam_env.c (_parse_config_file) [!USE_ECONF && VENDOR_DEFAULT_CONF_FILE]: Do not fallback to vendor pam_env.conf file if the config file is specified via module arguments. Link: #738 Fixes: v1.5.3~69 ("pam_env: Use vendor specific pam_env.conf and environment as fallback")
Finally. My build fails now with a clean econf build, i.e. no additional configuration options. Time to investigate. It's a current Linux From Scratch amd64 system with libeconf master on github. Using the test from 1.5.3 fixes it. |
The econf code does not remove escaped newlines. We have added a test for this in 1.6.0.
instead of the expected
|
In other words, since the introduction of libeconf support in pam_env by commit 6135c45 pam_env parses its config files differently depending on whether libeconf support is enabled, but we noticed this only when the test for this difference was added in v1.6.0. |
Yes. I don't know if our previous fixes and my latest PR will fix ALL cases, but this one is definitely based on different behaviours between the libeconf line parser and our parser. |
I added now PR#739, PR#740 and PR#741 to our package and it passes now all tests. |
Regression compared to 1.5.3.
We see on all builds that
make check
crashes in tst-pam_env-retval:It is always in
pam_open_session()
, but not always the same call to it. strace shows a wired mix of loading modules, libraries and config files from the running system and from the build system.The text was updated successfully, but these errors were encountered: