1 autofs-5.0.4 - fix notify mount message path
3 From: Ian Kent <raven@themaw.net>
5 If logging is set to verbose we want to log the actual path rather
6 than the false root. Hoevever, when logging is set to debug we do
7 need to show the false root to give us the true picture in relation
8 to accompanying log messages.
12 daemon/direct.c | 5 ++++-
13 daemon/indirect.c | 5 ++++-
14 3 files changed, 9 insertions(+), 2 deletions(-)
17 diff --git a/CHANGELOG b/CHANGELOG
18 index d1cc113..0a0519f 100644
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.
27 4/11/2008 autofs-5.0.4
28 -----------------------
29 diff --git a/daemon/direct.c b/daemon/direct.c
30 index 1ed2b15..74a9acc 100644
33 @@ -767,8 +767,11 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char *
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);
42 + notify_mount_result(ap, me->key, str_offset);
43 ops->close(ap->logopt, ioctlfd);
45 debug(ap->logopt, "mounted trigger %s at %s", me->key, mountpoint);
46 diff --git a/daemon/indirect.c b/daemon/indirect.c
47 index 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;
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);
58 + notify_mount_result(ap, ap->path, str_indirect);