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

Check for sys/auxv.h before using it. #59

Merged
merged 2 commits into from Mar 22, 2021

Conversation

pseiderer
Copy link
Contributor

  • fixes uclibc-ng compile (does not provide sys/auxv.h header file)

Fixes:

haveged.c:22:10: fatal error: sys/auxv.h: No such file or directory
22 | #include <sys/auxv.h>
| ^~~~~~~~~~~~

Signed-off-by: Peter Seiderer ps.report@gmx.net

pseiderer and others added 2 commits March 21, 2021 22:06
- fixes uclibc-ng compile (does not provide sys/auxv.h header file)

Fixes:

  haveged.c:22:10: fatal error: sys/auxv.h: No such file or directory
     22 | #include <sys/auxv.h>
        |          ^~~~~~~~~~~~

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
@jirka-h jirka-h merged commit c0ee36d into jirka-h:master Mar 22, 2021
@yann-morin-1998
Copy link

yann-morin-1998 commented Apr 4, 2021

I think this change is not completely correct.

As far as I can see, when built on uClibc without sys/auxv.h, then when haveged is called wihtout a full path and from an initrd (/etc/initrd-release exists), then path[0] will be set to / and then on line 527 we'd call /aveged.

This could happen for example when one is trying to debug their systemd-based initrd, or when one is dumped into a recovery systemd-based initrd and manually run haveged to try and get some entropy to restore ssh keys or such...

Of course, I may have missed a bigger picture here, but nonetheless, it looks like this is introducing a latent bug...

Thoughts?

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

Successfully merging this pull request may close these issues.

None yet

3 participants