mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-04 02:15:58 -04:00
containerfs: raise error if upperdir is not specified
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
26f0f1a6a2
commit
88b2ee2854
14
main.c
14
main.c
@ -2774,7 +2774,9 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
lo.debug = opts.debug;
|
lo.debug = opts.debug;
|
||||||
|
|
||||||
if (lo.upperdir != NULL)
|
if (lo.upperdir == NULL)
|
||||||
|
error (EXIT_FAILURE, 0, "upperdir not specified");
|
||||||
|
else
|
||||||
{
|
{
|
||||||
char full_path[PATH_MAX + 1];
|
char full_path[PATH_MAX + 1];
|
||||||
|
|
||||||
@ -2785,16 +2787,6 @@ main (int argc, char *argv[])
|
|||||||
if (lo.upperdir == NULL)
|
if (lo.upperdir == NULL)
|
||||||
goto err_out1;
|
goto err_out1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
char *up = strdup ("/tmp/containerfs.XXXXXX");
|
|
||||||
int ret = mkstemp (up);
|
|
||||||
if (ret < 0)
|
|
||||||
goto err_out1;
|
|
||||||
|
|
||||||
close (ret);
|
|
||||||
lo.upperdir = up;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf ("UID=%i\n", lo.uid);
|
printf ("UID=%i\n", lo.uid);
|
||||||
printf ("GID=%i\n", lo.gid);
|
printf ("GID=%i\n", lo.gid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user