[arch-commits] Commit in sudo/trunk (PKGBUILD pam_auth.diff)
Allan McRae
allan at archlinux.org
Wed Jun 23 07:13:49 UTC 2010
Date: Wednesday, June 23, 2010 @ 03:13:48
Author: allan
Revision: 83812
upgpkg: sudo 1.7.2p7-2
fix issues with fingerprint authentication (FS#17519)
Added:
sudo/trunk/pam_auth.diff
Modified:
sudo/trunk/PKGBUILD
---------------+
PKGBUILD | 23 ++++++++++++++---------
pam_auth.diff | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 9 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-06-22 23:07:59 UTC (rev 83811)
+++ PKGBUILD 2010-06-23 07:13:48 UTC (rev 83812)
@@ -4,32 +4,37 @@
pkgname=sudo
pkgver=1.7.2p7
-pkgrel=1
+pkgrel=2
pkgdesc="Give certain users the ability to run some commands as root"
arch=('i686' 'x86_64')
url="http://www.sudo.ws/sudo/"
license=('custom')
depends=('glibc' 'pam')
backup=('etc/sudoers' 'etc/pam.d/sudo')
-source=(ftp://ftp.sudo.ws/pub/sudo/$pkgname-$pkgver.tar.gz
+source=(ftp://ftp.sudo.ws/pub/sudo/$pkgname-$pkgver.tar.gz
+ pam_auth.diff
sudo.pam)
options=('!libtool' '!makeflags' 'force')
md5sums=('3ac78668427a53e12d7639fdfab2f1af'
+ 'a9aac5f2928f858b83720d914ee9c9ab'
'4e7ad4ec8f2fe6a40e12bcb2c0b256e3')
build() {
- cd $srcdir/$pkgname-$pkgver || return 1
+ cd $srcdir/$pkgname-$pkgver
+ # http://www.gratisoft.us/bugzilla/show_bug.cgi?id=388
+ patch -Np0 -i $srcdir/pam_auth.diff
+
./configure --prefix=/usr --with-pam --libexecdir=/usr/lib \
- --with-env-editor --with-all-insults --with-logfac=auth || return 1
- make || return 1
+ --with-env-editor --with-all-insults --with-logfac=auth
+ make
}
package() {
- cd $srcdir/$pkgname-$pkgver || return 1
+ cd $srcdir/$pkgname-$pkgver
- make DESTDIR=$pkgdir install || return 1
- install -Dm644 $srcdir/sudo.pam $pkgdir/etc/pam.d/sudo || return 1
+ make DESTDIR=$pkgdir install
+ install -Dm644 $srcdir/sudo.pam $pkgdir/etc/pam.d/sudo
- install -Dm644 LICENSE $pkgdir/usr/share/licenses/sudo/LICENSE || return 1
+ install -Dm644 LICENSE $pkgdir/usr/share/licenses/sudo/LICENSE
}
Added: pam_auth.diff
===================================================================
--- pam_auth.diff (rev 0)
+++ pam_auth.diff 2010-06-23 07:13:48 UTC (rev 83812)
@@ -0,0 +1,34 @@
+diff -r c6ca4f24c8d1 auth/pam.c
+--- auth/pam.c Wed Jun 02 10:15:09 2010 -0400
++++ auth/pam.c Fri Jun 18 16:26:28 2010 -0400
+@@ -102,14 +102,6 @@
+ log_error(USE_ERRNO|NO_EXIT|NO_MAIL, "unable to initialize PAM");
+ return(AUTH_FATAL);
+ }
+-
+- /*
+- * Set PAM_RUSER to the invoking user (the "from" user).
+- * We set PAM_RHOST to avoid a bug in Solaris 7 and below.
+- */
+- (void) pam_set_item(pamh, PAM_RUSER, user_name);
+- (void) pam_set_item(pamh, PAM_RHOST, user_host);
+-
+ /*
+ * Some versions of pam_lastlog have a bug that
+ * will cause a crash if PAM_TTY is not set so if
+@@ -208,10 +200,13 @@
+ pam_init(pw, NULL, NULL);
+
+ /*
+- * Update PAM_USER to reference the user we are running the command
+- * as, as opposed to the user we authenticated as.
++ * Set PAM_USER to the user we are changing *to* and
++ * set PAM_RUSER to the user we are coming *from*.
++ * We set PAM_RHOST to avoid a bug in Solaris 7 and below.
+ */
+ (void) pam_set_item(pamh, PAM_USER, pw->pw_name);
++ (void) pam_set_item(pamh, PAM_RUSER, user_name);
++ (void) pam_set_item(pamh, PAM_RHOST, user_host);
+
+ /*
+ * Set credentials (may include resource limits, device ownership, etc).
More information about the arch-commits
mailing list