mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-04 02:15:58 -04:00
fuse-overlayfs: error out if redirect_dir is specified
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
8b54d466e1
commit
04be2fced2
7
main.c
7
main.c
@ -122,6 +122,7 @@ struct ovl_data
|
||||
char *context;
|
||||
char *upperdir;
|
||||
char *workdir;
|
||||
char *redirect_dir;
|
||||
int workdir_fd;
|
||||
struct ovl_layer *layers;
|
||||
|
||||
@ -129,6 +130,8 @@ struct ovl_data
|
||||
};
|
||||
|
||||
static const struct fuse_opt ovl_opts[] = {
|
||||
{"redirect_dir=%s",
|
||||
offsetof (struct ovl_data, redirect_dir), 0},
|
||||
{"context=%s",
|
||||
offsetof (struct ovl_data, context), 0},
|
||||
{"lowerdir=%s",
|
||||
@ -3176,6 +3179,7 @@ main (int argc, char *argv[])
|
||||
.gid_str = NULL,
|
||||
.root = NULL,
|
||||
.lowerdir = NULL,
|
||||
.redirect_dir = NULL,
|
||||
};
|
||||
int ret = -1;
|
||||
struct fuse_args args = FUSE_ARGS_INIT (argc, newargv);
|
||||
@ -3203,6 +3207,9 @@ main (int argc, char *argv[])
|
||||
|
||||
lo.debug = opts.debug;
|
||||
|
||||
if (lo.redirect_dir && strcmp (lo.redirect_dir, "off"))
|
||||
error (EXIT_FAILURE, 0, "fuse-overlayfs only supports redirect_dir=off");
|
||||
|
||||
if (lo.upperdir == NULL)
|
||||
error (EXIT_FAILURE, 0, "upperdir not specified");
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user