File: libgstreamer.postinst

package info (click to toggle)
gstreamer1.0 1.10.4-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 33,624 kB
  • ctags: 25,930
  • sloc: ansic: 164,601; xml: 18,306; sh: 5,623; makefile: 2,280; perl: 1,657; yacc: 887; python: 377; lex: 164; lisp: 154; cpp: 52; sed: 16
file content (24 lines) | stat: -rw-r--r-- 856 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -e

if [ "$1" = configure ]; then
    # If we have setcap is installed, try setting cap_net_bind_service,cap_net_admin+ep,
    # which allows us to install our helper binary without the setuid bit.
    if command -v setcap > /dev/null; then
        if setcap cap_net_bind_service,cap_net_admin+ep /usr/lib/@MULTIARCH@/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-ptp-helper; then
            echo "Setcap worked! gst-ptp-helper is not suid!"
        else
            echo "Setcap failed on gst-ptp-helper, falling back to setuid" >&2
            chmod u+s /usr/lib/@MULTIARCH@/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-ptp-helper
        fi
    else
        echo "Setcap is not installed, falling back to setuid" >&2
        chmod u+s /usr/lib/@MULTIARCH@/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-ptp-helper
    fi
fi

#DEBHELPER#

exit 0