- fixed no valid sudoers sources found (#558875)

- audit related Makefile.in and configure.in corrections
- added --with-audit configure option
- removed call to libtoolize
This commit is contained in:
Daniel Kopeček 2010-02-16 23:01:10 +00:00
commit 18d9847564
3 changed files with 88 additions and 3 deletions

View file

@ -0,0 +1,38 @@
diff -up sudo-1.7.2p2/toke.c.empty sudo-1.7.2p2/toke.c
--- sudo-1.7.2p2/toke.c.empty 2010-02-16 23:13:23.000000000 +0100
+++ sudo-1.7.2p2/toke.c 2010-02-16 23:17:57.000000000 +0100
@@ -1421,6 +1421,7 @@ __unused static const char rcsid[] = "$S
#endif /* lint */
extern YYSTYPE yylval;
+extern int parse_error;
int sudolineno = 1;
char *sudoers;
static int sawspace = 0;
@@ -1880,7 +1881,7 @@ YY_RULE_SETUP
LEXTRACE("INCLUDEDIR\n");
/* Push current buffer and switch to include file */
- if (!push_includedir(path))
+ if (!push_includedir(path) && parse_error)
yyterminate();
}
YY_BREAK
@@ -3369,7 +3370,7 @@ switch_dir(stack, dirpath)
if (!(dir = opendir(dirpath))) {
yyerror(dirpath);
- return(FALSE);
+ return(NULL);
}
while ((dent = readdir(dir))) {
/* Ignore files that end in '~' or have a '.' in them. */
@@ -3494,7 +3495,7 @@ _push_include(path, isdir)
}
if (isdir) {
if (!(path = switch_dir(&istack[idepth], path))) {
- yyerror(path);
+ /* yyerror(path); */
return(FALSE);
}
if ((fp = open_sudoers(path, FALSE, &keepopen)) == NULL) {

View file

@ -0,0 +1,32 @@
diff -up sudo-1.7.2p2/configure.in.libaudit sudo-1.7.2p2/configure.in
--- sudo-1.7.2p2/configure.in.libaudit 2010-02-10 16:21:26.000000000 +0100
+++ sudo-1.7.2p2/configure.in 2010-02-10 16:21:26.000000000 +0100
@@ -1752,7 +1752,6 @@ dnl
: ${mansectsu='8'}
: ${mansectform='5'}
-AC_SUBST(LIBAUDIT)
if test "$with_audit" = "yes"; then
# See if we have the audit library
AC_CHECK_HEADER(libaudit.h, [audit_header="yes"], [audit_header="no"])
@@ -1770,6 +1769,8 @@ if test "$with_audit" = "yes"; then
fi
fi
+AC_SUBST(LIBAUDIT)
+
dnl
dnl Add in any libpaths or libraries specified via configure
dnl
diff -up sudo-1.7.2p2/Makefile.in.libaudit sudo-1.7.2p2/Makefile.in
--- sudo-1.7.2p2/Makefile.in.libaudit 2010-02-10 16:26:06.000000000 +0100
+++ sudo-1.7.2p2/Makefile.in 2010-02-10 16:26:40.000000000 +0100
@@ -44,7 +44,7 @@ INSTALL = $(SHELL) $(srcdir)/install-sh
# Libraries
LIBS = @LIBS@
NET_LIBS = @NET_LIBS@
-SUDO_LIBS = @SUDO_LIBS@ @AFS_LIBS@ @GETGROUPS_LIB@ $(LIBS) $(NET_LIBS)
+SUDO_LIBS = @SUDO_LIBS@ @AFS_LIBS@ @GETGROUPS_LIB@ @LIBAUDIT@ $(LIBS) $(NET_LIBS)
# C preprocessor flags
CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@

View file

@ -1,7 +1,7 @@
Summary: Allows restricted root access for specified users
Name: sudo
Version: 1.7.2p2
Release: 3%{?dist}
Release: 4%{?dist}
License: BSD
Group: Applications/System
URL: http://www.courtesan.com/sudo/
@ -33,6 +33,10 @@ Patch5: sudo-1.7.1-getgrouplist.patch
Patch6: sudo-1.7.2p1-audit.patch
# segfault when #include directive is used in cycles (#561336)
Patch7: sudo-1.7.2p2-loopsegv3.patch
# audit related Makefile.in and configure.in corrections
Patch8: sudo-1.7.2p2-libaudit.patch
# no valid sudoers sources found (#558875)
Patch9: sudo-1.7.2p2-emptyincldir.patch
%description
Sudo (superuser do) allows a system administrator to give certain
@ -54,10 +58,14 @@ on many different machines.
%patch5 -p1 -b .getgrouplist
%patch6 -p1 -b .audit
%patch7 -p1 -b .loopsegv3
%patch8 -p1 -b .libaudit
%patch9 -p1 -b .emptyincldir
%build
# handle newer autoconf
libtoolize --force && rm acsite.m4 && mv aclocal.m4 acinclude.m4 && autoreconf
rm acsite.m4
mv aclocal.m4 acinclude.m4
autoreconf -fv --install
%ifarch s390 s390x sparc64
F_PIE=-fPIE
@ -81,7 +89,8 @@ export CFLAGS="$RPM_OPT_FLAGS $F_PIE" LDFLAGS="-pie"
--with-tty-tickets \
--with-ldap \
--with-selinux \
--with-passprompt="[sudo] password for %p: "
--with-passprompt="[sudo] password for %p: " \
--with-audit
# --without-kerb5 \
# --without-kerb4
make
@ -141,6 +150,12 @@ rm -rf $RPM_BUILD_ROOT
/bin/chmod 0440 /etc/sudoers || :
%changelog
* Tue Feb 16 2010 Daniel Kopecek <dkopecek@redhat.com> - 1.7.2p2-4
- fixed no valid sudoers sources found (#558875)
- audit related Makefile.in and configure.in corrections
- added --with-audit configure option
- removed call to libtoolize
* Wed Feb 10 2010 Daniel Kopecek <dkopecek@redhat.com> - 1.7.2p2-3
- fixed segfault when #include directive is used in cycles (#561336)