autofs-5.1.5 - use ignore option for offset mounts as well From: Ian Kent The pseudo option "ignore" (that's used as a hint that applications should ignore this mount when reporting a list of mounts) has been added to direct and indirect mounts but hasn't been added to offset mounts. Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/direct.c | 10 ++++++++++ 2 files changed, 11 insertions(+) --- autofs-5.0.7.orig/CHANGELOG +++ autofs-5.0.7/CHANGELOG @@ -335,6 +335,7 @@ - fix amd entry memory leak. - fix unlink_mount_tree() not umounting mounts. - add ignore mount option. +- use ignore option for offset mounts as well. 25/07/2012 autofs-5.0.7 ======================= --- autofs-5.0.7.orig/daemon/direct.c +++ autofs-5.0.7/daemon/direct.c @@ -433,6 +433,16 @@ int do_mount_autofs_direct(struct autofs mp->options = tmp; } } + + if ((ap->flags & MOUNT_FLAG_IGNORE) && + ((get_kver_major() == 5 && get_kver_minor() > 4) || + (get_kver_major() > 5))) { + char *tmp = realloc(mp->options, strlen(mp->options) + 7); + if (tmp) { + strcat(tmp, ",ignore"); + mp->options = tmp; + } + } } /* In case the directory doesn't exist, try to mkdir it */