linuxulator: add debugging for invalid capget/capset version

Sponsored by:	Turing Robotic Industries Inc.
This commit is contained in:
Ed Maste 2018-06-18 18:43:45 +00:00
parent 7575d3df5b
commit 645f3d4345
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335327

View File

@ -1895,6 +1895,11 @@ linux_capget(struct thread *td, struct linux_capget_args *args)
return (error);
if (luch.version != _LINUX_CAPABILITY_VERSION) {
#ifdef DEBUG
if (ldebug(capget))
printf(LMSG("invalid capget capability version 0x%x"),
luch.version);
#endif
luch.version = _LINUX_CAPABILITY_VERSION;
error = copyout(&luch, args->hdrp, sizeof(luch));
if (error)
@ -1934,6 +1939,11 @@ linux_capset(struct thread *td, struct linux_capset_args *args)
return (error);
if (luch.version != _LINUX_CAPABILITY_VERSION) {
#ifdef DEBUG
if (ldebug(capset))
printf(LMSG("invalid capset capability version 0x%x"),
luch.version);
#endif
luch.version = _LINUX_CAPABILITY_VERSION;
error = copyout(&luch, args->hdrp, sizeof(luch));
if (error)