From: Karel Zak Date: Wed, 27 Nov 2024 13:10:36 +0000 (+0100) Subject: mount: use ul_optstr_is_valid() X-Git-Tag: v2.42-start~130^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee1a3f832a55e1f7ad4dd0f779df5aa29c345c64;p=thirdparty%2Futil-linux.git mount: use ul_optstr_is_valid() Remove verification in mount(8) and instead use validation based on parser. Signed-off-by: Karel Zak --- diff --git a/sys-utils/mount.c b/sys-utils/mount.c index 4ec9b50d1..af33b2109 100644 --- a/sys-utils/mount.c +++ b/sys-utils/mount.c @@ -447,10 +447,10 @@ static void append_option(struct libmnt_context *cxt, const char *opt, const cha { char *o = NULL; - if (opt && (*opt == '=' || *opt == '\'' || *opt == '\"' || isblank(*opt))) + if (opt && !ul_optstr_is_valid(opt)) errx(MNT_EX_USAGE, _("unsupported option format: %s"), opt); - if (arg && *arg) + if (opt && arg && *arg) xasprintf(&o, "%s=\"%s\"", opt, arg); if (mnt_context_append_options(cxt, o ? : opt))