diff options
-rw-r--r-- | usr/src/uts/common/c2/audit_event.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/usr/src/uts/common/c2/audit_event.c b/usr/src/uts/common/c2/audit_event.c index 85b305c909..81ee3e7f69 100644 --- a/usr/src/uts/common/c2/audit_event.c +++ b/usr/src/uts/common/c2/audit_event.c @@ -3549,12 +3549,22 @@ auf_accept( #else sy_flags = sysent[scid].sy_flags & SE_RVAL_MASK; #endif - if (sy_flags == SE_32RVAL1) + switch (sy_flags) { + case SE_32RVAL1: + /* FALLTHRU */ + case SE_32RVAL2|SE_32RVAL1: fd = rval->r_val1; - if (sy_flags == (SE_32RVAL2|SE_32RVAL1)) - fd = rval->r_val1; - if (sy_flags == SE_64RVAL) + break; + case SE_64RVAL: fd = (int)rval->r_vals; + break; + default: + /* + * should never happen, seems to be an internal error + * in sysent => no fd, nothing to audit here, returning + */ + return; + } if (error) { /* can't trust socket contents. Just return */ |