]>
Commit | Line | Data |
---|---|---|
e5fd101c PS |
1 | autofs-5.0.4 - fix notify mount message path |
2 | ||
3 | From: Ian Kent <raven@themaw.net> | |
4 | ||
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. | |
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 | ||
17 | diff --git a/CHANGELOG b/CHANGELOG | |
18 | index 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 | ----------------------- | |
29 | diff --git a/daemon/direct.c b/daemon/direct.c | |
30 | index 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); | |
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; | |
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 |