mount_service: don't pass the chopped buffer to apply_fsconfig_mount_opts

If mount_service_handle_mntopts_cmd previously looked at the mount
options to screen for allow_{other,root}, then tokstr (aka oc->value)
has been modified and not put back.  This causes truncation of the mount
options passed to fsconfig, so let's use the snapshot that we took
previously.  Codex noticed this.

Fixes: 7211953256 ("mount_service: use the fsmount API helpers from mount_fsmount.c")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
This commit is contained in:
Darrick J. Wong
2026-06-01 17:07:44 -07:00
committed by Bernd Schubert
parent 6ef101c808
commit 3c30d1c0c2
+1 -1
View File
@@ -994,7 +994,7 @@ static int mount_service_handle_mntopts_cmd(struct mount_service *mo,
#ifdef HAVE_NEW_MOUNT_API
if (mo->fsopenfd >= 0) {
int ret = apply_fsconfig_mount_opts(mo->fsopenfd, oc->value);
int ret = apply_fsconfig_mount_opts(mo->fsopenfd, mntopts);
if (ret < 0) {
free(mntopts);