Skip to content

Commit

Permalink
fix mount option parsing
Browse files Browse the repository at this point in the history
Do not append the propgation options to the mount data.
Filesystems fail to mount if the mount data contains
propagation options.

See also lxc/lxcri#30

Signed-off-by: Ruben Jenster <[email protected]>
  • Loading branch information
r10r committed Dec 12, 2023
1 parent 8a36bab commit 6078d6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lxc/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2217,6 +2217,12 @@ static int parse_mntopt(char *opt, unsigned long *flags, char **data, size_t siz
{
size_t ret;

/* Propagation opts are parsed separately and must not go into data. */
for (struct mount_opt *mo = &propagation_opt[0]; mo->name != NULL; mo++) {
if (strnequal(opt, mo->name, strlen(mo->name)))
return 0;
}

/* If '=' is contained in opt, the option must go into data. */
if (!strchr(opt, '=')) {
/*
Expand Down

0 comments on commit 6078d6b

Please sign in to comment.