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 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) 2021-01-28 Werner Baumann (werner.baumann@onlinehome.de)
* mount_davfs.c, write_mtab_entry: * mount_davfs.c, write_mtab_entry:
Add option _netdev to utab-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 /* 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 All strings returned in args are newly allocated, and the calling function
is responsible to free them. is responsible to free them.
option : a comma separated list of options (like the options in fstab and 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, NOEXEC,
DEV, DEV,
NODEV, NODEV,
ASYNC,
AUTO,
NOAUTO,
COMMENT,
NOFAIL,
DEFAULTS,
END END
}; };
char *suboptions[] = { char *suboptions[] = {
@ -1580,12 +1574,6 @@ get_options(dav_args *args, char *option)
[NOEXEC] = "noexec", [NOEXEC] = "noexec",
[DEV] = "dev", [DEV] = "dev",
[NODEV] = "nodev", [NODEV] = "nodev",
[ASYNC] = "async",
[AUTO] = "auto",
[NOAUTO] = "noauto",
[COMMENT] = "comment",
[NOFAIL] = "nofail",
[DEFAULTS] = "defaults",
[END] = NULL [END] = NULL
}; };


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