1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-25 03:41:57 +03:00

tests: use setfacl if available

Closes #1565
This commit is contained in:
Viktor Szakats
2025-03-24 03:18:26 +01:00
parent 902fc9574d
commit cf15fdd29f

View File

@ -102,10 +102,14 @@ if [ -n "${SSH}" ]; then
echo "# ssh log: '${logfcli}'"
chmod go-rwx "${PRIVKEY}"
if [[ "${uname}" = *'_NT'* ]]; then
export MSYS2_ARG_CONV_EXCL='/reset'
icacls "${PRIVKEY}" /reset
icacls "${PRIVKEY}" /grant:r "${USERNAME}:(R)"
icacls "${PRIVKEY}" /inheritance:r
if [ -x /bin/setfacl ]; then
/bin/setfacl --remove-all "${PRIVKEY}"
else
export MSYS2_ARG_CONV_EXCL='/reset'
icacls "${PRIVKEY}" /reset
icacls "${PRIVKEY}" /grant:r "${USERNAME}:(R)"
icacls "${PRIVKEY}" /inheritance:r
fi
fi
count=1
# shellcheck disable=SC2086