Page MenuHomeFreeBSD

Fix AT_EXECPATH for direct exec mode.
ClosedPublic

Authored by kib on Dec 20 2019, 10:12 PM.

Details

Summary

The somewhat problematic case is when the executable path is relative and either $PATH use is not enabled or it contains '/' so $PATH search is not performed. In this case AT_EXECPATH is relative, I might fix this later.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib created this revision.Dec 20 2019, 10:12 PM
rstone added inline comments.Dec 21 2019, 2:57 AM
libexec/rtld-elf/rtld.c
510 ↗(On Diff #65874)

Testing has shown that aux_info[AT_EXECPATH] is not guaranteed to be non-NULL

kib updated this revision to Diff 65889.Dec 21 2019, 10:38 AM
kib marked an inline comment as done.

Handle a case when AT_EXECPATH is not present in auxv.
Add XXX comments.

kib updated this revision to Diff 65891.Dec 21 2019, 2:53 PM

Remove pointless reassignment.

rstone accepted this revision.Jan 2 2020, 5:13 PM
This revision is now accepted and ready to land.Jan 2 2020, 5:13 PM
This revision was automatically updated to reflect the committed changes.