mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
podman exec should set umask to match container
Fixes: https://github.com/containers/podman/issues/19713 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -743,6 +743,14 @@ func (c *Container) prepareProcessExec(options *ExecOptions, env []string, sessi
|
||||
pspec.User = processUser
|
||||
}
|
||||
|
||||
if c.config.Umask != "" {
|
||||
umask, err := c.umask()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pspec.User.Umask = &umask
|
||||
}
|
||||
|
||||
if err := c.setProcessCapabilitiesExec(options, user, execUser, pspec); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user