Merge "Followup: Ensure devuser-created dir has sane perms"

This commit is contained in:
Zuul 2024-12-11 17:54:48 +00:00 committed by Gerrit Code Review
commit 6bed46cf9a

View File

@ -19,7 +19,11 @@ fi
set -x
if [ -n "${DIB_DEV_USER_PWDLESS_SUDO}" ]; then
mkdir -p /etc/sudoers.d/
if [ ! -d /etc/sudoers.d/ ]; then
mkdir -p /etc/sudoers.d/
chmod 0750 /etc/sudoers.d/
chown root:root /etc/sudoers.d/
fi
cat > /etc/sudoers.d/${DIB_DEV_USER_USERNAME} << EOF
${DIB_DEV_USER_USERNAME} ALL=(ALL) NOPASSWD:ALL
EOF