aboutsummaryrefslogtreecommitdiff
path: root/libpod/pod_top_linux.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-05-23 14:45:14 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-05-23 14:45:17 +0200
commite85b33fb0403f0e75bd017aba231a906b83bd444 (patch)
treec12ece4679a846949605f752c8847e356042ab78 /libpod/pod_top_linux.go
parentda3021edd15cdf6313627c9f6a787929bc088725 (diff)
downloadpodman-e85b33fb0403f0e75bd017aba231a906b83bd444.tar.gz
podman-e85b33fb0403f0e75bd017aba231a906b83bd444.tar.bz2
podman-e85b33fb0403f0e75bd017aba231a906b83bd444.zip
rootless: fix top huser and hgroup
when running in rootless mode, be sure psgo is honoring the user namespace settings for huser and hgroup. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/pod_top_linux.go')
-rw-r--r--libpod/pod_top_linux.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/pod_top_linux.go b/libpod/pod_top_linux.go
index f49e28c9d..e08e5e83a 100644
--- a/libpod/pod_top_linux.go
+++ b/libpod/pod_top_linux.go
@@ -6,6 +6,7 @@ import (
"strconv"
"strings"
+ "github.com/containers/libpod/pkg/rootless"
"github.com/containers/psgo"
)
@@ -43,7 +44,8 @@ func (p *Pod) GetPodPidInformation(descriptors []string) ([]string, error) {
// filters on the data. We need to change the API here and the
// varlink API to return a [][]string if we want to make use of
// filtering.
- output, err := psgo.JoinNamespaceAndProcessInfoByPids(pids, descriptors)
+ opts := psgo.JoinNamespaceOpts{FillMappings: rootless.IsRootless()}
+ output, err := psgo.JoinNamespaceAndProcessInfoByPidsWithOptions(pids, descriptors, &opts)
if err != nil {
return nil, err
}