autofs/autofs-5.0.5-fix-error-handing-in-do_mount_indirect.patch
Ian Kent 634bf33499 * Tue Aug 10 2010 Ian Kent <ikent@redhat.com> - 1:5.0.5-28
- remove extra read master map call.
- remove extra cache create call in master_add_map_source().
- fix error handing in do_mount_indirect().
- expire thread use pending mutex.
- explicity link against the Kerberos library.
- remove some log message duplication for verbose logging.
2010-08-10 16:51:22 +08:00

44 lines
1.4 KiB
Diff

autofs-5.0.5 - fix error handing in do_mount_indirect()
From: Ian Kent <raven@themaw.net>
A couple of error returns in do_mount_indirect() fail to notify
the kernel of request status before terminating.
---
CHANGELOG | 1 +
daemon/indirect.c | 4 ++++
2 files changed, 5 insertions(+)
--- autofs-5.0.5.orig/CHANGELOG
+++ autofs-5.0.5/CHANGELOG
@@ -44,6 +44,7 @@
- fix negative cache included map lookup.
- remove state machine timed wait.
- remove extra read master map call.
+- fix error handing in do_mount_indirect().
03/09/2009 autofs-5.0.5
-----------------------
--- autofs-5.0.5.orig/daemon/indirect.c
+++ autofs-5.0.5/daemon/indirect.c
@@ -792,6 +792,9 @@ static void *do_mount_indirect(void *arg
len = ncat_path(buf, sizeof(buf), ap->path, mt.name, mt.len);
if (!len) {
crit(ap->logopt, "path to be mounted is to long");
+ ops->send_fail(ap->logopt,
+ ap->ioctlfd, mt.wait_queue_token,
+ -ENAMETOOLONG);
pthread_setcancelstate(state, NULL);
pthread_exit(NULL);
}
@@ -800,6 +803,7 @@ static void *do_mount_indirect(void *arg
if (status != -1 && !(S_ISDIR(st.st_mode) && st.st_dev == mt.dev)) {
error(ap->logopt,
"indirect trigger not valid or already mounted %s", buf);
+ ops->send_ready(ap->logopt, ap->ioctlfd, mt.wait_queue_token);
pthread_setcancelstate(state, NULL);
pthread_exit(NULL);
}