Date: Wed, 12 Nov 2008 19:25:39 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 152889 for review Message-ID: <200811121925.mACJPdhp025538@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152889 Change 152889 by rwatson@rwatson_cinnamon on 2008/11/12 19:25:17 In au_assemble(), rather than failing if EPERM is returned on querying the kernel audit state, generate a token without that additional state. This allows building audit records without privilege, such as in our regression suite. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#32 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#32 (text+ko) ==== @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#31 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#32 $ */ #include <sys/types.h> @@ -221,7 +221,7 @@ aia.ai_termid.at_type = AU_IPv4; aia.ai_termid.at_addr[0] = INADDR_ANY; if (auditon(A_GETKAUDIT, &aia, sizeof(aia)) < 0) { - if (errno != ENOSYS) + if (errno != ENOSYS && errno != EPERM) return (-1); #endif /* HAVE_AUDIT_SYSCALLS */ tot_rec_size = rec->len + AUDIT_HEADER_SIZE +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811121925.mACJPdhp025538>