diff --git a/CHANGELOG b/CHANGELOG index decfff7..aee056c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -53,6 +53,7 @@ xx/xx/2018 autofs-5.1.5 - make expire remaining log level debug. - allow period following macro in selector value. - fix macro expansion in selector values. +- also use strictexpire for offsets. 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/daemon/direct.c b/daemon/direct.c index bdec556..f92bcc0 100644 --- a/daemon/direct.c +++ b/daemon/direct.c @@ -743,6 +743,16 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char * mp->options = make_options_string(ap->path, ap->kpipefd, str_offset); if (!mp->options) return MOUNT_OFFSET_OK; + + if ((ap->flags & MOUNT_FLAG_STRICTEXPIRE) && + ((get_kver_major() == 5 && get_kver_minor() > 3) || + (get_kver_major() > 5))) { + char *tmp = realloc(mp->options, strlen(mp->options) + 12); + if (tmp) { + strcat(tmp, ",strictexpire"); + mp->options = tmp; + } + } } strcpy(mountpoint, root);