summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/runc/libcontainer/user
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-08 16:05:12 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-09 11:02:28 -0400
commitb020d1ad13267bd71065457f83116af39c77f7e5 (patch)
tree076e8b6dd991ee3c4a50b141dcc2e68198417597 /vendor/github.com/opencontainers/runc/libcontainer/user
parent5c6002bf9d0c5f8ea0b4231e0d24f8e7a0994b30 (diff)
downloadpodman-b020d1ad13267bd71065457f83116af39c77f7e5.tar.gz
podman-b020d1ad13267bd71065457f83116af39c77f7e5.tar.bz2
podman-b020d1ad13267bd71065457f83116af39c77f7e5.zip
Vendor in new version of Buildah
This also pulls in latest runc and containers/common Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/opencontainers/runc/libcontainer/user')
-rw-r--r--vendor/github.com/opencontainers/runc/libcontainer/user/user.go30
1 files changed, 13 insertions, 17 deletions
diff --git a/vendor/github.com/opencontainers/runc/libcontainer/user/user.go b/vendor/github.com/opencontainers/runc/libcontainer/user/user.go
index 7b912bbf8..4b89dad73 100644
--- a/vendor/github.com/opencontainers/runc/libcontainer/user/user.go
+++ b/vendor/github.com/opencontainers/runc/libcontainer/user/user.go
@@ -60,7 +60,7 @@ type Group struct {
// groupFromOS converts an os/user.(*Group) to local Group
//
-// (This does not include Pass, Shell or Gecos)
+// (This does not include Pass or List)
func groupFromOS(g *user.Group) (Group, error) {
newGroup := Group{
Name: g.Name,
@@ -162,10 +162,6 @@ func ParsePasswdFilter(r io.Reader, filter func(User) bool) ([]User, error) {
)
for s.Scan() {
- if err := s.Err(); err != nil {
- return nil, err
- }
-
line := strings.TrimSpace(s.Text())
if line == "" {
continue
@@ -183,6 +179,9 @@ func ParsePasswdFilter(r io.Reader, filter func(User) bool) ([]User, error) {
out = append(out, p)
}
}
+ if err := s.Err(); err != nil {
+ return nil, err
+ }
return out, nil
}
@@ -221,10 +220,6 @@ func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) {
)
for s.Scan() {
- if err := s.Err(); err != nil {
- return nil, err
- }
-
text := s.Text()
if text == "" {
continue
@@ -242,6 +237,9 @@ func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) {
out = append(out, p)
}
}
+ if err := s.Err(); err != nil {
+ return nil, err
+ }
return out, nil
}
@@ -532,10 +530,6 @@ func ParseSubIDFilter(r io.Reader, filter func(SubID) bool) ([]SubID, error) {
)
for s.Scan() {
- if err := s.Err(); err != nil {
- return nil, err
- }
-
line := strings.TrimSpace(s.Text())
if line == "" {
continue
@@ -549,6 +543,9 @@ func ParseSubIDFilter(r io.Reader, filter func(SubID) bool) ([]SubID, error) {
out = append(out, p)
}
}
+ if err := s.Err(); err != nil {
+ return nil, err
+ }
return out, nil
}
@@ -586,10 +583,6 @@ func ParseIDMapFilter(r io.Reader, filter func(IDMap) bool) ([]IDMap, error) {
)
for s.Scan() {
- if err := s.Err(); err != nil {
- return nil, err
- }
-
line := strings.TrimSpace(s.Text())
if line == "" {
continue
@@ -603,6 +596,9 @@ func ParseIDMapFilter(r io.Reader, filter func(IDMap) bool) ([]IDMap, error) {
out = append(out, p)
}
}
+ if err := s.Err(); err != nil {
+ return nil, err
+ }
return out, nil
}