diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-04-03 16:35:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-04-03 16:35:43 -0400 |
commit | 2963a9f79406c829d5fd710a2e8fe510ee83c006 (patch) | |
tree | 3857b91c4dcc6ccf2f6d02da5829f76890387f31 /src/thread/pthread_mutex_init.c | |
parent | 5e25d87b09d1dafc527833d9b4e9a6de99b79aab (diff) | |
download | musl-2963a9f79406c829d5fd710a2e8fe510ee83c006.tar.gz |
halt dynamic linker library search on errors resolving $ORIGIN in rpath
this change hardens the dynamic linker against the possibility of
loading the wrong library due to inability to expand $ORIGIN in rpath.
hard failures such as excessively long paths or absence of /proc (when
resolving /proc/self/exe for the main executable's origin) do not stop
the path search, but memory allocation failures and any other
potentially transient failures do.
to implement this change, the meaning of the return value of
fixup_rpath function is changed. returning zero no longer indicates
that the dso's rpath string pointer is non-null; instead, the caller
needs to check. a return value of -1 indicates a failure that should
stop further path search.
Diffstat (limited to 'src/thread/pthread_mutex_init.c')
0 files changed, 0 insertions, 0 deletions