mirror of https://github.com/proot-me/proot.git
When executed by the root user, skip tests that assume no privileges.
Reported-by: Rémi Duraffort <remi.duraffort@st.com>
This commit is contained in:
parent
437b4880cc
commit
cef734a482
|
@ -2,6 +2,10 @@ if [ ! -x /bin/true ] [ -z `which id` ] || [ -z `which grep` ] || [ -z `which en
|
|||
exit 125;
|
||||
fi
|
||||
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
exit 125;
|
||||
fi
|
||||
|
||||
${PROOT} -i 123:456 id -u | grep ^123$
|
||||
${PROOT} -i 123:456 id -g | grep ^456$
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@ if [ -z `which mcookie` ] || [ -z `which cp` ] || [ -z `which true` ] || [ -z `w
|
|||
exit 125;
|
||||
fi
|
||||
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
exit 125;
|
||||
fi
|
||||
|
||||
TMP=/tmp/$(mcookie)
|
||||
|
||||
cp $(which true) ${TMP}
|
||||
|
|
Loading…
Reference in New Issue