From owner-p4-projects@FreeBSD.ORG Sat Apr 22 23:48:49 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 3BD4116A405; Sat, 22 Apr 2006 23:48:49 +0000 (UTC) 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 F213716A400 for ; Sat, 22 Apr 2006 23:48:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD1C143D45 for ; Sat, 22 Apr 2006 23:48:48 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3MNmmCl025534 for ; Sat, 22 Apr 2006 23:48:48 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3MNmm4j025527 for perforce@freebsd.org; Sat, 22 Apr 2006 23:48:48 GMT (envelope-from jb@freebsd.org) Date: Sat, 22 Apr 2006 23:48:48 GMT Message-Id: <200604222348.k3MNmm4j025527@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95909 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: Sat, 22 Apr 2006 23:48:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=95909 Change 95909 by jb@jb_freebsd2 on 2006/04/22 23:48:04 Subtle difference in credential field names for saved uid and gid. FreeBSD doesn't have zones. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#4 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_priv.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.h#4 (text+ko) ==== @@ -33,6 +33,8 @@ #define delay(_a) DELAY(_a) #define vuprintf vprintf #define CRED() curthread->td_ucred +#define cr_suid cr_svuid +#define cr_sgid cr_svgid #define P2ROUNDUP(x, align) (-(-(x) & -(align))) #define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) #define TQ_SLEEP 0x00 /* Can block for memory */ ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_priv.c#2 (text+ko) ==== @@ -35,6 +35,7 @@ static int dtrace_priv_proc_common_zone(dtrace_state_t *state) { +#if defined(sun) cred_t *cr, *s_cr = state->dts_cred.dcr_cred; /* @@ -48,6 +49,9 @@ return (1); return (0); +#else + return (1); +#endif } /* @@ -57,11 +61,13 @@ static int dtrace_priv_proc_common_nocd() { +#if defined(sun) proc_t *proc; if ((proc = ttoproc(curthread)) != NULL && !(proc->p_flag & SNOCD)) return (1); +#endif return (0); }