OSDN Git Service

ldso: preload standard path library with setuid bit set
authorFilippo Arcidiacono <filippo.arcidiacono@st.com>
Wed, 30 May 2012 15:11:12 +0000 (17:11 +0200)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 6 Jun 2012 07:31:36 +0000 (09:31 +0200)
commitda117419bdb39a4cb5035ebba46379f7c48738b3
tree99c94543830bef45bf8ee047950b25001b0495b2
parent8554fb21bb34329201b38c2ae4387fb6f00645cc
ldso: preload standard path library with setuid bit set

For set-user-ID/set-group-ID ELF binaries, only libraries in the standard
search directories that are also set-user-ID must be loaded.
This patch fixes existing logic according to the above statement.
Furthermore if either library setuid bit isn't set or it cannot be found in
the standard search path, the library won't be preloaded but execution go
ahead with default one.

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
ldso/ldso/ldso.c