diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-06-22 18:53:43 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-06-22 18:53:43 +0000 |
commit | aa891330baca4c28f9afd70baa478ef2cc8f4131 (patch) | |
tree | 135ec60e3d0a35aa4669bca23376ac614add927e /usr/src | |
parent | 8e56705d2dc97856eeca671853390084073739b9 (diff) | |
download | illumos-joyent-aa891330baca4c28f9afd70baa478ef2cc8f4131.tar.gz |
OS-4446 capget version probing incorrect
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/capabilities.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/common/capabilities.c b/usr/src/lib/brand/lx/lx_brand/common/capabilities.c index 81f3bbddb4..2b46041547 100644 --- a/usr/src/lib/brand/lx/lx_brand/common/capabilities.c +++ b/usr/src/lib/brand/lx/lx_brand/common/capabilities.c @@ -359,6 +359,14 @@ lx_capget(uintptr_t p1, uintptr_t p2) cap_count = 2; break; default: + /* + * As per the man page: call will fail with EINVAL and set the + * version field of the header to the kernel preferred version + * when an unsupported version value is provided. + */ + uh.version = LX_CAP_VERSION_3; + if (uucopy(&uh, uhp, sizeof (uh)) != 0) + return (-errno); return (-EINVAL); } |