1
0
mirror of https://github.com/opencontainers/runc.git synced 2026-02-05 18:45:28 +01:00
Files
runc/script/setup_rootless.sh
Kir Kolyshkin c443aee760 [1.4] script/setup_rootless.sh: chown nit
This fixes the following warning (seen on Fedora 42 and Ubuntu 24.04):

	+ sudo chown -R rootless.rootless /home/rootless
	chown: warning: '.' should be ':': ‘rootless.rootless’

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 7d6848f883)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-10-08 18:38:55 +11:00

16 lines
626 B
Bash
Executable File

#!/bin/bash
set -eux -o pipefail
# Add a user for rootless tests.
sudo useradd -u2000 -m -d/home/rootless -s/bin/bash rootless
# Allow both the current user and rootless itself to use
# ssh rootless@localhost in tests/rootless.sh.
# shellcheck disable=SC2174 # Silence "-m only applies to the deepest directory".
mkdir -p -m 0700 "$HOME/.ssh"
ssh-keygen -t ecdsa -N "" -f "$HOME/.ssh/rootless.key"
sudo mkdir -p -m 0700 /home/rootless/.ssh
sudo cp "$HOME/.ssh/rootless.key" /home/rootless/.ssh/id_ecdsa
sudo cp "$HOME/.ssh/rootless.key.pub" /home/rootless/.ssh/authorized_keys
sudo chown -R rootless:rootless /home/rootless