Bug #1404
closedMKDIR_P may not work correctly
0%
Description
lttng-ust/doc/examples/Makefile.am uses MKDIR_P
in a way that may (and does) fail under certain circumstances.
TL;DR: MKDIR_P
may be a relative path, doesn't work if you do cd
someplace else before using it.
The in-the-wild manifestation of this fallout scenario can be found e.g. here: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/54727
The story begins in autoconf that misdetects busybox mkdir
as a suitable MKDIR_P
: https://savannah.gnu.org/support/index.php?110971
When no suitable mkdir is found, autoconf uses its own install-sh
, but it sets MKDIR_P
to a relative path, adding more dot-dot segments as it walks down the source tree.
When lttng-ust/doc/examples/Makefile.am uses MKDIR_P
it does it in a "wrong" directory and that relative path for MKDIR_P
is invalid:
http://git.lttng.org/?p=lttng-ust.git;a=blob;f=doc/examples/Makefile.am;h=727aa7ceb5ab065651f69449834d87adaea50af6;hb=HEAD#l216