Page MenuHomeFreeBSD

Fix AT_EXECPATH for direct exec mode.
ClosedPublic

Authored by kib on Dec 20 2019, 10:12 PM.
Tags
None
Referenced Files
F151263142: D22894.id65889.diff
Tue, Apr 7, 4:47 AM
F151234849: D22894.id65891.diff
Tue, Apr 7, 12:58 AM
F151234837: D22894.id65891.diff
Tue, Apr 7, 12:58 AM
F151234811: D22894.id65891.diff
Tue, Apr 7, 12:58 AM
F151199562: D22894.id65889.diff
Mon, Apr 6, 6:58 PM
Unknown Object (File)
Sat, Apr 4, 5:00 PM
Unknown Object (File)
Sat, Apr 4, 2:43 PM
Unknown Object (File)
Fri, Apr 3, 4:08 AM
Subscribers

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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 marked an inline comment as done.

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

Remove pointless reassignment.

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.