/[packages]/cauldron/autofs/current/SOURCES/autofs-5.0.5-fix-error-handing-in-do_mount_indirect.patch
ViewVC logotype

Contents of /cauldron/autofs/current/SOURCES/autofs-5.0.5-fix-error-handing-in-do_mount_indirect.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49039 - (show annotations) (download)
Tue Feb 8 16:35:13 2011 UTC (10 years, 5 months ago) by ennael
File size: 1495 byte(s)
imported package autofs
1 autofs-5.0.5 - fix error handing in do_mount_indirect()
2
3 From: Ian Kent <raven@themaw.net>
4
5 A couple of error returns in do_mount_indirect() fail to notify
6 the kernel of request status before terminating.
7 ---
8
9 CHANGELOG | 1 +
10 daemon/indirect.c | 4 ++++
11 2 files changed, 5 insertions(+), 0 deletions(-)
12
13
14 diff --git a/CHANGELOG b/CHANGELOG
15 index e5d743b..5f6465a 100644
16 --- a/CHANGELOG
17 +++ b/CHANGELOG
18 @@ -45,6 +45,7 @@
19 - fix negative cache included map lookup.
20 - remove state machine timed wait.
21 - remove extra read master map call.
22 +- fix error handing in do_mount_indirect().
23
24 03/09/2009 autofs-5.0.5
25 -----------------------
26 diff --git a/daemon/indirect.c b/daemon/indirect.c
27 index 8025ee4..09d784b 100644
28 --- a/daemon/indirect.c
29 +++ b/daemon/indirect.c
30 @@ -792,6 +792,9 @@ static void *do_mount_indirect(void *arg)
31 len = ncat_path(buf, sizeof(buf), ap->path, mt.name, mt.len);
32 if (!len) {
33 crit(ap->logopt, "path to be mounted is to long");
34 + ops->send_fail(ap->logopt,
35 + ap->ioctlfd, mt.wait_queue_token,
36 + -ENAMETOOLONG);
37 pthread_setcancelstate(state, NULL);
38 pthread_exit(NULL);
39 }
40 @@ -800,6 +803,7 @@ static void *do_mount_indirect(void *arg)
41 if (status != -1 && !(S_ISDIR(st.st_mode) && st.st_dev == mt.dev)) {
42 error(ap->logopt,
43 "indirect trigger not valid or already mounted %s", buf);
44 + ops->send_ready(ap->logopt, ap->ioctlfd, mt.wait_queue_token);
45 pthread_setcancelstate(state, NULL);
46 pthread_exit(NULL);
47 }

  ViewVC Help
Powered by ViewVC 1.1.28