summaryrefslogtreecommitdiff
path: root/libpod/storage.go
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2018-05-24 13:18:52 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-24 21:27:05 +0000
commita7180cd5459ca063c14a60965b4487f04c0af439 (patch)
treee003197bc5a423b0b5cb60aa9377cd66df2dd5c3 /libpod/storage.go
parentb09fca74afd12b25f18ae92cbdce19fc625704b1 (diff)
downloadpodman-a7180cd5459ca063c14a60965b4487f04c0af439.tar.gz
podman-a7180cd5459ca063c14a60965b4487f04c0af439.tar.bz2
podman-a7180cd5459ca063c14a60965b4487f04c0af439.zip
hooks/1.0.0: Error on empty process.args instead of panicking
The process property is optional [1], which this package already handled appropriately, although I've added a new test here to guard against regressions. The process.args entry is required when process is set [2], and it's also required to contain at least one entry [3]. The previous implementation here assumed that would always be satisfied, and panicked on empty process.args. With this commit, we avoid the panic and instead return an error message explaining why the input was invalid. [1]: https://github.com/opencontainers/runtime-spec/blame/v1.0.1/config.md#L145 [2]: https://github.com/opencontainers/runtime-spec/blame/v1.0.1/config.md#L157 [3]: https://github.com/opencontainers/runtime-spec/blame/v1.0.1/config.md#L158 Reported-by: Brent Baude <bbaude@redhat.com> Signed-off-by: W. Trevor King <wking@tremily.us> Closes: #829 Approved by: mheon
Diffstat (limited to 'libpod/storage.go')
0 files changed, 0 insertions, 0 deletions