If the user maps container root to his host uid, chown_mapped_rootid
tries to make the same mapping twice and gets -EINVAL.
Reported-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
}
return 0;
}
+
+ if (rootid == geteuid()) {
+ // nothing to do
+ INFO("%s: container root is our uid; no need to chown" ,__func__);
+ return 0;
+ }
+
pid = fork();
if (pid < 0) {
SYSERROR("Failed forking");