From: Bernd Schubert This gets added in the fusermount process and kernel then fails the mount. Signed-off-by: Bernd Schubert --- lib/mount_fsmount.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/mount_fsmount.c b/lib/mount_fsmount.c index f1fec790bb80f8815d485a068dc7efdff1746309..76c14cf9a22465160fc6b206ca9b6c9e7300adba 100644 --- a/lib/mount_fsmount.c +++ b/lib/mount_fsmount.c @@ -218,6 +218,16 @@ static int is_mount_attr_opt(const char *opt) strcmp(opt, "symfollow") == 0; } +/** + * Check if an option is a mount table option (not passed to fsconfig) + */ +static int is_mtab_only_opt(const char *opt) +{ + /* These options are for /run/mount/utab only, not for the kernel */ + return strncmp(opt, "user=", 5) == 0 || + strcmp(opt, "rw") == 0; +} + /* * Parse kernel options string and apply via fsconfig * Options are comma-separated key=value pairs @@ -241,7 +251,8 @@ static int apply_mount_opts(int fsfd, const char *opts) opt = strtok_r(opts_copy, ",", &saveptr); while (opt) { /* Skip mount attributes - they're handled by fsmount(), not fsconfig() */ - if (!is_mount_attr_opt(opt)) { + /* Skip mtab-only options - they're for /run/mount/utab, not kernel */ + if (!is_mount_attr_opt(opt) && !is_mtab_only_opt(opt)) { res = apply_opt_key_value(fsfd, opt); if (res < 0) { free(opts_copy); -- 2.43.0