summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-12 16:58:59 -0400
committerGitHub <noreply@github.com>2020-03-12 16:58:59 -0400
commitc9f148fb154ca45081e3ebfc0c14fa9ee995780d (patch)
tree5d70894f93934ae8d6e54af44502639a383036a7 /vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go
parentd586e16adc884c94040751404234e66394e807f1 (diff)
parent925da74118697702092b24ff115b64258643f81c (diff)
downloadpodman-c9f148fb154ca45081e3ebfc0c14fa9ee995780d.tar.gz
podman-c9f148fb154ca45081e3ebfc0c14fa9ee995780d.tar.bz2
podman-c9f148fb154ca45081e3ebfc0c14fa9ee995780d.zip
Merge pull request #5470 from containers/dependabot/go_modules/github.com/containers/storage-1.16.3
Bump github.com/containers/storage from 1.16.2 to 1.16.3
Diffstat (limited to 'vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go')
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go b/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go
index 4e711a9f8..de5c80ef3 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/xattrs.go
@@ -12,8 +12,8 @@ func lgetxattr(path string, attr string) ([]byte, error) {
// Start with a 128 length byte array
dest := make([]byte, 128)
sz, errno := unix.Lgetxattr(path, attr, dest)
- if errno == unix.ERANGE {
- // Buffer too small, get the real size first
+ for errno == unix.ERANGE {
+ // Buffer too small, use zero-sized buffer to get the actual size
sz, errno = unix.Lgetxattr(path, attr, []byte{})
if errno != nil {
return nil, errno
@@ -28,7 +28,3 @@ func lgetxattr(path string, attr string) ([]byte, error) {
return dest[:sz], nil
}
-
-func lsetxattr(path string, attr string, data []byte, flags int) error {
- return unix.Lsetxattr(path, attr, data, flags)
-}