summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/integration/sessiond-integration-tests.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/integration/sessiond-integration-tests.sh b/tests/integration/sessiond-integration-tests.sh
index 883f8e3..4aea012 100755
--- a/tests/integration/sessiond-integration-tests.sh
+++ b/tests/integration/sessiond-integration-tests.sh
@@ -110,8 +110,9 @@ done
userid=$(getent passwd "$TESTUSER" | cut -d: -f3)
homedir=$(getent passwd "$TESTUSER" | cut -d: -f6)
+apps_rwdir="${homedir}/apps_rw"
-verbose_echo "User id: $userid, home directory: $homedir"
+verbose_echo "User id: $userid, home directory: $homedir, apps_rw user directory: $apps_rwdir"
create_test_users
@@ -128,12 +129,17 @@ for subsession in "${TEST_SUBSESSIONS[@]}"; do
do
verbose_echo "Checking $f..."
templf="${f/"$subsession_dir"/$skeldir}"
+ userf="${f/"$subsession_dir"/$apps_rwdir}"
# Check if permissions are correct
usergroup=$(stat --format '%U:%G' "$f")
user=$(echo "$usergroup" | cut -d: -f1)
group=$(echo "$usergroup" | cut -d: -f2)
- if [ "$user" != "$TESTUSER" ] || [ "$group" != "$GROUP" ]; then
+ u_usergroup=$(stat --format '%U:%G' "$userf")
+ u_user=$(echo "$u_usergroup" | cut -d: -f1)
+ u_group=$(echo "$u_usergroup" | cut -d: -f2)
+
+ if [ "$user" != "$TESTUSER" ] || [ "$group" != "$u_group" ]; then
echo "$f: incorrect permissions set!"
exit 1
fi