Partially roll back a revision which changed the error code being returned

by getaudit(2).  Some applications such has su, id will interpret E2BIG as
requiring the use of getaudit_addr(2) to pull extended audit state (ip6)
from the kernel.

This change un-breaks the ABI when auditing has been activated on a system
and the users are logged in via ip6.

This is a RELENG_7_1 candidate.

MFC after:	1 day
Discussed with:	rwatson
This commit is contained in:
Christian S.J. Peron 2008-11-30 19:58:03 +00:00
parent 17daa728ae
commit 5ac14ef177
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185484

View File

@ -510,7 +510,7 @@ getaudit(struct thread *td, struct getaudit_args *uap)
if (error)
return (error);
if (cred->cr_audit.ai_termid.at_type == AU_IPv6)
return (ERANGE);
return (E2BIG);
bzero(&ai, sizeof(ai));
ai.ai_auid = cred->cr_audit.ai_auid;
ai.ai_mask = cred->cr_audit.ai_mask;