Skip to content

Commit

Permalink
Merge pull request omniti-labs#88 from hadfl/sudo_1.8.20p2
Browse files Browse the repository at this point in the history
sudo: update to sudo 1.8.20p2
  • Loading branch information
oetiker authored Jul 20, 2017
2 parents 13f3818 + 40e66bd commit 7d7e673
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 194 deletions.
5 changes: 3 additions & 2 deletions build/sudo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
. ../../lib/functions.sh

PROG=sudo
VER=1.8.7
VER=1.8.20p2
VERHUMAN=$VER
PKG=security/sudo
SUMMARY="$PROG - authority delegation tool"
Expand All @@ -43,7 +43,7 @@ CFLAGS="$CFLAGS -fno-stack-protector"
CONFIGURE_OPTS="
--with-ldap
--with-project
--with-timedir=/var/run/sudo
--with-rundir=/var/run/sudo
--with-pam --with-pam-login
--with-tty-tickets
--without-insults
Expand All @@ -62,6 +62,7 @@ make_install64() {
logcmd rm -rf $DESTDIR/usr/bin/amd64
logcmd rm -rf $DESTDIR/usr/sbin/amd64
logcmd rm -rf $DESTDIR/usr/include/amd64
logcmd rm -rf $DESTDIR/var/db
}

init
Expand Down
10 changes: 10 additions & 0 deletions build/sudo/patches/Makefile.in.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- sudo-1.8.20p2/Makefile.in Wed May 10 17:38:43 2017
+++ sudo-1.8.20p2/Makefile.in Sun Jul 9 17:06:55 2017
@@ -63,7 +63,6 @@
SED = @SED@

INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
-INSTALL_OWNER = -o $(install_uid) -g $(install_gid)

ECHO_N = @ECHO_N@
ECHO_C = @ECHO_C@
42 changes: 31 additions & 11 deletions build/sudo/patches/audit-event.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
--- sudo-1.8.4p1/plugins/sudoers/bsm_audit.c Mon Jan 9 17:37:13 2012
+++ sudo-1.8.4p1/plugins/sudoers/bsm_audit.c Sun Feb 26 15:55:55 2012
@@ -31,9 +31,10 @@
#include <unistd.h>

#include "gettext.h"
-#include "error.h"
#include "sudo_debug.h"
+#include "error.h"
--- sudo-1.8.20p2/plugins/sudoers/bsm_audit.c Sun Jul 9 12:35:16 2017
+++ sudo-1.8.20p2/plugins/sudoers/bsm_audit.c Sun Jul 9 12:34:08 2017
@@ -34,6 +34,7 @@

#include "sudoers.h"
#include "bsm_audit.h"
+#define AUE_sudo 6650
+#define AUE_sudo 6650

/*
* Solaris auditon() returns EINVAL if BSM audit not configured.
@@ -163,11 +164,7 @@
debug_return_int(-1);
}
au_write(aufd, tok);
-#ifdef __sun
- if (au_close(aufd, 1, sudo_audit_event, 0) == -1)
-#else
if (au_close(aufd, 1, sudo_audit_event) == -1)
-#endif
{
sudo_warn(U_("unable to commit audit record"));
debug_return_int(-1);
@@ -251,11 +248,7 @@
debug_return_int(-1);
}
au_write(aufd, tok);
-#ifdef __sun
- if (au_close(aufd, 1, sudo_audit_event, PAD_FAILURE) == -1)
-#else
if (au_close(aufd, 1, sudo_audit_event) == -1)
-#endif
{
sudo_warn(U_("unable to commit audit record"));
debug_return_int(-1);
15 changes: 7 additions & 8 deletions build/sudo/patches/gettext.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
diff -bur sudo-1.8.7.pristine/config.h.in sudo-1.8.7/config.h.in
--- sudo-1.8.7.pristine/config.h.in 2013-06-04 09:49:25.000000000 +0000
+++ sudo-1.8.7/config.h.in 2013-11-13 19:20:29.015909468 +0000
@@ -1025,4 +1025,7 @@
# define BSD_COMP
#endif /* __svr4__ */

--- sudo-1.8.20p2/config.h.in Wed May 31 17:13:28 2017
+++ sudo-1.8.20p2/config.h.in Sun Jul 9 16:59:22 2017
@@ -1257,4 +1257,7 @@
# define NO_LEAKS
#endif

+#include <libintl.h>
+#define _(String) gettext(String)
+
#endif /* _SUDO_CONFIG_H */
#endif /* SUDO_CONFIG_H */
55 changes: 0 additions & 55 deletions build/sudo/patches/libs.patch

This file was deleted.

2 changes: 1 addition & 1 deletion build/sudo/patches/printflike.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef _SUDO_DEBUG_H
#define _SUDO_DEBUG_H

+#include "missing.h"
+#include "sudo_compat.h"
#include <stdarg.h>

/*
5 changes: 2 additions & 3 deletions build/sudo/patches/series
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
audit-event.patch
printflike.patch
libs.patch
ssp.patch
gettext.patch
tz1.patch
sudo_edit.c.patch
Makefile.in.patch
25 changes: 0 additions & 25 deletions build/sudo/patches/ssp.patch

This file was deleted.

14 changes: 14 additions & 0 deletions build/sudo/patches/sudo_edit.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- sudo-1.8.20p2/src/sudo_edit.c Sat Jan 14 05:30:15 2017
+++ sudo-1.8.20p2/src/sudo_edit.c Sun Jul 9 15:19:35 2017
@@ -377,9 +377,9 @@
* Directory open flags for use with openat(2).
* Use O_SEARCH/O_PATH and/or O_DIRECTORY where possible.
*/
-#if defined(O_SEARCH)
+#if defined(O_SEARCH) && defined(O_DIRECTORY)
# define DIR_OPEN_FLAGS (O_SEARCH|O_DIRECTORY)
-#elif defined(O_PATH)
+#elif defined(O_PATH) && defined(O_DIRECTORY)
# define DIR_OPEN_FLAGS (O_PATH|O_DIRECTORY)
#elif defined(O_DIRECTORY)
# define DIR_OPEN_FLAGS (O_RDONLY|O_DIRECTORY)
89 changes: 0 additions & 89 deletions build/sudo/patches/tz1.patch

This file was deleted.

0 comments on commit 7d7e673

Please sign in to comment.