Skip to content

feat: remove guest exec from blacklist in qemu-ga configuration#473

Merged
venkatamutyala merged 1 commit into
mainfrom
feat/remove-guest-exec-from-blacklist
Apr 25, 2026
Merged

feat: remove guest exec from blacklist in qemu-ga configuration#473
venkatamutyala merged 1 commit into
mainfrom
feat/remove-guest-exec-from-blacklist

Conversation

@venkatamutyala
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 25, 2026 05:24
@venkatamutyala venkatamutyala merged commit afb2d2f into main Apr 25, 2026
4 checks passed
@venkatamutyala venkatamutyala deleted the feat/remove-guest-exec-from-blacklist branch April 25, 2026 05:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the developer setup script to configure qemu-guest-agent so it does not blacklist any commands, aligning with the intent to allow guest agent execution features during development setup.

Changes:

  • Create /etc/qemu during setup.
  • Write /etc/qemu/qemu-ga.conf with an empty blacklist in the [general] section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread developer-setup.sh
Comment on lines +29 to 30
printf '[general]\nblacklist =\n' | sudo tee /etc/qemu/qemu-ga.conf

Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unconditionally overwrites /etc/qemu/qemu-ga.conf with an empty blacklist, which disables all qemu-ga command blacklisting (not just removing guest-exec) and may unintentionally broaden what the host can trigger via the guest agent. Consider updating the existing config to remove only guest-exec from the current blacklist value (preserving other entries), and only creating the file when it doesn't already exist (or backing up the existing file).

Suggested change
printf '[general]\nblacklist =\n' | sudo tee /etc/qemu/qemu-ga.conf
QEMU_GA_CONF="/etc/qemu/qemu-ga.conf"
if sudo test -f "$QEMU_GA_CONF"; then
sudo cp "$QEMU_GA_CONF" "${QEMU_GA_CONF}.bak"
CURRENT_BLACKLIST=$(
sudo awk -F= '/^[[:space:]]*blacklist[[:space:]]*=/{print $2; exit}' "$QEMU_GA_CONF" \
| tr ',' '\n' \
| sed 's/^[[:space:]]*//;s/[[:space:]]*$//' \
| grep -vx 'guest-exec' \
| paste -sd ',' -
)
if sudo grep -q '^[[:space:]]*blacklist[[:space:]]*=' "$QEMU_GA_CONF"; then
sudo awk -v blacklist="$CURRENT_BLACKLIST" '
/^[[:space:]]*blacklist[[:space:]]*=/ { print "blacklist = " blacklist; next }
{ print }
' "$QEMU_GA_CONF" | sudo tee "$QEMU_GA_CONF" > /dev/null
else
printf '\n[general]\nblacklist = %s\n' "$CURRENT_BLACKLIST" | sudo tee -a "$QEMU_GA_CONF" > /dev/null
fi
else
printf '[general]\nblacklist =\n' | sudo tee "$QEMU_GA_CONF" > /dev/null
fi

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants