From owner-p4-projects@FreeBSD.ORG Sat Apr 30 13:19:38 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF38016A4D0; Sat, 30 Apr 2005 13:19:37 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABE2B16A4CE for ; Sat, 30 Apr 2005 13:19:37 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C9B543D41 for ; Sat, 30 Apr 2005 13:19:37 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j3UDJbRT061433 for ; Sat, 30 Apr 2005 13:19:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j3UDJb1w061430 for perforce@freebsd.org; Sat, 30 Apr 2005 13:19:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 30 Apr 2005 13:19:37 GMT Message-Id: <200504301319.j3UDJb1w061430@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 76271 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2005 13:19:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=76271 Change 76271 by rwatson@rwatson_paprika on 2005/04/30 13:18:52 From Darwin 8.0: identify Apple private APIs as such to avoid leaking them into the conumser of libbsm.h. In one case, Apple has marked an API as Apple-private that we don't yet consider private (au_get_state()), which we will want to take a further look at. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/libbsm.h#7 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/libbsm.h#7 (text+ko) ==== @@ -844,28 +844,36 @@ __END_DECLS #ifdef __APPLE__ -/* - * Apple-internal "wrapping" and utility definitions and prototypes. - */ +#include -#include +/************************************************************************** + ************************************************************************** + ** The following definitions, functions, etc., are NOT officially + ** supported: they may be changed or removed in the future. Do not use + ** them unless you are prepared to cope with that eventuality. + ************************************************************************** + **************************************************************************/ #ifdef __APPLE_API_PRIVATE #define __BSM_INTERNAL_NOTIFY_KEY "com.apple.audit.change" -#endif -#endif /* !__APPLE__ */ +#endif /* __APPLE_API_PRIVATE */ /* * au_get_state() return values * XXX use AUC_* values directly instead (); AUDIT_OFF and * AUDIT_ON are deprecated and WILL be removed. */ +#ifdef __APPLE_API_PRIVATE #define AUDIT_OFF AUC_NOAUDIT #define AUDIT_ON AUC_AUDITING +#endif /* __APPLE_API_PRIVATE */ +#endif /* !__APPLE__ */ /* * Error return codes for audit_set_terminal_id(), audit_write() and its * brethren. We have 255 (not including kAUNoErr) to play with. + * + * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE. */ enum { @@ -885,6 +893,7 @@ kAULastErr }; +#ifdef __APPLE__ /* * Error return codes for au_get_state() and/or its private support * functions. These codes are designed to be compatible with the @@ -894,7 +903,10 @@ * AU_UNIMPL should never happen unless you've changed your system software * without rebooting. Shame on you. */ +#ifdef __APPLE_API_PRIVATE #define AU_UNIMPL NOTIFY_STATUS_FAILED + 1 /* audit unimplemented */ +#endif /* __APPLE_API_PRIVATE */ +#endif /* !__APPLE__ */ __BEGIN_DECLS