aboutsummaryrefslogtreecommitdiff
path: root/layer
diff options
context:
space:
mode:
authorSalahuddin Khan <salah@docker.com>2017-11-15 22:20:33 -0800
committerSalahuddin Khan <salah@docker.com>2018-08-13 21:59:11 -0700
commit763d8392612942ff5c32a35f8bdafd7ae93d3321 (patch)
treeb9b90624e4d3c3e88a95b45e0f723ec74e35a3ee /layer
parent1fd7e4c28d3a4a21c3540f03a045f96a4190b527 (diff)
Add ADD/COPY --chown flag support to Windows
This implements chown support on Windows. Built-in accounts as well as accounts included in the SAM database of the container are supported. NOTE: IDPair is now named Identity and IDMappings is now named IdentityMapping. The following are valid examples: ADD --chown=Guest . <some directory> COPY --chown=Administrator . <some directory> COPY --chown=Guests . <some directory> COPY --chown=ContainerUser . <some directory> On Windows an owner is only granted the permission to read the security descriptor and read/write the discretionary access control list. This fix also grants read/write and execute permissions to the owner. Signed-off-by: Salahuddin Khan <salah@docker.com>
Diffstat (limited to 'layer')
-rw-r--r--layer/layer_store.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/layer/layer_store.go b/layer/layer_store.go
index c1fbf85091..bc3e8719fc 100644
--- a/layer/layer_store.go
+++ b/layer/layer_store.go
@@ -45,7 +45,7 @@ type StoreOptions struct {
MetadataStorePathTemplate string
GraphDriver string
GraphDriverOptions []string
- IDMappings *idtools.IDMappings
+ IDMapping *idtools.IdentityMapping
PluginGetter plugingetter.PluginGetter
ExperimentalEnabled bool
OS string
@@ -56,8 +56,8 @@ func NewStoreFromOptions(options StoreOptions) (Store, error) {
driver, err := graphdriver.New(options.GraphDriver, options.PluginGetter, graphdriver.Options{
Root: options.Root,
DriverOptions: options.GraphDriverOptions,
- UIDMaps: options.IDMappings.UIDs(),
- GIDMaps: options.IDMappings.GIDs(),
+ UIDMaps: options.IDMapping.UIDs(),
+ GIDMaps: options.IDMapping.GIDs(),
ExperimentalEnabled: options.ExperimentalEnabled,
})
if err != nil {