From owner-p4-projects@FreeBSD.ORG Mon Oct 17 12:27:20 2005 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 EE2D916A428; Mon, 17 Oct 2005 12:27:19 +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 5B03616A424 for ; Mon, 17 Oct 2005 12:27:19 +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 1D78C43D46 for ; Mon, 17 Oct 2005 12:27:19 +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 j9HCRJni056136 for ; Mon, 17 Oct 2005 12:27:19 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 j9HCRI8w056133 for perforce@freebsd.org; Mon, 17 Oct 2005 12:27:18 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 17 Oct 2005 12:27:18 GMT Message-Id: <200510171227.j9HCRI8w056133@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 85429 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: Mon, 17 Oct 2005 12:27:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=85429 Change 85429 by rwatson@rwatson_zoo on 2005/10/17 12:26:38 Integrate bsm_token.c from OpenBSM to the TrustedBSD Audit3 contrib tree: White space and style cleanups. Affected files ... .. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_token.c#4 integrate Differences ... ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_token.c#4 (text+ko) ==== @@ -164,7 +164,6 @@ return (NULL); } - GET_TOKEN_AREA(t, dptr, 29); if (t == NULL) return (NULL); @@ -214,7 +213,6 @@ { return (au_to_attr32(vni)); - } #endif /* !(defined(_KERNEL) || defined(KERNEL) */ @@ -238,7 +236,7 @@ } /* Determine the size of the basic unit. */ - switch(unit_type) { + switch (unit_type) { case AUR_BYTE: datasize = AUR_BYTE_SIZE; break; @@ -392,7 +390,8 @@ * token ID 1 byte * ip header 20 bytes */ -token_t *au_to_ip(struct ip *ip) +token_t * +au_to_ip(struct ip *ip) { token_t *t; u_char *dptr = NULL; @@ -545,11 +544,11 @@ } /* - * token ID 1 byte - * seconds of time 4 bytes - * milliseconds of time 4 bytes - * file name len 2 bytes - * file pathname N bytes + 1 terminating NULL byte + * token ID 1 byte + * seconds of time 4 bytes + * milliseconds of time 4 bytes + * file name len 2 bytes + * file pathname N bytes + 1 terminating NULL byte */ token_t * #if defined(KERNEL) || defined(_KERNEL) @@ -708,7 +707,8 @@ pid_t pid, au_asid_t sid, au_tid_t *tid) { - return (au_to_process32(auid, euid, egid, ruid, rgid, pid, sid, tid)); + return (au_to_process32(auid, euid, egid, ruid, rgid, pid, sid, + tid)); } /* @@ -769,8 +769,8 @@ } token_t * -au_to_process_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, - pid_t pid, au_asid_t sid, au_tid_addr_t *tid) +au_to_process_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, + gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid) { return (au_to_process32_ex(auid, euid, egid, ruid, rgid, pid, sid, @@ -871,7 +871,7 @@ */ token_t * au_to_socket_ex_32(u_int16_t lp, u_int16_t rp, struct sockaddr *la, -struct sockaddr *ra) + struct sockaddr *ra) { errno = ENOTSUP; @@ -904,7 +904,7 @@ GET_TOKEN_AREA(t, dptr, 107); if (t == NULL) return (NULL); - + ADD_U_CHAR(dptr, AU_SOCK_UNIX_TOKEN); /* BSM token has two bytes for family */ ADD_U_CHAR(dptr, 0); @@ -986,7 +986,7 @@ au_to_sock_inet(struct sockaddr_in *so) { - return au_to_sock_inet32(so); + return (au_to_sock_inet32(so)); } /* @@ -1046,7 +1046,8 @@ pid_t pid, au_asid_t sid, au_tid_t *tid) { - return (au_to_subject32(auid, euid, egid, ruid, rgid, pid, sid, tid)); + return (au_to_subject32(auid, euid, egid, ruid, rgid, pid, sid, + tid)); } /* @@ -1110,6 +1111,7 @@ au_to_subject_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid) { + return (au_to_subject32_ex(auid, euid, egid, ruid, rgid, pid, sid, tid)); } @@ -1263,7 +1265,7 @@ timems = tm.tv_usec/1000; /* Add the timestamp */ ADD_U_INT32(dptr, tm.tv_sec); - ADD_U_INT32(dptr, timems); /* We need time in ms */ + ADD_U_INT32(dptr, timems); /* We need time in ms. */ return (t); }