Unverified Commit ef025635 by Christian Brauner Committed by Stéphane Graber

conf: fix wrong path on overlayfs

parent e9be1c7a
...@@ -3672,12 +3672,16 @@ int chown_mapped_root(char *path, struct lxc_conf *conf) ...@@ -3672,12 +3672,16 @@ int chown_mapped_root(char *path, struct lxc_conf *conf)
return 0; return 0;
} }
// save the current gid of "path" /* save the current gid of "path" */
if (stat(path, &sb) < 0) { if (stat(path, &sb) < 0) {
ERROR("Error stat %s", path); ERROR("Error stat %s", path);
return -1; return -1;
} }
/* Update the path argument in case this was overlayfs. */
args1[sizeof(args1) / sizeof(args1[0]) - 2] = path;
args2[sizeof(args2) / sizeof(args2[0]) - 2] = path;
/* /*
* A file has to be group-owned by a gid mapped into the * A file has to be group-owned by a gid mapped into the
* container, or the container won't be privileged over it. * container, or the container won't be privileged over it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment