File: postinst

package info (click to toggle)
cce 0.36-1.1
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 4,168 kB
  • ctags: 1,407
  • sloc: ansic: 15,193; makefile: 83; sh: 23
file content (25 lines) | stat: -rw-r--r-- 774 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
if [ "$1" = "configure" ]; then
    cat << _E
The default of cce is not 'SUID root', that means non-root users cannot
run it. If cce is SUID root, then others can use it too.  HOWEVER, there
exists a security risk!  Because cce may not be written with security as
the highest priority, and users may be able to gain root access by
exploiting bugs in a poorly-written program which has been SUID root.
You have been warned!

_E
    echo -n "Do you want cce to be SUID root ? [y/N] "
    read ans

    echo ""
    if [ x$ans = "xy" -o x$ans = "xY" ]; then
        chmod u+s /usr/bin/cce
        suidregister -s cce /usr/bin/cce root root 4755
        echo "/usr/bin/cce is now SUID root."
    else
        echo "cce is not setuid root, good."
    fi
fi

#DEBHELPER#