podman/pkg/util
Ed Santiago 40f55ca3fe signal parsing - better input validation
The helper function we use for signal name mapping does not
check for negative numbers nor invalid (too-high) ones. This
can yield unexpected error messages:

   # podman kill -s -1 foo
   ERRO[0000] unknown signal "18446744073709551615"

This PR introduces a small wrapper for it that:

  1) Strips off a leading dash, allowing '-1' or '-HUP'
     as valid inputs; and
  2) Rejects numbers <1 or >64 (SIGRTMAX)

Also adds a test suite checking signal handling as well as
ensuring that invalid signals are rejected by the command line.

Fixes: #4746

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-12-26 16:50:21 -07:00
..
mountOpts.go mount: add new options nocopyup|copyup for tmpfs 2019-11-07 18:24:02 +01:00
utils.go signal parsing - better input validation 2019-12-26 16:50:21 -07:00
utils_darwin.go libpod removal from main (phase 2) 2019-06-27 07:56:24 -05:00
utils_linux.go golangci-lint phase 4 2019-07-22 15:44:04 -05:00
utils_supported.go Return empty runtime directory if we're not rootless 2019-12-07 14:18:55 +00:00
utils_test.go Add ONBUILD support to --change 2019-12-05 15:11:40 -05:00
utils_unsupported.go Move the HostConfig portion of Inspect inside libpod 2019-07-17 16:48:38 -04:00
utils_windows.go Use GetRuntimeDir to setup auth.json for login 2019-08-12 14:11:53 -04:00