From 541e83ffe285cc67f4635d2dd1e7c89135140a13 Mon Sep 17 00:00:00 2001 From: flouthoc Date: Thu, 5 Aug 2021 17:12:17 +0530 Subject: personality: Add support for setting execution domain. Execution domains tell Linux how to map signal numbers into signal actions. The execution domain system allows Linux to provide limited support for binaries compiled under other UNIX-like operating systems. Reference: https://man7.org/linux/man-pages/man2/personality.2.html Signed-off-by: flouthoc --- cmd/podman/common/specgen.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/podman/common/specgen.go') diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index 118091855..8d6a21cb7 100644 --- a/cmd/podman/common/specgen.go +++ b/cmd/podman/common/specgen.go @@ -651,6 +651,12 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string if err != nil { return err } + + if c.Personality != "" { + s.Personality = &specs.LinuxPersonality{} + s.Personality.Domain = specs.LinuxPersonalityDomain(c.Personality) + } + s.Remove = c.Rm s.StopTimeout = &c.StopTimeout s.Timeout = c.Timeout -- cgit v1.2.3-54-g00ecf