From 57cb6978291789ff7c2ecc752d50b676c520dfc7 Mon Sep 17 00:00:00 2001 From: csjp Date: Sun, 30 Nov 2008 19:58:03 +0000 Subject: 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 --- sys/security/audit/audit_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c index 83291b3..f8d45fe 100644 --- a/sys/security/audit/audit_syscalls.c +++ b/sys/security/audit/audit_syscalls.c @@ -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; -- cgit v1.1