]> granicus.if.org Git - sudo/commitdiff
Initial debian 4.0 support
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 13 Jul 2010 21:52:09 +0000 (17:52 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 13 Jul 2010 21:52:09 +0000 (17:52 -0400)
--HG--
branch : 1.7

mkpkg
pp
sudo.pp

diff --git a/mkpkg b/mkpkg
index 070bbe95dcc07946ad1e432d2e2af5f55512f542..11faa56c5a61f2d3cdf4332097c69c49d72ff474 100755 (executable)
--- a/mkpkg
+++ b/mkpkg
@@ -72,7 +72,6 @@ case "$platform" in
                --libexecdir=$prefix/$libexec/sudo
                --with-logging=syslog
                --with-logfac=auth
-               --with-insults=disabled
                --with-all-insults
                --with-ignore-dot
                --with-tty-tickets
@@ -99,7 +98,6 @@ case "$platform" in
                --libexecdir=$prefix/$libexec/sudo
                --with-logging=syslog
                --with-logfac=auth
-               --with-insults=disabled
                --with-all-insults
                --with-ignore-dot
                --with-tty-tickets
@@ -128,7 +126,6 @@ case "$platform" in
                --with-selinux
                --with-logging=syslog
                --with-logfac=auth
-               --with-insults=disabled
                --with-all-insults
                --with-ignore-dot
                --with-tty-tickets
@@ -142,6 +139,30 @@ case "$platform" in
        make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
        export CFLAGS="$F_PIE" LDFLAGS="-pie"
        ;;
+    deb4*)
+       # XXX - create sudo group like debian does
+       # XXX - newer deb moved timestamps to /var/lib/sudo
+       # Note, must indent with tabs, not spaces due to IFS trickery
+       configure_opts="
+               --prefix=/usr
+               --with-ldap
+               --with-all-insults
+               --with-exempt=sudo
+               --with-pam
+               --with-fqdn
+               --with-logging=syslog
+               --with-logfac=authpriv
+               --with-env-editor
+               --with-editor=/usr/bin/editor
+               --with-timeout=15
+               --with-password-timeout=0
+               --disable-root-mailer
+               --disable-setresuid
+               --with-sendmail=/usr/sbin/sendmail
+               --mandir=/usr/share/man
+               --libexecdir=/usr/lib/sudo
+               --with-secure-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
+       ;;
     *)
        # Note, must indent with tabs, not spaces due to IFS trickery
        configure_opts="
diff --git a/pp b/pp
index 23edc521abf4ebfa0f26861951d8444812d9479e..223ddb6bd24cdeaee81940bd2c3682053354166e 100755 (executable)
--- a/pp
+++ b/pp
@@ -3957,7 +3957,8 @@ pp_backend_deb_probe() {
            ;;
        *)
            # Remove trailing revision number and any dots
-            release=`echo $release | cut -dr -f1 | tr -d .`
+           #release=`echo $release | cut -dr -f1 | tr -d .`
+            release=`echo $release | cut -dr -f1`
            ;;
     esac
 
diff --git a/sudo.pp b/sudo.pp
index e4cedfb8c2d0482e5ff03561c62bc879fb7e55b3..67205768daba91c45a4092f8bd385ac37483a54d 100644 (file)
--- a/sudo.pp
+++ b/sudo.pp
@@ -93,6 +93,20 @@ still allow people to get their work done."
        ;;
   esac
 
+%set [deb]
+  # Choose the correct PAM file by distro
+  # XXX - missing deb5 and others
+  case "$pp_deb_distro" in
+    deb4.*)
+        mkdir -p ${pp_destdir}/etc/pam.d
+       cat > ${pp_destdir}/etc/pam.d/sudo <<-EOF
+       #%PAM-1.0
+       @include common-auth
+       @include common-account
+       EOF
+       ;;
+  esac
+
 %set [aix]
   pp_aix_version=`echo $version | sed -e 's,\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)p\([0-9][0-9]*\)q\([0-9][0-9]*\),\1.\2.\3.\4,'`
   summary="Configurable super-user privileges"