Skip to content

Commit a667778

Browse files
committed
fixup file capabilities
1 parent 4a008b6 commit a667778

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

1_prune.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ $RSYNC \
165165

166166
# Fix perms. Unsure why these break
167167
# FIXME: Find out why and remove
168+
echo Fixing up directory permissions
168169
chmod 750 ./usr/etc/audit
169170
chmod 750 ./usr/etc/audit/rules.d
170171
chmod 755 ./usr/etc/bluetooth
@@ -186,6 +187,18 @@ chmod 700 ./usr/lib/ostree-boot/grub2
186187
chmod 700 ./usr/lib/ostree-boot/grub2/fonts
187188
chmod 750 ./usr/libexec/initscripts/legacy-actions/auditd
188189

190+
# Restore expected file capabilities
191+
# PR your own until we figure out the source
192+
# Of the misconfiguration (probably OSTree)
193+
echo Fixing up executable capabilities
194+
setcap cap_dac_override,cap_net_admin,cap_net_raw=eip ./usr/bin/dumpcap
195+
setcap cap_sys_nice=ep ./usr/bin/kwin_wayland
196+
setcap cap_setgid=ep ./usr/bin/newgidmap
197+
setcap cap_setuid=ep ./usr/bin/newuidmap
198+
setcap cap_net_bind_service=ep ./usr/bin/rcp
199+
setcap cap_net_bind_service=ep ./usr/bin/rlogin
200+
setcap cap_net_bind_service=ep ./usr/bin/rsh
201+
189202
# Fix polkid group
190203
POLKIT_ID=$(cat ./usr/lib/group | grep polkitd | cut -d: -f3)
191204
if [ -z "$POLKIT_ID" ]; then

0 commit comments

Comments
 (0)