From owner-p4-projects@FreeBSD.ORG Tue Feb 28 02:10:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CAA2316A423; Tue, 28 Feb 2006 02:10:40 +0000 (GMT) X-Original-To: perforce@freebsd.org 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 6720D16A420 for ; Tue, 28 Feb 2006 02:10:40 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AF1B43D46 for ; Tue, 28 Feb 2006 02:10:40 +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 k1S2Aebi076422 for ; Tue, 28 Feb 2006 02:10:40 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 k1S2Ad5v076419 for perforce@freebsd.org; Tue, 28 Feb 2006 02:10:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 28 Feb 2006 02:10:39 GMT Message-Id: <200602280210.k1S2Ad5v076419@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 Cc: Subject: PERFORCE change 92511 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2006 02:10:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=92511 Change 92511 by rwatson@rwatson_lethe.cl.cam.ac.uk on 2006/02/28 02:09:56 Use KERN_HOSTID and NODEV if they are defined, don't otherwise. (Linux) Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#17 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#17 (text+ko) ==== @@ -26,7 +26,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_wrappers.c#16 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#17 $ */ #ifdef __APPLE__ @@ -56,7 +56,11 @@ if (p == NULL) return (kAUBadParamErr); +#ifdef NODEV *p = NODEV; +#else + *p = -1; +#endif /* for /usr/bin/login, try fstat() first */ if (fstat(STDIN_FILENO, &st) != 0) { @@ -78,6 +82,8 @@ int audit_set_terminal_host(uint32_t *m) { + +#ifdef KERN_HOSTID int name[2] = { CTL_KERN, KERN_HOSTID }; size_t len; @@ -90,6 +96,10 @@ return (kAUSysctlErr); } return (kAUNoErr); +#else + *m = -1; + return (kAUNoErr); +#endif } int