Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 63

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.3 - fix incorrect multi-mount mountpoint

From: Ian Kent <raven@themaw.net>

Fix case where an incorrect mount point path was being used when
mounting a multi-mount component.
---

 modules/parse_sun.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)


--- autofs-5.0.1.orig/modules/parse_sun.c
+++ autofs-5.0.1/modules/parse_sun.c
@@ -1236,8 +1236,14 @@ static int mount_subtree(struct autofs_p
 				return 1;
 			}
 		} else if (rv < 0) {
+			char *mm_root_base = alloca(strlen(mm_root) + strlen(mm_base) + 1);
+	
 			move = MOUNT_MOVE_NONE;
-			ret = mount_multi_triggers(ap, me->multi, mm_root, start, mm_base);
+
+			strcpy(mm_root_base, mm_root);
+			strcat(mm_root_base, mm_base);
+
+			ret = mount_multi_triggers(ap, me->multi, mm_root_base, start, mm_base);
 			if (ret == -1) {
 				error(ap->logopt, MODPREFIX
 					 "failed to mount offset triggers");