test: fake id command so native port takeover e2e test runs without real root
This commit is contained in:
@@ -71,6 +71,16 @@ write_common_stubs() {
|
|||||||
local dir="$1"
|
local dir="$1"
|
||||||
local mode="${2:-happy}"
|
local mode="${2:-happy}"
|
||||||
|
|
||||||
|
cat > "$dir/bin/id" <<'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
if [ "$1" = "-u" ]; then
|
||||||
|
echo 0
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
|
EOF
|
||||||
|
chmod 755 "$dir/bin/id"
|
||||||
|
|
||||||
cat > "$dir/bin/da" <<EOF
|
cat > "$dir/bin/da" <<EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "\$*" >> "$dir/da_calls.log"
|
echo "\$*" >> "$dir/da_calls.log"
|
||||||
|
|||||||
Reference in New Issue
Block a user