mirror of
https://github.com/containers/podman.git
synced 2025-08-02 01:09:21 +08:00
make image listing more resilient
Handle more TOCTOUs operating on listed images. Also pull in containers/common/pull/1520 and containers/common/pull/1522 which do the same on the internal layer tree. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2216700 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -2094,7 +2094,7 @@ func (c *Container) postDeleteHooks(ctx context.Context) error {
|
||||
hook := hook
|
||||
logrus.Debugf("container %s: invoke poststop hook %d, path %s", c.ID(), i, hook.Path)
|
||||
var stderr, stdout bytes.Buffer
|
||||
hookErr, err := exec.Run(ctx, &hook, state, &stdout, &stderr, exec.DefaultPostKillTimeout)
|
||||
hookErr, err := exec.Run(ctx, &hook, state, &stdout, &stderr, exec.DefaultPostKillTimeout) //nolint:staticcheck
|
||||
if err != nil {
|
||||
logrus.Warnf("Container %s: poststop hook %d: %v", c.ID(), i, err)
|
||||
if hookErr != err {
|
||||
@ -2223,7 +2223,7 @@ func (c *Container) setupOCIHooks(ctx context.Context, config *spec.Spec) (map[s
|
||||
}
|
||||
}
|
||||
|
||||
hookErr, err := exec.RuntimeConfigFilter(ctx, allHooks["precreate"], config, exec.DefaultPostKillTimeout)
|
||||
hookErr, err := exec.RuntimeConfigFilter(ctx, allHooks["precreate"], config, exec.DefaultPostKillTimeout) //nolint:staticcheck
|
||||
if err != nil {
|
||||
logrus.Warnf("Container %s: precreate hook: %v", c.ID(), err)
|
||||
if hookErr != nil && hookErr != err {
|
||||
|
Reference in New Issue
Block a user