2 # Test smbd handling EROFS when creating a file
3 # Copyright (C) 2023 Volker Lendecke
6 echo Usage
: $0 SERVERCONFFILE SMBCLIENT SERVER SHARE
19 incdir
=$
(dirname $0)/..
/..
/..
/testprogs
/blackbox
22 error_inject_conf
=$
(dirname ${SERVERCONFFILE})/error_inject.conf
23 echo "error_inject:openat_create = EROFS" >${error_inject_conf}
27 out
=$
(${SMBCLIENT} //${SERVER}/${SHARE} ${CONF} -U${USER}%${PASSWORD} \
29 testit_grep
"Expect MEDIA_WRITE_PROTECTED" NT_STATUS_MEDIA_WRITE_PROTECTED \
30 echo "$out" || failed
=$
(expr $failed + 1)