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 Jun 23, 2021
1 parent a1040f8 commit c46c970
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 @@ -1994,6 +1994,12 @@ static int parse_mntopt(char *opt, unsigned long *flags, char **data, size_t siz
{
ssize_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 c46c970

Please sign in to comment.