diff --git a/CHANGELOG b/CHANGELOG index bb8b476..d77645c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -61,6 +61,7 @@ xx/xx/2018 autofs-5.1.5 - fix amd entry memory leak. - fix unlink_mount_tree() not umounting mounts. - add ignore mount option. +- use ignore option for offset mounts as well. 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/daemon/direct.c b/daemon/direct.c index 5b532a5..a11801b 100644 --- a/daemon/direct.c +++ b/daemon/direct.c @@ -756,6 +756,16 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char * 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; + } + } } strcpy(mountpoint, root);