mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
Merge pull request #9768 from mheon/fix_9608
Ensure manually-created volumes have correct ownership
This commit is contained in:
@ -1618,19 +1618,6 @@ func WithVolumeGID(gid int) VolumeCreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithVolumeNeedsChown sets the NeedsChown flag for the volume.
|
||||
func WithVolumeNeedsChown() VolumeCreateOption {
|
||||
return func(volume *Volume) error {
|
||||
if volume.valid {
|
||||
return define.ErrVolumeFinalized
|
||||
}
|
||||
|
||||
volume.state.NeedsChown = true
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// withSetAnon sets a bool notifying libpod that this volume is anonymous and
|
||||
// should be removed when containers using it are removed and volumes are
|
||||
// specified for removal.
|
||||
|
Reference in New Issue
Block a user