File: suidregister

package info (click to toggle)
suidmanager 0.52
  • links: PTS
  • area: main
  • in suites: woody
  • size: 52 kB
  • sloc: sh: 47; perl: 34; makefile: 27
file content (19 lines) | stat: -rwxr-xr-x 395 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

if [ "$1" = "-s" ]; then
    # we don't care about the argument to the -s option
    shift 2

    file=$1
    user=$2
    group=$3
    mode=$4

    # abort if it's already registered with dpkg
    test -n "`dpkg-statoverride --list $file`" && exit 0

    chown $user:$group $file
    chmod $mode $file
else
    echo "suidregister is obsolete, please use dpkg-statoverride instead"
fi