* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define _GNU_SOURCE
-#include <assert.h>
#include <inttypes.h>
#include <linux/limits.h>
#include <sched.h>
DECLARE_ARG(opts->user->action_script);
}
- mnts = write_mount_file(&opts->c->lxc_conf->mount_list);
+ mnts = make_anonymous_mount_file(&opts->c->lxc_conf->mount_list);
if (!mnts)
goto err;
while (getmntent_r(mnts, &mntent, buf, sizeof(buf))) {
- char *fmt, *key, *val;
+ char *fmt, *key, *val, *mntdata;
char arg[2 * PATH_MAX + 2];
+ unsigned long flags;
+
+ if (parse_mntopts(mntent.mnt_opts, &flags, &mntdata) < 0)
+ goto err;
+
+ free(mntdata);
+
+ /* only add --ext-mount-map for actual bind mounts */
+ if (!(flags & MS_BIND))
+ continue;
if (strcmp(opts->action, "dump") == 0) {
fmt = "/%s:%s";