summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-07-20 13:46:43 -0400
committerGitHub <noreply@github.com>2018-07-20 13:46:43 -0400
commit1bb6e5f0d8d8f4b21b4468c554e0fcba12e3607d (patch)
tree533fce7a19fba08b8a4eb0edf42ce3b5b6446a85
parent15a1e9c9510e2b803b57f66295595ddd3bdbbd47 (diff)
parent17b1764fb81199b5ab95799ed028675d2501fdc9 (diff)
downloadpodman-1bb6e5f0d8d8f4b21b4468c554e0fcba12e3607d.tar.gz
podman-1bb6e5f0d8d8f4b21b4468c554e0fcba12e3607d.tar.bz2
podman-1bb6e5f0d8d8f4b21b4468c554e0fcba12e3607d.zip
Merge pull request #1121 from mheon/bump_psgo
Update psgo vendor
-rw-r--r--vendor.conf2
-rw-r--r--vendor/github.com/containers/psgo/ps/ps.go32
-rw-r--r--vendor/github.com/containers/psgo/vendor.conf1
3 files changed, 14 insertions, 21 deletions
diff --git a/vendor.conf b/vendor.conf
index e36d2f082..e0302fd5c 100644
--- a/vendor.conf
+++ b/vendor.conf
@@ -12,7 +12,7 @@ github.com/containernetworking/cni v0.7.0-alpha1
github.com/containernetworking/plugins 1fb94a4222eafc6f948eacdca9c9f2158b427e53
github.com/containers/image c6e0eee0f8eb38e78ae2e44a9aeea0576f451617
github.com/containers/storage 8b1a0f8d6863cf05709af333b8997a437652ec4c
-github.com/containers/psgo 59a9dad536216e91da1861c9fbba75b85da84dcd
+github.com/containers/psgo dd34e7e448e5d4f3c7ce87b5da7738b00778dbfd
github.com/coreos/go-systemd v14
github.com/cri-o/ocicni master
github.com/cyphar/filepath-securejoin v0.2.1
diff --git a/vendor/github.com/containers/psgo/ps/ps.go b/vendor/github.com/containers/psgo/ps/ps.go
index a7e7cafad..b954988e5 100644
--- a/vendor/github.com/containers/psgo/ps/ps.go
+++ b/vendor/github.com/containers/psgo/ps/ps.go
@@ -4,13 +4,13 @@ import (
"fmt"
"io/ioutil"
"os"
- "os/user"
"runtime"
"strconv"
"strings"
"sync"
"time"
+ "github.com/opencontainers/runc/libcontainer/user"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
@@ -405,17 +405,13 @@ func parseDescriptors(input string) ([]aixFormatDescriptor, error) {
// lookupGID returns the textual group ID, if it can be optained, or the
// decimal input representation otherwise.
func lookupGID(gid string) (string, error) {
- if gid == "0" {
- return "root", nil
+ gidNum, err := strconv.Atoi(gid)
+ if err != nil {
+ return "", errors.Wrap(err, "error parsing group ID")
}
- g, err := user.LookupGroupId(gid)
+ g, err := user.LookupGid(gidNum)
if err != nil {
- switch err.(type) {
- case user.UnknownGroupIdError:
- return gid, nil
- default:
- return "", err
- }
+ return gid, nil
}
return g.Name, nil
}
@@ -442,19 +438,15 @@ func processPPID(p *process) (string, error) {
// lookupUID return the textual user ID, if it can be optained, or the decimal
// input representation otherwise.
func lookupUID(uid string) (string, error) {
- if uid == "0" {
- return "root", nil
+ uidNum, err := strconv.Atoi(uid)
+ if err != nil {
+ return "", errors.Wrap(err, "error parsing user ID")
}
- u, err := user.LookupId(uid)
+ u, err := user.LookupUid(uidNum)
if err != nil {
- switch err.(type) {
- case user.UnknownUserError:
- return uid, nil
- default:
- return "", err
- }
+ return uid, nil
}
- return u.Username, nil
+ return u.Name, nil
}
diff --git a/vendor/github.com/containers/psgo/vendor.conf b/vendor/github.com/containers/psgo/vendor.conf
index ebdb065ef..1fba46ec1 100644
--- a/vendor/github.com/containers/psgo/vendor.conf
+++ b/vendor/github.com/containers/psgo/vendor.conf
@@ -1,4 +1,5 @@
github.com/davecgh/go-spew master
+github.com/opencontainers/runc master
github.com/pkg/errors master
github.com/pmezard/go-difflib master
github.com/sirupsen/logrus master