1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
samba-mirror/source3/script/tests/test_usernamemap.sh
Pavel Filipenský 5e59bd41a8 s3:tests Test "username map" for UNIX groups
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15041

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
(cherry picked from commit af8747a28b)
2022-04-11 07:49:13 +00:00

29 lines
802 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}"