[arch-commits] Commit in sudo/repos (5 files)

Evangelos Foutras foutrelis at archlinux.org
Wed May 16 15:41:39 UTC 2018


    Date: Wednesday, May 16, 2018 @ 15:41:38
  Author: foutrelis
Revision: 324365

archrelease: copy trunk to testing-x86_64

Added:
  sudo/repos/testing-x86_64/
  sudo/repos/testing-x86_64/PKGBUILD
    (from rev 324364, sudo/trunk/PKGBUILD)
  sudo/repos/testing-x86_64/allow-preserve-env-with-arg.patch
    (from rev 324364, sudo/trunk/allow-preserve-env-with-arg.patch)
  sudo/repos/testing-x86_64/sudo.install
    (from rev 324364, sudo/trunk/sudo.install)
  sudo/repos/testing-x86_64/sudo.pam
    (from rev 324364, sudo/trunk/sudo.pam)

-----------------------------------+
 PKGBUILD                          |   77 ++++++++++++++++++++++++++++++++++++
 allow-preserve-env-with-arg.patch |   35 ++++++++++++++++
 sudo.install                      |    9 ++++
 sudo.pam                          |    4 +
 4 files changed, 125 insertions(+)

Copied: sudo/repos/testing-x86_64/PKGBUILD (from rev 324364, sudo/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2018-05-16 15:41:38 UTC (rev 324365)
@@ -0,0 +1,77 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Allan McRae <allan at archlinux.org>
+# Contributor: Tom Newsom <Jeepster at gmx.co.uk>
+
+pkgname=sudo
+_sudover=1.8.23
+pkgver=${_sudover/p/.p}
+pkgrel=2
+pkgdesc="Give certain users the ability to run some commands as root"
+arch=('x86_64')
+url="https://www.sudo.ws/sudo/"
+license=('custom')
+groups=('base-devel')
+depends=('glibc' 'libgcrypt' 'pam' 'libldap')
+backup=('etc/sudoers' 'etc/pam.d/sudo')
+install=$pkgname.install
+source=(https://www.sudo.ws/sudo/dist/$pkgname-$_sudover.tar.gz{,.sig}
+        allow-preserve-env-with-arg.patch
+        sudo.pam)
+sha256sums=('d863d29b6fc87bc784a3223350e2b28a2ff2c4738f0fb8f1c92bb38c3017e679'
+            'SKIP'
+            '439edd65dbc0115794dec833968c538c98a275522ec9a2e0ac3d4a9eb9cc3b33'
+            'd1738818070684a5d2c9b26224906aad69a4fea77aabd960fc2675aee2df1fa2')
+validpgpkeys=('59D1E9CCBA2B376704FDD35BA9F4C021CEA470FB')
+
+prepare() {
+  cd "$srcdir/$pkgname-$_sudover"
+
+  # https://bugzilla.sudo.ws/show_bug.cgi?id=835
+  patch -Np1 -i ../allow-preserve-env-with-arg.patch
+}
+
+build() {
+  cd "$srcdir/$pkgname-$_sudover"
+
+  ./configure \
+    --prefix=/usr \
+    --sbindir=/usr/bin \
+    --libexecdir=/usr/lib \
+    --with-rundir=/run/sudo \
+    --with-vardir=/var/db/sudo \
+    --with-logfac=auth \
+    --enable-gcrypt \
+    --enable-tmpfiles.d \
+    --with-pam \
+    --with-sssd \
+    --with-ldap \
+    --with-ldap-conf-file=/etc/openldap/ldap.conf \
+    --with-env-editor \
+    --with-passprompt="[sudo] password for %p: " \
+    --with-all-insults
+  make
+}
+
+check() {
+  cd "$srcdir/$pkgname-$_sudover"
+  make check
+}
+
+package() {
+  cd "$srcdir/$pkgname-$_sudover"
+  make DESTDIR="$pkgdir" install
+
+  # Remove sudoers.dist; not needed since pacman manages updates to sudoers
+  rm "$pkgdir/etc/sudoers.dist"
+
+  # Remove /run/sudo directory; we create it using systemd-tmpfiles
+  rmdir "$pkgdir/run/sudo"
+  rmdir "$pkgdir/run"
+
+  install -Dm644 "$srcdir/sudo.pam" "$pkgdir/etc/pam.d/sudo"
+
+  install -Dm644 doc/LICENSE "$pkgdir/usr/share/licenses/sudo/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: sudo/repos/testing-x86_64/allow-preserve-env-with-arg.patch (from rev 324364, sudo/trunk/allow-preserve-env-with-arg.patch)
===================================================================
--- testing-x86_64/allow-preserve-env-with-arg.patch	                        (rev 0)
+++ testing-x86_64/allow-preserve-env-with-arg.patch	2018-05-16 15:41:38 UTC (rev 324365)
@@ -0,0 +1,35 @@
+
+# HG changeset patch
+# User Todd C. Miller <Todd.Miller at sudo.ws>
+# Date 1526483443 21600
+# Node ID 8ea75ca8fbd2de3877fed1b83a63d9ac8a9c14b1
+# Parent  7972215392428f23eb47c11ddffc0cc8a824fff0
+Only set MODE_PRESERVE_ENV when preserving the entire environment.
+Fixes a problem introduced in 1.8.23 where "sudo -i" could not be
+used in conjunction with --preserve-env=VARIABLE.  Bug #835
+
+diff -r 797221539242 -r 8ea75ca8fbd2 src/parse_args.c
+--- a/src/parse_args.c	Tue May 15 16:35:07 2018 -0600
++++ b/src/parse_args.c	Wed May 16 09:10:43 2018 -0600
+@@ -330,14 +330,15 @@
+ 		case 'E':
+ 		    /*
+ 		     * Optional argument is a comma-separated list of
+-		     * environment variables to preserve.  If not present,
+-		     * preserve everything.
++		     * environment variables to preserve.
++		     * If not present, preserve everything.
+ 		     */
+-		    if (optarg == NULL)
++		    if (optarg == NULL) {
+ 			sudo_settings[ARG_PRESERVE_ENVIRONMENT].value = "true";
+-		    else
++			SET(flags, MODE_PRESERVE_ENV);
++		    } else {
+ 			parse_env_list(&extra_env, optarg);
+-		    SET(flags, MODE_PRESERVE_ENV);
++		    }
+ 		    break;
+ 		case 'e':
+ 		    if (mode && mode != MODE_EDIT)
+

Copied: sudo/repos/testing-x86_64/sudo.install (from rev 324364, sudo/trunk/sudo.install)
===================================================================
--- testing-x86_64/sudo.install	                        (rev 0)
+++ testing-x86_64/sudo.install	2018-05-16 15:41:38 UTC (rev 324365)
@@ -0,0 +1,9 @@
+pre_upgrade() {
+  # Permissions of /var/db/sudo were changed from 0700 to 0711 in sudo 1.8.10
+  # http://www.sudo.ws/repos/sudo/rev/5c38d77a2d0c
+  if (($(vercmp $2 1.8.10-1) < 0)); then
+    chmod 0711 var/db/sudo
+  fi
+}
+
+# vim:set ts=2 sw=2 et:

Copied: sudo/repos/testing-x86_64/sudo.pam (from rev 324364, sudo/trunk/sudo.pam)
===================================================================
--- testing-x86_64/sudo.pam	                        (rev 0)
+++ testing-x86_64/sudo.pam	2018-05-16 15:41:38 UTC (rev 324365)
@@ -0,0 +1,4 @@
+#%PAM-1.0
+auth		include		system-auth
+account		include		system-auth
+session		include		system-auth



More information about the arch-commits mailing list