saved_errno = errno;
close(audit_fd);
errno = saved_errno;
return (rc >= 0);
/* do not report error if the error is EPERM and sshd is run as non root user */
return (rc >= 0) || ((rc == -EPERM) && (getuid() != 0));
}
/* Below is the sshd audit API code */