7140964 Problem with utility/sudo s11-sru S11SRU7_05
authorDarren J Moffat <Darren.Moffat@Oracle.COM>
Wed, 02 May 2012 12:35:29 +0100
branchs11-sru
changeset 2273 f05fa0c3ac62
parent 2272 c67d6158a32c
child 2274 cdf332a6c5f1
7140964 Problem with utility/sudo
components/sudo/Makefile
components/sudo/patches/audit-event.patch
components/sudo/patches/compat-build.patch
components/sudo/sudo.p5m
--- a/components/sudo/Makefile	Wed May 02 04:37:34 2012 -0500
+++ b/components/sudo/Makefile	Wed May 02 12:35:29 2012 +0100
@@ -19,18 +19,18 @@
 # CDDL HEADER END
 
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		sudo
-SRC_VERSION=	1.8.1
+SRC_VERSION=	1.8.3
 SRC_PATCH_VERSION=	2
 COMPONENT_VERSION=	$(SRC_VERSION).$(SRC_PATCH_VERSION)
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
-COMPONENT_ARCHIVE_HASH=	sha1:b743b3d7bdb06de68ea24eedfe13530e8fbcae09
+COMPONENT_ARCHIVE_HASH=	sha1:37d70b133f809116ce631229fa0e727d9f5125ad
 COMPONENT_ARCHIVE_URL=	http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
 COMPONENT_PROJECT_URL=  http://www.sudo.ws/
 
@@ -43,10 +43,9 @@
 CONFIGURE_ENV +=	"CXX=$(CXX)"
 CONFIGURE_ENV +=	"MAKE=$(GMAKE)"
 
-CONFIGURE_OPTIONS +=	--with-CC=$(CC)
 CONFIGURE_OPTIONS +=	--with-ldap
 CONFIGURE_OPTIONS +=	--with-project
-CONFIGURE_OPTIONS +=	--with-timedir=/var/run/sudo
+CONFIGURE_OPTIONS +=	--with-timedir=/system/volatile/sudo
 CONFIGURE_OPTIONS +=	--with-pam --with-pam-login
 CONFIGURE_OPTIONS +=	--with-tty-tickets
 CONFIGURE_OPTIONS +=	--without-insults
--- a/components/sudo/patches/audit-event.patch	Wed May 02 04:37:34 2012 -0500
+++ b/components/sudo/patches/audit-event.patch	Wed May 02 12:35:29 2012 +0100
@@ -1,15 +1,18 @@
---- sudo-1.8.1p2/plugins/sudoers/bsm_audit.c	Wed Mar 16 10:40:56 2011
-+++ sudo-1.8.1p2-fixes/plugins/sudoers/bsm_audit.c	Mon Aug  1 03:40:43 2011
-@@ -31,6 +31,7 @@
+--- sudo-1.8.3p2/plugins/sudoers/bsm_audit.c	Fri Oct 21 14:01:25 2011
++++ /tmp/bsm_audit.c	Mon Jan 30 17:06:00 2012
+@@ -30,8 +30,10 @@
+ #include <errno.h>
  #include <unistd.h>
  
++#include "gettext.h"
  #include "bsm_audit.h"
-+#define	AUE_sudo 6650
  
++
  /*
   * Solaris auditon() returns EINVAL if BSM audit not configured.
-@@ -100,7 +101,7 @@
- 		log_error(0, "au_open: failed");
+  * OpenBSM returns ENOSYS for unimplemented options.
+@@ -100,7 +102,7 @@
+ 		log_error(0, _("au_open: failed"));
  	if (getaudit_addr(&ainfo_addr, sizeof(ainfo_addr)) == 0) {
  		tok = au_to_subject_ex(auid, geteuid(), getegid(), getuid(),
 -		    getuid(), pid, pid, &ainfo_addr.ai_termid);
@@ -17,44 +20,53 @@
  	} else if (errno == ENOSYS) {
  		/*
  		 * NB: We should probably watch out for ERANGE here.
-@@ -108,7 +109,7 @@
+@@ -108,7 +110,7 @@
  		if (getaudit(&ainfo) < 0)
- 			log_error(0, "getaudit: failed");
+ 			log_error(0, _("getaudit: failed"));
  		tok = au_to_subject(auid, geteuid(), getegid(), getuid(),
 -		    getuid(), pid, pid, &ainfo.ai_termid);
 +		    getuid(), pid, &ainfo.ai_asid, &ainfo.ai_termid);
  	} else
- 		log_error(0, "getaudit: failed");
+ 		log_error(0, _("getaudit: failed"));
  	if (tok == NULL)
-@@ -122,7 +123,7 @@
+@@ -122,7 +124,7 @@
  	if (tok == NULL)
- 		log_error(0, "au_to_return32: failed");
+ 		log_error(0, _("au_to_return32: failed"));
  	au_write(aufd, tok);
 -	if (au_close(aufd, 1, AUE_sudo) == -1)
-+	if (au_close(aufd, 1, AUE_sudo, 0) == -1)
- 		log_error(0, "unable to commit audit record");
++	if (au_close(aufd, 1, AUE_sudo, PAD_FAILURE) == -1)
+ 		log_error(0, _("unable to commit audit record"));
  }
  
-@@ -157,12 +158,12 @@
- 		log_error(0, "au_open: failed");
+@@ -142,7 +144,7 @@
+ 	/*
+ 	 * If we are not auditing, don't cut an audit record; just return.
+ 	 */
+-	if (auditon(A_GETCOND, &au_cond, sizeof(long)) < 0) {
++	if (auditon(A_GETCOND, (caddr_t)&au_cond, sizeof(long)) < 0) {
+ 		if (errno == AUDIT_NOT_CONFIGURED)
+ 			return;
+ 		log_error(0, _("Could not determine audit condition"));
+@@ -157,12 +159,12 @@
+ 		log_error(0, _("au_open: failed"));
  	if (getaudit_addr(&ainfo_addr, sizeof(ainfo_addr)) == 0) { 
  		tok = au_to_subject_ex(auid, geteuid(), getegid(), getuid(),
 -		    getuid(), pid, pid, &ainfo_addr.ai_termid);
 +		    getuid(), pid, &ainfo_addr.ai_asid, &ainfo_addr.ai_termid);
  	} else if (errno == ENOSYS) {
  		if (getaudit(&ainfo) < 0) 
- 			log_error(0, "getaudit: failed");
+ 			log_error(0, _("getaudit: failed"));
  		tok = au_to_subject(auid, geteuid(), getegid(), getuid(),
 -		    getuid(), pid, pid, &ainfo.ai_termid);
 +		    getuid(), pid, &ainfo.ai_asid, &ainfo.ai_termid);
  	} else
- 		log_error(0, "getaudit: failed");
+ 		log_error(0, _("getaudit: failed"));
  	if (tok == NULL)
-@@ -181,6 +182,6 @@
+@@ -181,6 +183,6 @@
  	if (tok == NULL)
- 		log_error(0, "au_to_return32: failed");
+ 		log_error(0, _("au_to_return32: failed"));
  	au_write(aufd, tok);
 -	if (au_close(aufd, 1, AUE_sudo) == -1)
 +	if (au_close(aufd, 1, AUE_sudo, PAD_FAILURE) == -1)
- 		log_error(0, "unable to commit audit record");
+ 		log_error(0, _("unable to commit audit record"));
  }
--- a/components/sudo/patches/compat-build.patch	Wed May 02 04:37:34 2012 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- sudo-1.8.1p2/compat/Makefile.in	Mon Jun 20 05:26:16 2011
-+++ sudo-1.8.1p2.fixes/compat/Makefile.in	Wed Apr  6 12:14:00 2011
-@@ -30,7 +30,7 @@
- LIBTOOL = @LIBTOOL@
- 
- # C preprocessor flags
--CPPFLAGS = -I$(top_builddir) -I$(incdir) @CPPFLAGS@
-+CPPFLAGS = -I$(top_builddir) -I$(incdir) -I$(top_srcdir) @CPPFLAGS@
- 
- # Usually -O and/or -g
- CFLAGS = @CFLAGS@
--- a/components/sudo/sudo.p5m	Wed May 02 04:37:34 2012 -0500
+++ b/components/sudo/sudo.p5m	Wed May 02 12:35:29 2012 +0100
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -84,7 +84,7 @@
 hardlink path=usr/share/man/man1m/sudoedit.1m target=sudo.1m
 hardlink path=usr/bin/sudoedit target=sudo
 
-license sudo.license license="ISC-like, BSD"
+license sudo.license license="ISC-like, BSD, zlib license" 
 
 legacy pkg=SUNWsudo \
     desc="sudo - Tool to allow certain tasks to be run as root by ordinary users." \