Sisyphus repository
Last update: 29 august 2014 | SRPMs: 15135 | Visits: 5656954
en ru br
ALT Linux repos
S:0.60-alt33
5.0: 0.60-alt26
4.1: 0.60-alt25
4.0: 0.60-alt25
3.0: 0.60-alt22

Group :: System/Base
RPM: SimplePAMApps

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh

. /etc/control.d/functions

CONFIG=/etc/pam.d/su
BINARY=/bin/su

new_subst public \
'^#auth[[:space:]]+required[[:space:]]+(/lib/security/)?pam_wheel\.so' \
's,^\(auth[[:space:]]\+required[[:space:]]\+\(/lib/security/\)\?pam_wheel\.so\),#\1,'
new_fmode public 4711 root root
new_subst wheel \
'^auth[[:space:]]+required[[:space:]]+(/lib/security/)?pam_wheel\.so' \
's,^#\(auth[[:space:]]\+required[[:space:]]\+\(/lib/security/\)\?pam_wheel\.so\),\1,'
new_fmode wheelonly 4710 root wheel
new_fmode restricted 700 root root

new_help public "Any user can execute $BINARY"
new_help wheel "Any user can execute $BINARY, but only \"wheel\" group members can switch to superuser"
new_help wheelonly "Only \"wheel\" group members can execute $BINARY"
new_help restricted "Only root can execute $BINARY"

case "$*" in
status|'')
STATUS="`control_fmode "$BINARY" status`" || exit 1
if [ "$STATUS" = "public" ]; then
control_subst "$CONFIG" status || exit 1
else
test -z "$STATUS" || echo "$STATUS"
fi
;;
public|wheel)
control_fmode "$BINARY" public || exit 1
control_subst "$CONFIG" "$*" || exit 1
;;
wheelonly|restricted)
control_fmode "$BINARY" "$*" || exit 1
control_subst "$CONFIG" public || exit 1
;;
*)
control_fmode "$BINARY" "$*" || exit 1
;;
esac
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin