- Fix bz 476798 - "auditd -n" does not work
This commit is contained in:
parent
0784c5c460
commit
c28fd1e4b9
35
audit-1.7.11-session.patch
Normal file
35
audit-1.7.11-session.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Index: /trunk/src/auditd.c
|
||||||
|
===================================================================
|
||||||
|
--- /trunk/src/auditd.c (revision 160)
|
||||||
|
+++ /trunk/src/auditd.c (revision 213)
|
||||||
|
@@ -305,12 +305,14 @@
|
||||||
|
/* Open stdin,out,err to /dev/null */
|
||||||
|
fd = open("/dev/null", O_RDWR);
|
||||||
|
- if (fd < 0)
|
||||||
|
+ if (fd < 0) {
|
||||||
|
+ audit_msg(LOG_ERR, "Cannot open /dev/null");
|
||||||
|
return -1;
|
||||||
|
- if (dup2(fd, 0) < 0)
|
||||||
|
+ }
|
||||||
|
+ if ((dup2(fd, 0) < 0) || (dup2(fd, 1) < 0) ||
|
||||||
|
+ (dup2(fd, 2) < 0)) {
|
||||||
|
+ audit_msg(LOG_ERR,
|
||||||
|
+ "Cannot reassign descriptors to /dev/null");
|
||||||
|
return -1;
|
||||||
|
- if (dup2(fd, 1) < 0)
|
||||||
|
- return -1;
|
||||||
|
- if (dup2(fd, 2) < 0)
|
||||||
|
- return -1;
|
||||||
|
+ }
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
@@ -318,7 +320,6 @@
|
||||||
|
chdir("/");
|
||||||
|
|
||||||
|
- /* Change session */
|
||||||
|
- if (setsid() < 0)
|
||||||
|
- return -1;
|
||||||
|
+ /* Become session/process group leader */
|
||||||
|
+ setsid();
|
||||||
|
break;
|
||||||
|
case -1:
|
@ -1,7 +1,7 @@
|
|||||||
%define audit_version 1.7.10
|
%define audit_version 1.7.10
|
||||||
%define audit_release 1%{?dist}
|
%define audit_release 2%{?dist}
|
||||||
%define sca_version 0.4.8
|
%define sca_version 0.4.8
|
||||||
%define sca_release 12
|
%define sca_release 13
|
||||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
|
|
||||||
Summary: User space tools for 2.6 kernel auditing
|
Summary: User space tools for 2.6 kernel auditing
|
||||||
@ -12,6 +12,7 @@ License: GPLv2+
|
|||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://people.redhat.com/sgrubb/audit/
|
URL: http://people.redhat.com/sgrubb/audit/
|
||||||
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
|
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
|
||||||
|
Patch1: audit-1.7.11-session.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: gettext-devel intltool libtool swig python-devel
|
BuildRequires: gettext-devel intltool libtool swig python-devel
|
||||||
BuildRequires: tcp_wrappers-devel
|
BuildRequires: tcp_wrappers-devel
|
||||||
@ -89,6 +90,7 @@ A graphical utility for editing audit configuration.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1 -p2
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --sbindir=/sbin --libdir=/%{_lib} --with-prelude --with-libwrap --enable-gssapi-krb5=no
|
%configure --sbindir=/sbin --libdir=/%{_lib} --with-prelude --with-libwrap --enable-gssapi-krb5=no
|
||||||
@ -259,6 +261,9 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/security/console.apps/system-config-audit-server
|
%config(noreplace) %{_sysconfdir}/security/console.apps/system-config-audit-server
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 17 2008 Steve Grubb <sgrubb@redhat.com> 1.7.10-2
|
||||||
|
- Fix bz 476798 - "auditd -n" does not work
|
||||||
|
|
||||||
* Sat Dec 13 2008 Steve Grubb <sgrubb@redhat.com> 1.7.10-1
|
* Sat Dec 13 2008 Steve Grubb <sgrubb@redhat.com> 1.7.10-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user