]> git.pld-linux.org Git - packages/autofs.git/blame - autofs-5.0.4-fix-notify-mount-message-path.patch
- updated to 5.0.5, nfy.
[packages/autofs.git] / autofs-5.0.4-fix-notify-mount-message-path.patch
CommitLineData
e5fd101c
PS
1autofs-5.0.4 - fix notify mount message path
2
3From: Ian Kent <raven@themaw.net>
4
5If logging is set to verbose we want to log the actual path rather
6than the false root. Hoevever, when logging is set to debug we do
7need to show the false root to give us the true picture in relation
8to accompanying log messages.
9---
10
11 CHANGELOG | 1 +
12 daemon/direct.c | 5 ++++-
13 daemon/indirect.c | 5 ++++-
14 3 files changed, 9 insertions(+), 2 deletions(-)
15
16
17diff --git a/CHANGELOG b/CHANGELOG
18index d1cc113..0a0519f 100644
19--- a/CHANGELOG
20+++ b/CHANGELOG
21@@ -51,6 +51,7 @@
22 - always read file maps key lookup fixes.
23 - use srv query for domain dn.
24 - fix not releasing resources when using submounts.
25+- fix notify mount message path.
26
27 4/11/2008 autofs-5.0.4
28 -----------------------
29diff --git a/daemon/direct.c b/daemon/direct.c
30index 1ed2b15..74a9acc 100644
31--- a/daemon/direct.c
32+++ b/daemon/direct.c
33@@ -767,8 +767,11 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char *
34 }
35
36 ops->timeout(ap->logopt, ioctlfd, &timeout);
37- notify_mount_result(ap, mountpoint, str_offset);
38 cache_set_ino_index(me->mc, me->key, st.st_dev, st.st_ino);
39+ if (ap->logopt & LOGOPT_DEBUG)
40+ notify_mount_result(ap, mountpoint, str_offset);
41+ else
42+ notify_mount_result(ap, me->key, str_offset);
43 ops->close(ap->logopt, ioctlfd);
44
45 debug(ap->logopt, "mounted trigger %s at %s", me->key, mountpoint);
46diff --git a/daemon/indirect.c b/daemon/indirect.c
47index bc39e63..463b39c 100644
48--- a/daemon/indirect.c
49+++ b/daemon/indirect.c
50@@ -174,7 +174,10 @@ static int do_mount_autofs_indirect(struct autofs_point *ap, const char *root)
51 ap->exp_runfreq = (timeout + CHECK_RATIO - 1) / CHECK_RATIO;
52
53 ops->timeout(ap->logopt, ap->ioctlfd, &timeout);
54- notify_mount_result(ap, root, str_indirect);
55+ if (ap->logopt & LOGOPT_DEBUG)
56+ notify_mount_result(ap, root, str_indirect);
57+ else
58+ notify_mount_result(ap, ap->path, str_indirect);
59
60 return 0;
61
This page took 0.04835 seconds and 4 git commands to generate.