# HG changeset patch # User Pascal Bellard # Date 1234173812 0 # Node ID f5d6508f734fdeb38cee94e4f72503ea70a4d9f1 # Parent 89fb9e5371cd678bf74e4b9b07e8d5577b602d6b Add sudo-pam diff -r 89fb9e5371cd -r f5d6508f734f sudo-pam/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sudo-pam/receipt Mon Feb 09 10:03:32 2009 +0000 @@ -0,0 +1,67 @@ +# SliTaz package receipt. + +PACKAGE="sudo-pam" +VERSION="1.6.9p17" +CATEGORY="security" +SHORT_DESC="Sudo (su \"do\") allows a system administrator to delegate authority using PAM." +MAINTAINER="erjo@slitaz.org" +DEPENDS="pam" +BUILD_DEPENDS="pam pam-dev" +SOURCE="sudo" +TARBALL="$SOURCE-$VERSION.tar.gz" +WEB_SITE="http://www.gratisoft.us/sudo/" +WGET_URL="http://www.gratisoft.us/sudo/dist/$TARBALL" +PROVIDE="sudo:pam" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --with-pam \ + --with-editor=/bin/vi \ + --libexecdir=/usr/lib \ + $CONFIGURE_ARGS && + + # Build everything + make && + # Install everything + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib + mkdir -p $fs/etc + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/sbin $fs/usr + cp -a $_pkg/usr/lib/*.so $fs/usr/lib + cp -a stuff/sudoers $fs/etc + strip -s $fs/usr/bin/* + strip -s $fs/usr/sbin/* + strip -s $fs/usr/lib/sudo_noexec.so +} + +pre_install() +{ + echo "Processing pre-install commands..." + if [ -f $root/etc/sudoers.bak ]; then + cp $root/etc/sudoers $root/etc/sudoers.bak + fi +} + +post_install() +{ + local root + root=$1 + echo "Processing post-install commands..." + if [ -f $root/etc/sudoers.bak ]; then + rm -f $root/etc/sudoers + mv $root/etc/sudoers.bak $root/etc/sudoers + else + chown root.root $root/etc/sudoers + chmod 0440 $root/etc/sudoers + fi +} diff -r 89fb9e5371cd -r f5d6508f734f sudo-pam/stuff/sudoers --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sudo-pam/stuff/sudoers Mon Feb 09 10:03:32 2009 +0000 @@ -0,0 +1,15 @@ +# +# This file MUST be edited with the 'visudo' command as root. +# +# See the man page for details on how to write a sudoers file. +# + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL) ALL +