File: postinst

package info (click to toggle)
libpam-unix2 1%3A2.4.1-6
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,972 kB
  • sloc: sh: 4,076; ansic: 3,554; makefile: 105; sed: 16
file content (22 lines) | stat: -rw-r--r-- 639 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
#!/bin/sh
set -e

# /sbin/unix2_chkpwd is installed setgid shadow by default.
# For NIS it needs to be setuid root (see bugs #155583 and #544687).
if [ -x /usr/bin/yppasswd ]
then
    if ! dpkg-statoverride --list /sbin/unix2_chkpwd >/dev/null
    then
        dpkg-statoverride --update --add root root 4755 /sbin/unix2_chkpwd
    fi
else
    if override=$(dpkg-statoverride --list /sbin/unix2_chkpwd) && \
        [ "$override" = "root root 4755 /sbin/unix2_chkpwd" ]
    then
        dpkg-statoverride --remove /sbin/unix2_chkpwd
        chown root:shadow /sbin/unix2_chkpwd
        chmod 2755 /sbin/unix2_chkpwd
    fi
fi

#DEBHELPER#