1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
samba-mirror/source3/script/tests/test_usernamemap.sh
Andreas Schneider a10f4dffcd s3:tests: Reformat test_usernamemap.sh
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2022-06-22 09:12:31 +00:00

29 lines
801 B
Bash
Executable File

#!/bin/sh
#
# Copyright (c) 2022 Pavel Filipenský <pfilipen@redhat.com>
#
# Tests for "username map" smb.conf parameter for UNIX groups
if [ $# -lt 2 ]; then
cat <<EOF
Usage: test_usernamemap.sh SERVER SMBCLIENT
EOF
exit 1
fi
SERVER="$1"
SMBCLIENT="$2"
SMBCLIENT="${VALGRIND} ${SMBCLIENT}"
incdir=$(dirname "$0")/../../../testprogs/blackbox
. "${incdir}"/subunit.sh
failed=0
# jackthemapper is mapped to jacknomapper, so we need jacknomapper password
testit "jackthemapper" "${SMBCLIENT}" //"${SERVER}"/tmp -U"${SERVER}/jackthemapper%nOmApsEcrEt" -c ls || failed=$((failed + 1))
# jacknomapper is not mapped, so we need jacknomapper password
testit "jacknomapper" "${SMBCLIENT}" //"${SERVER}"/tmp -U"${SERVER}/jacknomapper%nOmApsEcrEt" -c ls || failed=$((failed + 1))
testok "$0" "${failed}"