faccessat: Specify AT_SYMLINK_NOFOLLOW only when necessary.

- Specify AT_SYMLINK_NOFOLLOW in faccessat only when
   the symbolic-link is analyzed by overlay_path().

Change-Id: Ie3b1f7fedef7441fd4b39c5c8b2ef0f73cba770e
Refs: #1370
This commit is contained in:
Shiratori, Takehiro
2020-03-09 11:05:54 +09:00
committed by Masamichi Takagi
parent 4946fbdd82
commit d82ac31bc6
4 changed files with 360 additions and 14 deletions

35
test/issues/1370/1370.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/sh
# 1370.sh COPYRIGHT FUJITSU LIMITED 2020
. $HOME/.mck_test_config
BOOTPARAM="-c 12-15 -m 512M@4 -O"
USELTP=1
FAIL=0
. ../../common.sh
# for access02 setting
chmod 666 /dev/mcos*
echo "issue-1370 test run."
ltp=("access01" "access02" "access03" "access04" "faccessat01")
for tp in ${ltp[@]}
do
pushd ${LTPBIN} > /dev/null
${MCEXEC} ${LTPBIN}/${tp}
if [ $? -ne 0 ]; then
FAIL=1
fi
popd > /dev/null
done
if [ ${FAIL} -eq 1 ]; then
echo "issue-1370 test NG."
else
echo "issue-1370 test OK."
fi
mcstop