From 0c8746125a1a31658199888d99ba40e48ef776de Mon Sep 17 00:00:00 2001 From: Ezri Zhu Date: Tue, 20 Feb 2024 01:01:47 +0000 Subject: [PATCH] fix id output to not print security context --- test/gidmapping.sh | 4 ++-- test/uidmapping.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/gidmapping.sh b/test/gidmapping.sh index 1415bbc8..b9c5e331 100755 --- a/test/gidmapping.sh +++ b/test/gidmapping.sh @@ -3,8 +3,8 @@ TRY_TOP="${TRY_TOP:-$(git rev-parse --show-toplevel --show-superproject-working-tree)}" TRY="$TRY_TOP/try" -control=$(id -G) -testing=$("$TRY" id -G 2>/dev/null) +control=$(id -Gn) +testing=$("$TRY" -D "$(mktemp -d)" id -Gn 2>/dev/null) if [ "$control" = "$testing" ] then diff --git a/test/uidmapping.sh b/test/uidmapping.sh index 395a4000..93758b01 100755 --- a/test/uidmapping.sh +++ b/test/uidmapping.sh @@ -3,8 +3,8 @@ TRY_TOP="${TRY_TOP:-$(git rev-parse --show-toplevel --show-superproject-working-tree)}" TRY="$TRY_TOP/try" -control=$(id) -testing=$(sudo "$TRY" -u "$USER" id) +control=$(id -un) +testing=$(sudo "$TRY" -D "$(mktemp -d)" -u "$USER" id -un) if [ "$control" = "$testing" ] then