rpms/autofs/devel autofs-5.0.3-fix-fd-leak-at-multi-mount-fail.patch, NONE, 1.1 autofs-5.0.3-fix-incorrect-multi-mount-mountpoint.patch, NONE, 1.1 autofs.spec, 1.251, 1.252
Ian Kent
iankent at fedoraproject.org
Fri Sep 26 06:07:30 UTC 2008
- Previous message (by thread): rpms/perl-Data-Dump/F-8 perl-Data-Dump.spec, 1.2, 1.3 sources, 1.2, 1.3
- Next message (by thread): rpms/perl-Config-Any/devel .cvsignore, 1.4, 1.5 perl-Config-Any.spec, 1.5, 1.6 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: iankent
Update of /cvs/pkgs/rpms/autofs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12686
Modified Files:
autofs.spec
Added Files:
autofs-5.0.3-fix-fd-leak-at-multi-mount-fail.patch
autofs-5.0.3-fix-incorrect-multi-mount-mountpoint.patch
Log Message:
* Fri Sep 26 2008 Ian Kent <ikent at redhat.com> - 5.0.3-25
- fix fd leak at multi-mount non-fatal mount fail.
- fix incorrect multi-mount mountpoint calcualtion.
autofs-5.0.3-fix-fd-leak-at-multi-mount-fail.patch:
--- NEW FILE autofs-5.0.3-fix-fd-leak-at-multi-mount-fail.patch ---
autofs-5.0.3 - fix fd leak at multi-mount fail
From: Ian Kent <raven at themaw.net>
Fix file handle being left open following a multi-mount non-fatal mount
fail.
---
daemon/direct.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/daemon/direct.c b/daemon/direct.c
index 13f572c..b94601a 100644
--- a/daemon/direct.c
+++ b/daemon/direct.c
@@ -1303,12 +1303,20 @@ static void *do_mount_direct(void *arg)
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &state);
if (status) {
struct mapent *me;
+ struct statfs fs;
+ unsigned int close_fd = 0;
+
+ if (statfs(mt.name, &fs) == -1 ||
+ (fs.f_type == AUTOFS_SUPER_MAGIC &&
+ !master_find_submount(ap, mt.name)))
+ close_fd = 1;
cache_writelock(mt.mc);
- me = cache_lookup_distinct(mt.mc, mt.name);
- if (me)
+ if (!close_fd && (me = cache_lookup_distinct(mt.mc, mt.name)))
me->ioctlfd = mt.ioctlfd;
send_ready(ap->logopt, mt.ioctlfd, mt.wait_queue_token);
cache_unlock(mt.mc);
+ if (close_fd)
+ close(mt.ioctlfd);
info(ap->logopt, "mounted %s", mt.name);
} else {
send_fail(ap->logopt, mt.ioctlfd, mt.wait_queue_token);
autofs-5.0.3-fix-incorrect-multi-mount-mountpoint.patch:
--- NEW FILE autofs-5.0.3-fix-incorrect-multi-mount-mountpoint.patch ---
autofs-5.0.3 - fix incorrect multi-mount mountpoint
From: Ian Kent <raven at themaw.net>
Fix case where an incorrect mount point path was being used when
mounting a multi-mount component.
---
modules/parse_sun.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 333f8a5..5a39113 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -1248,8 +1248,14 @@ static int mount_subtree(struct autofs_point *ap, struct mapent *me,
return 1;
}
} else if (rv < 0) {
+ char *mm_root_base = alloca(strlen(mm_root) + strlen(mm_base) + 1);
+
move = MOUNT_MOVE_NONE;
- ret = mount_multi_triggers(ap, me->multi, mm_root, start, mm_base);
+
+ strcpy(mm_root_base, mm_root);
+ strcat(mm_root_base, mm_base);
+
+ ret = mount_multi_triggers(ap, me->multi, mm_root_base, start, mm_base);
if (ret == -1) {
error(ap->logopt, MODPREFIX
"failed to mount offset triggers");
Index: autofs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/devel/autofs.spec,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -r1.251 -r1.252
--- autofs.spec 19 Sep 2008 09:00:03 -0000 1.251
+++ autofs.spec 26 Sep 2008 06:07:00 -0000 1.252
@@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.3
-Release: 23
+Release: 25
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@@ -57,6 +57,8 @@
Patch45: autofs-5.0.3-handle-zero-length-nis-key-update.patch
Patch46: autofs-5.0.3-fix-ifc-buff-size-fix-2.patch
Patch47: autofs-5.0.3-check-for-kernel-automount-fix.patch
+Patch48: autofs-5.0.3-fix-fd-leak-at-multi-mount-fail.patch
+Patch49: autofs-5.0.3-fix-incorrect-multi-mount-mountpoint.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
@@ -145,6 +147,8 @@
%patch45 -p1
%patch46 -p1
%patch47 -p1
+%patch48 -p1
+%patch49 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -197,6 +201,10 @@
%{_libdir}/autofs/
%changelog
+* Fri Sep 26 2008 Ian Kent <ikent at redhat.com> - 5.0.3-25
+- fix fd leak at multi-mount non-fatal mount fail.
+- fix incorrect multi-mount mountpoint calcualtion.
+
* Fri Sep 19 2008 Ian Kent <ikent at redhat.com> - 5.0.3-23
- add upstream bug fixes
- bug fix for mtab check.
- Previous message (by thread): rpms/perl-Data-Dump/F-8 perl-Data-Dump.spec, 1.2, 1.3 sources, 1.2, 1.3
- Next message (by thread): rpms/perl-Config-Any/devel .cvsignore, 1.4, 1.5 perl-Config-Any.spec, 1.5, 1.6 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list