From owner-p4-projects@FreeBSD.ORG Mon Oct 17 07:42:08 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 93E0516A421; Mon, 17 Oct 2005 07:42:07 +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 2AF5A16A41F for ; Mon, 17 Oct 2005 07:42:07 +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 E060943D49 for ; Mon, 17 Oct 2005 07:42:06 +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 j9H7g67b037231 for ; Mon, 17 Oct 2005 07:42:06 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 j9H7g6dB037228 for perforce@freebsd.org; Mon, 17 Oct 2005 07:42:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 17 Oct 2005 07:42:06 GMT Message-Id: <200510170742.j9H7g6dB037228@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 85414 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 07:42:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=85414 Change 85414 by rwatson@rwatson_peppercorn on 2005/10/17 07:41:43 Minor whitespace and style tweaks for token code. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#20 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#20 (text+ko) ==== @@ -164,7 +164,6 @@ return (NULL); } - GET_TOKEN_AREA(t, dptr, 29); if (t == NULL) return (NULL); @@ -237,7 +236,7 @@ } /* Determine the size of the basic unit. */ - switch(unit_type) { + switch (unit_type) { case AUR_BYTE: datasize = AUR_BYTE_SIZE; break; @@ -391,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; @@ -544,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) @@ -707,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)); } /* @@ -768,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, @@ -870,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; @@ -903,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); @@ -985,7 +986,7 @@ au_to_sock_inet(struct sockaddr_in *so) { - return au_to_sock_inet32(so); + return (au_to_sock_inet32(so)); } /* @@ -1045,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)); } /* @@ -1109,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)); } @@ -1262,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); }