- fix mntent.h not included before use of setmntent_r().

This commit is contained in:
Ian Kent 2009-02-19 00:15:32 +00:00
parent c5187b0dbf
commit d858d36499
2 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,49 @@
autofs-5.0.4 - use CLOEXEC flag setmntent include fix
From: Ian Kent <raven@themaw.net>
Fix mntent.h not included before use of setmntent_r() in automount.h.
---
include/automount.h | 1 +
lib/dev-ioctl-lib.c | 1 -
lib/mounts.c | 1 -
3 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/include/automount.h b/include/automount.h
index 1f14d5b..615e07d 100644
--- a/include/automount.h
+++ b/include/automount.h
@@ -19,6 +19,7 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
+#include <mntent.h>
#include "config.h"
#include "list.h"
diff --git a/lib/dev-ioctl-lib.c b/lib/dev-ioctl-lib.c
index 056a0a9..7c8c433 100644
--- a/lib/dev-ioctl-lib.c
+++ b/lib/dev-ioctl-lib.c
@@ -22,7 +22,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
-#include <mntent.h>
#include <sys/vfs.h>
#include "automount.h"
diff --git a/lib/mounts.c b/lib/mounts.c
index 08ca4e3..4787bb6 100644
--- a/lib/mounts.c
+++ b/lib/mounts.c
@@ -14,7 +14,6 @@
#include <stdlib.h>
#include <string.h>
-#include <mntent.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.4
Release: 9
Release: 10
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@ -31,6 +31,7 @@ Patch18: autofs-5.0.4-easy-alloca-replacements.patch
Patch19: autofs-5.0.4-configure-libtirpc.patch
Patch20: autofs-5.0.4-ipv6-name-and-address-support.patch
Patch21: autofs-5.0.4-ipv6-parse.patch
Patch22: autofs-5.0.4-use-CLOEXEC-flag-setmntent-include-fix.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs
Requires: kernel >= 2.6.17
@ -93,6 +94,7 @@ echo %{version}-%{release} > .version
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@ -145,6 +147,9 @@ fi
%{_libdir}/autofs/
%changelog
* Thu Feb 19 2009 Ian Kent <ikent@redhat.com> - 5.0.4-10
- fix mntent.h not included before use of setmntent_r().
* Mon Feb 16 2009 Ian Kent <ikent@redhat.com> - 5.0.4-9
- fix hosts map use after free.
- fix uri list locking (again).