The `SupportsShifting` method signature has been updated
to include `uidmap` and `gidmap` parameters.
Previously, a driver could only declare general support
for shifting.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Don't pass the output of a subprocess to fmt.Errorf(), which will treat
it as a format specifier. Just use errors.New() to create an error
using the text verbatim.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This is a parallel Walk implementation and we're expecting some
speedup thanks to that.
Note that pwalk.Walk error handling is primitive; for one thing,
it never sends an error to the callpack, thus the error checking
code is no longer needed.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This is already done by the driver when creating the directory, so we
will end up trying to map IDs that were already mapped.
regression introduced with d1554f0dcd
and 7c6d502e9b.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This patch adds a MountOpts field to the drivers so we can simplify
the interface to Get and allow additional options to be passed in the future.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Use stderr for outputting error messages in ChownByPath's reexec'd
main(), and use CombinedOutput() instead of Output() to pick up that
output.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Expose reading and writing ID mapping in the archive and chrootarchive
packages, and in the driver interface. Generally this means that
when computing or applying diffs, we need to have ID mappings passed in
that are specific to the layers we're using.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add support to the Store objects for per-container UID/GID mapping.
* UID and GID maps can be specified when creating layers and containers.
* If mapping options are specified when creating a container, those
options are used for creating the layer which we create for the
container and recorded with the container for convenience.
* A layer defaults to using the ID mapping configured for its parent, or
to the default which was used to initialize the Store object if it has
no parent.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>