OBS User unknown 2008-11-21 14:13:03 +00:00 committed by Git OBS Bridge
parent e10a1c6294
commit 251d24e5a4
4 changed files with 66 additions and 7 deletions

50
audit-445353.patch Normal file
View File

@ -0,0 +1,50 @@
From: tonyj@suse.de
Date: Tue Nov 18 18:08:32 CET 2008
References: 445353
Upstream: no
Flush stdout if pipe. Prevents output being queued in pipebuf if input fails
to signal EOF.
--- audit-1.2.9/src/ausearch.c.old 2008-11-17 15:55:47.000000000 -0800
+++ audit-1.2.9/src/ausearch.c 2008-11-17 16:06:54.000000000 -0800
@@ -58,11 +58,11 @@
extern int match(llist *l);
extern void output_record(llist *l);
-static int input_is_pipe(void)
+static int is_pipe(int fd)
{
struct stat st;
- if (fstat(0, &st) == 0) {
+ if (fstat(fd, &st) == 0) {
if (S_ISFIFO(st.st_mode))
pipe_mode = 1;
}
@@ -92,7 +92,7 @@
rc = process_file(user_file);
else if (force_logs)
rc = process_logs();
- else if (input_is_pipe())
+ else if (is_pipe(0))
rc = process_stdin();
else
rc = process_logs();
@@ -175,6 +175,7 @@
{
llist entries; // entries in a record
int ret;
+ int flush = is_pipe(1);
/* For each record in file */
list_create(&entries);
@@ -185,6 +186,8 @@
}
if (match(&entries)) {
output_record(&entries);
+ if (flush)
+ fflush(stdout);
found = 1;
if (just_one) {
list_clear(&entries);

View File

@ -26,7 +26,7 @@ Summary: Python Bindings for libaudit
License: GPL v2 or later License: GPL v2 or later
Group: System/Monitoring Group: System/Monitoring
Version: 1.7.7 Version: 1.7.7
Release: 2 Release: 3
Url: http://people.redhat.com/sgrubb/audit/ Url: http://people.redhat.com/sgrubb/audit/
Source0: audit-%{version}.tar.bz2 Source0: audit-%{version}.tar.bz2
Patch0: audit-no_sca.patch Patch0: audit-no_sca.patch
@ -150,7 +150,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz %attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz
%changelog %changelog
* Sat Sep 27 2008 tonyj@suse.de * Fri Sep 26 2008 tonyj@suse.de
- Update from 1.7.4 to 1.7.7 (see audit.changes for upstream change - Update from 1.7.4 to 1.7.7 (see audit.changes for upstream change
history) history)
* Fri Aug 01 2008 ro@suse.de * Fri Aug 01 2008 ro@suse.de
@ -171,7 +171,7 @@ rm -rf $RPM_BUILD_ROOT
to minimise bootstrap dependancies. to minimise bootstrap dependancies.
* Tue Mar 18 2008 schwab@suse.de * Tue Mar 18 2008 schwab@suse.de
- Use autoreconf. - Use autoreconf.
* Thu Oct 11 2007 tonyj@suse.de * Wed Oct 10 2007 tonyj@suse.de
- Upgrade to 1.6.2 - Upgrade to 1.6.2
* Wed Jul 25 2007 tonyj@suse.de * Wed Jul 25 2007 tonyj@suse.de
- Upgrade to 1.5.5 - Upgrade to 1.5.5
@ -187,7 +187,7 @@ rm -rf $RPM_BUILD_ROOT
- /usr/sbin/audispd now packaged by audit-libs-python - /usr/sbin/audispd now packaged by audit-libs-python
* Sun Nov 05 2006 ro@suse.de * Sun Nov 05 2006 ro@suse.de
- fix requires - fix requires
* Fri Sep 01 2006 tonyj@suse.de * Thu Aug 31 2006 tonyj@suse.de
- Upgrade to 1.2.6-1 - Upgrade to 1.2.6-1
* Wed Aug 16 2006 cthiel@suse.de * Wed Aug 16 2006 cthiel@suse.de
- split off package - split off package

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Nov 21 08:45:03 CET 2008 - tonyj@suse.de
- Force ausearch to flush stdout if pipe (bnc#445353)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 30 12:34:56 CET 2008 - olh@suse.de Thu Oct 30 12:34:56 CET 2008 - olh@suse.de

View File

@ -22,7 +22,7 @@ Name: audit
BuildRequires: gcc-c++ tcpd-devel BuildRequires: gcc-c++ tcpd-devel
Summary: User Space Tools for 2.6 Kernel Auditing Summary: User Space Tools for 2.6 Kernel Auditing
Version: 1.7.7 Version: 1.7.7
Release: 2 Release: 3
License: GPL v2 or later License: GPL v2 or later
Group: System/Monitoring Group: System/Monitoring
Url: http://people.redhat.com/sgrubb/audit/ Url: http://people.redhat.com/sgrubb/audit/
@ -33,6 +33,7 @@ Patch0: audit-no_sca.patch
Patch1: audit-no_python.patch Patch1: audit-no_python.patch
Patch2: audit-no_plugins.patch Patch2: audit-no_plugins.patch
Patch3: audit-no-gss.patch Patch3: audit-no-gss.patch
Patch4: audit-445353.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
PreReq: %insserv_prereq %fillup_prereq PreReq: %insserv_prereq %fillup_prereq
@ -94,6 +95,7 @@ Authors:
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
%build %build
autoreconf -fi autoreconf -fi
@ -222,9 +224,11 @@ fi
%attr(755,root,root) /usr/bin/ausyscall %attr(755,root,root) /usr/bin/ausyscall
%changelog %changelog
* Fri Nov 21 2008 tonyj@suse.de
- Force ausearch to flush stdout if pipe (bnc#445353)
* Thu Oct 30 2008 olh@suse.de * Thu Oct 30 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293) - obsolete old -XXbit packages (bnc#437293)
* Sat Sep 27 2008 tonyj@suse.de * Fri Sep 26 2008 tonyj@suse.de
- Update from 1.7.4 to 1.7.7. GSS support disabled for present - Update from 1.7.4 to 1.7.7. GSS support disabled for present
- Redhat changelog for 1.7.5 - 1.7.7 follows: - Redhat changelog for 1.7.5 - 1.7.7 follows:
* Wed Sep 11 2008 Steve Grubb <sgrubb@redhat.com> 1.7.7-1 * Wed Sep 11 2008 Steve Grubb <sgrubb@redhat.com> 1.7.7-1
@ -379,7 +383,7 @@ fi
- Incorporate 1 more Redhat fixe post 1.6.2 - Incorporate 1 more Redhat fixe post 1.6.2
- Go back to 10.2 behaviour wrt to starting in disabled state. - Go back to 10.2 behaviour wrt to starting in disabled state.
This time using patch submitted upstream, fix for #Bug 333739 This time using patch submitted upstream, fix for #Bug 333739
* Thu Oct 11 2007 tonyj@suse.de * Wed Oct 10 2007 tonyj@suse.de
- Upgrade to 1.6.2 - Upgrade to 1.6.2
Plus two bugs discovered in Fedora, will be fixed in 1.6.3 Plus two bugs discovered in Fedora, will be fixed in 1.6.3
* Wed Jul 25 2007 tonyj@suse.de * Wed Jul 25 2007 tonyj@suse.de