Skip to content

Instantly share code, notes, and snippets.

@yakclock
Created March 25, 2020 06:52
Show Gist options
  • Select an option

  • Save yakclock/5de3e574cec49cc8b75609f1c66d3f35 to your computer and use it in GitHub Desktop.

Select an option

Save yakclock/5de3e574cec49cc8b75609f1c66d3f35 to your computer and use it in GitHub Desktop.
#!/bin/bash
# https://bugzilla.redhat.com/show_bug.cgi?id=1577511
# https://github.com/TigerVNC/tigervnc/issues/606
rm /tmp/systemd-tigervnc.te 2>/dev/null
cat << EOF > /tmp/systemd-tigervnc.te
module systemd-tigervnc 1.0;
require {
type init_t;
type user_home_t;
class file { open read unlink };
}
#============= init_t ==============
allow init_t user_home_t:file { open read unlink };
EOF
checkmodule -M -m -o /tmp/systemd-tigervnc.mod /tmp/systemd-tigervnc.te
semodule_package -o /tmp/systemd-tigervnc.pp -m /tmp/systemd-tigervnc.mod
sudo semodule -X 300 -i /tmp/systemd-tigervnc.pp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment