X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sudo.pp;h=77daeb5fbce12f6ab3f9d7b408d02d4d443ed24c;hb=f80966f830a138f1ccdaff86d615b71b15be2537;hp=1f203d8817040acb96d913ccf35c797b2a6b35ab;hpb=db40f7b6672ba244a51aef07459e038232f9442f;p=debian%2Fsudo diff --git a/sudo.pp b/sudo.pp index 1f203d8..77daeb5 100644 --- a/sudo.pp +++ b/sudo.pp @@ -6,32 +6,48 @@ name="sudo" pp_kit_package="sudo" fi - summary="Provide limited super-user priveleges to specific users" + summary="Provide limited super-user privileges to specific users" description="Sudo is a program designed to allow a sysadmin to give \ limited root privileges to users and log root activity. \ The basic philosophy is to give as few privileges as possible but \ still allow people to get their work done." vendor="Todd C. Miller" - copyright="(c) 1993-1996,1998-2010 Todd C. Miller" + copyright="(c) 1993-1996,1998-2011 Todd C. Miller" + +%if [aix] + # AIX package summary is limited to 40 characters + summary="Configurable super-user privileges" # Convert to 4 part version for AIX, including patch level - pp_aix_version=`echo $version|sed -e 's/\([0-9]*\.[0-9]*\.[0-9]*\)$/\1.0/' -e 's/[^0-9]*\([0-9]*\)$/.\1/'` + pp_aix_version=`echo $version|sed -e 's/^\([0-9]*\.[0-9]*\.[0-9]*\)p\([0-9]*\)$/\1.\2/' -e 's/^\([0-9]*\.[0-9]*\.[0-9]*\)[^0-9\.].*$/\1/' -e 's/^\([0-9]*\.[0-9]*\.[0-9]*\)$/\1.0/'` +%endif - # Strip of patchlevel for kit which only supports x.y.z versions - pp_kit_version="`echo $version|sed -e 's/\.//g' -e 's/p[0-9]*$//'`" +%if [kit] + # Strip off patchlevel for kit which only supports xyz versions + pp_kit_version="`echo $version|sed -e 's/\.//g' -e 's/[^0-9][^0-9]*[0-9][0-9]*$//'`" pp_kit_name="TCM" +%endif +%if [sd] pp_sd_vendor_tag="TCM" +%endif + +%if [solaris] pp_solaris_name="TCM${name}" + pp_solaris_pstamp=`/usr/bin/date "+%B %d, %Y"` +%endif + %if [rpm,deb] # Convert patch level into release and remove from version - pp_rpm_release="`echo $version|sed 's/^[0-9]*\.[0-9]*\.[0-9]*[^0-9]*//'`" - pp_rpm_release="`expr $pp_rpm_release + 1`" - pp_rpm_version="`echo $version|sed 's/p[0-9]*$//'`" + pp_rpm_release="`expr \( $version : '.*p\([0-9][0-9]*\)' \| 0 \) + 1`" + pp_rpm_version="`expr $version : '\(.*\)p[0-9][0-9]*'`" pp_rpm_license="BSD" pp_rpm_url="http://www.sudo.ws/" pp_rpm_group="Applications/System" pp_rpm_packager="Todd.Miller@courtesan.com" + if test -n "$linux_audit"; then + pp_rpm_requires="audit-libs >= $linux_audit" + fi pp_deb_maintainer="$pp_rpm_packager" pp_deb_release="$pp_rpm_release" @@ -42,7 +58,7 @@ still allow people to get their work done." mv ${pp_destdir}$sudoersdir/sudoers ${pp_destdir}$sudoersdir/sudoers.dist %endif -%set [rpm] +%if [rpm] # Add distro info to release osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*//' -e 's/-.*$//'` case "$pp_rpm_distro" in @@ -136,8 +152,9 @@ still allow people to get their work done." fi ;; esac +%endif -%set [deb] +%if [deb] # Uncomment some Defaults and the %sudo rule in sudoers # Note that the order must match that of sudoers and be tab-indented. /bin/ed - ${pp_destdir}${sudoersdir}/sudoers <<-'EOF' @@ -157,20 +174,21 @@ still allow people to get their work done." session required pam_permit.so session required pam_limits.so EOF - -%set [aix] - summary="Configurable super-user privileges" +%endif %files $bindir/sudo 4111 root: $bindir/sudoedit 4111 root: $sbindir/visudo 0111 $bindir/sudoreplay 0111 + $includedir/sudo_plugin.h $libexecdir/* $sudoersdir/sudoers.d/ 0750 $sudoers_uid:$sudoers_gid $timedir/ 0700 root: $docdir/ $docdir/* + $localedir/ optional + $localedir/** optional /etc/pam.d/* volatile,optional %if [rpm,deb] $sudoersdir/sudoers $sudoers_mode $sudoers_uid:$sudoers_gid volatile @@ -190,7 +208,10 @@ still allow people to get their work done." # Don't overwrite an existing sudoers file sudoersdir=%{sudoersdir} if test ! -r $sudoersdir/sudoers; then - cp -p $sudoersdir/sudoers.dist $sudoersdir/sudoers + cp $sudoersdir/sudoers.dist $sudoersdir/sudoers + chmod %{sudoers_mode} $sudoersdir/sudoers + chown %{sudoers_uid} $sudoersdir/sudoers + chgrp %{sudoers_gid} $sudoersdir/sudoers fi %post [deb]