File: policycoreutils-sandbox.postinst

package info (click to toggle)
selinux-python 3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,248 kB
  • sloc: python: 22,705; ansic: 840; makefile: 477; sh: 414
file content (17 lines) | stat: -rw-r--r-- 451 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -e

PROGRAM=/usr/sbin/seunshare

if [ "$1" = configure ]; then
    if which setcap > /dev/null && [ -e $PROGRAM ]; then
        if ! setcap cap_setpcap,cap_setuid,cap_fowner,cap_dac_override,cap_sys_admin,cap_sys_nice=pe $PROGRAM >/dev/null 2>&1; then
            echo "Setting capabilities for seunshare using Linux Capabilities failed, falling back to setuid."
            chmod 4755 $PROGRAM
        fi
    fi
fi

#DEBHELPER#

exit 0