mirror of
https://github.com/containers/podman.git
synced 2025-05-22 01:27:07 +08:00
libpod: Make getContainerInspectData work on FreeBSD
This makes setting EffectiveCaps and BoundingCaps conditional on whether the capabilites field in the spec is non-nil. This allows 'podman inspect' to work on FreeBSD. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
@ -158,8 +158,6 @@ func (c *Container) getContainerInspectData(size bool, driverData *define.Driver
|
|||||||
Driver: driverData.Name,
|
Driver: driverData.Name,
|
||||||
MountLabel: config.MountLabel,
|
MountLabel: config.MountLabel,
|
||||||
ProcessLabel: config.ProcessLabel,
|
ProcessLabel: config.ProcessLabel,
|
||||||
EffectiveCaps: ctrSpec.Process.Capabilities.Effective,
|
|
||||||
BoundingCaps: ctrSpec.Process.Capabilities.Bounding,
|
|
||||||
AppArmorProfile: ctrSpec.Process.ApparmorProfile,
|
AppArmorProfile: ctrSpec.Process.ApparmorProfile,
|
||||||
ExecIDs: execIDs,
|
ExecIDs: execIDs,
|
||||||
GraphDriver: driverData,
|
GraphDriver: driverData,
|
||||||
@ -168,6 +166,10 @@ func (c *Container) getContainerInspectData(size bool, driverData *define.Driver
|
|||||||
IsInfra: c.IsInfra(),
|
IsInfra: c.IsInfra(),
|
||||||
IsService: c.IsService(),
|
IsService: c.IsService(),
|
||||||
}
|
}
|
||||||
|
if ctrSpec.Process.Capabilities != nil {
|
||||||
|
data.EffectiveCaps = ctrSpec.Process.Capabilities.Effective
|
||||||
|
data.BoundingCaps = ctrSpec.Process.Capabilities.Bounding
|
||||||
|
}
|
||||||
|
|
||||||
if c.state.ConfigPath != "" {
|
if c.state.ConfigPath != "" {
|
||||||
data.OCIConfigPath = c.state.ConfigPath
|
data.OCIConfigPath = c.state.ConfigPath
|
||||||
|
Reference in New Issue
Block a user