autofs-5.0.3 - fix incorrect multi-mount mountpoint Fix case where an incorrect mount point path was being used when mounting a multi-mount component. diff --git a/CHANGELOG b/CHANGELOG index 8609efb..249cf80 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -37,6 +37,7 @@ - dynamically allocate interface config buffer. - update kernel patches. - fix fd leak at multi-mount non-fatal mount fail. +- fix incorrect multi-mount mountpoint calcualtion. 14/01/2008 autofs-5.0.3 ----------------------- diff --git a/modules/parse_sun.c b/modules/parse_sun.c index 333f8a5..5a39113 100644 --- a/modules/parse_sun.c +++ b/modules/parse_sun.c @@ -1248,8 +1248,14 @@ static int mount_subtree(struct autofs_point *ap, struct mapent *me, 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"); !-------------------------------------------------------------flip-