Ignore alle unknown options

This commit is contained in:
wbaumann 2021-04-08 09:48:56 +00:00
parent 5f2edb3284
commit c3be7d69f3
2 changed files with 6 additions and 25 deletions

View File

@ -1,6 +1,10 @@
ChangeLog for davfs2
--------------------

2021-04-08 Werner Baumann (werner.baumann@onlinehome.de)
* mount.davfs.c, get_options:
Ignore all unknown options.

2021-01-28 Werner Baumann (werner.baumann@onlinehome.de)
* mount_davfs.c, write_mtab_entry:
Add option _netdev to utab-entry.

View File

@ -1518,7 +1518,7 @@ expand_home(char **dir, const dav_args *args)
}

/* Parses the string option and stores the values in the appropriate fields of
args. If an unknown option is found exit(EXIT_FAILURE) is called.
args.
All strings returned in args are newly allocated, and the calling function
is responsible to free them.
option : a comma separated list of options (like the options in fstab and
@ -1550,12 +1550,6 @@ get_options(dav_args *args, char *option)
NOEXEC,
DEV,
NODEV,
ASYNC,
AUTO,
NOAUTO,
COMMENT,
NOFAIL,
DEFAULTS,
END
};
char *suboptions[] = {
@ -1580,12 +1574,6 @@ get_options(dav_args *args, char *option)
[NOEXEC] = "noexec",
[DEV] = "dev",
[NODEV] = "nodev",
[ASYNC] = "async",
[AUTO] = "auto",
[NOAUTO] = "noauto",
[COMMENT] = "comment",
[NOFAIL] = "nofail",
[DEFAULTS] = "defaults",
[END] = NULL
};

@ -1681,19 +1669,8 @@ get_options(dav_args *args, char *option)
case NODEV:
args->mopts |= MS_NODEV;
break;
case ASYNC:
case AUTO:
case NOAUTO:
case COMMENT:
case NOFAIL:
case DEFAULTS:
break;
default:
if (so == -1) {
printf(_("Unknown option %s.\n"), argument);
usage();
exit(EXIT_FAILURE);
}
break;
}
}
args->mopts |= DAV_MOPTS;