HomeFreeBSD

MFC r367002, r367060

Description

MFC r367002, r367060

r367002:
audit: correct reporting of *execve(2) success

r326145 corrected do_execve() to return EJUSTRETURN upon success so that
important registers are not clobbered. This had the side effect of tapping
out 'failures' for all *execve(2) audit records, which is less than useful
for auditing purposes.

Audit exec returns earlier, where we can know for sure that EJUSTRETURN
translates to success. Note that this unsets TDP_AUDITREC as we commit the
audit record, so the usual audit in the syscall return path will do nothing.

r367060:
audit: also correctly audit linux_execve()

Linux execve() gets audited as AUE_EXECVE as well, we should also interpret
the return from this correctly for the same reasoning as in r367002.

PR: 249179, 242938

Details

Provenance
kevansAuthored on
Parents
rS367079: Fix misnomer - linux_to_bsd_errno() does the exact opposite.
Branches
Unknown
Tags
Unknown