From owner-p4-projects@FreeBSD.ORG Tue Jul 11 00:36:55 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 05B5116A4E1; Tue, 11 Jul 2006 00:36:55 +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 B6FA916A4DF for ; Tue, 11 Jul 2006 00:36:54 +0000 (UTC) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 684B643D4C for ; Tue, 11 Jul 2006 00:36:54 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6B0asDR003953 for ; Tue, 11 Jul 2006 00:36:54 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6B0arkX003939 for perforce@freebsd.org; Tue, 11 Jul 2006 00:36:53 GMT (envelope-from wsalamon@computer.org) Date: Tue, 11 Jul 2006 00:36:53 GMT Message-Id: <200607110036.k6B0arkX003939@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Cc: Subject: PERFORCE change 101256 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, 11 Jul 2006 00:36:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=101256 Change 101256 by wsalamon@vh3 on 2006/07/11 00:36:25 Integrate latest OpenBSM changes into contrib. Affected files ... .. //depot/projects/trustedbsd/audit3/contrib/openbsm/HISTORY#7 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/VERSION#10 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit.h#13 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit_record.h#12 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/configure.ac#8 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/au_token.3#7 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_io.c#15 integrate .. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_token.c#18 integrate Differences ... ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/HISTORY#7 (text+ko) ==== @@ -1,3 +1,11 @@ +OpenBSM 1.0 alpha 8 + +- Correct typo in definition of AUR_INT. +- Adopt OpenSolaris constant values for AUDIT_* configuration flags. +- Arguments to au_to_exec_args() and au_to_exec_env() no longer const. +- Add kernel versions of au_to_exec_args() and au_to_exec_env(). +- Fix exec argument type that is printed for env strings from 'arg' to 'env'. + OpenBSM 1.0 alpha 7 - Adopted Solaris-compatible format for subject32_ex and subject64_ex @@ -175,4 +183,4 @@ to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/HISTORY#6 $ +$P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/HISTORY#7 $ ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/VERSION#10 (text+ko) ==== @@ -1,1 +1,1 @@ -OPENBSM_1_0_ALPHA_7 +OPENBSM_1_0_ALPHA_8 ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit.h#13 (text+ko) ==== @@ -30,7 +30,7 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit.h#12 $ + * $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit.h#13 $ */ #ifndef _BSM_AUDIT_H @@ -146,6 +146,7 @@ /* * Audit policy controls. */ +#ifdef OLD_WORLD_ORDER #define AUDIT_CNT 0x0001 #define AUDIT_AHLT 0x0002 #define AUDIT_ARGV 0x0004 @@ -157,6 +158,22 @@ #define AUDIT_GROUP 0x0100 #define AUDIT_TRAIL 0x0200 #define AUDIT_PATH 0x0400 +#else /* !OLD_WORLD_ORDER */ +#define AUDIT_CNT 0x0001 +#define AUDIT_AHLT 0x0002 +#define AUDIT_ARGV 0x0004 +#define AUDIT_ARGE 0x0008 +#define AUDIT_SEQ 0x0010 +#define AUDIT_WINDATA 0x0020 +#define AUDIT_USER 0x0040 +#define AUDIT_GROUP 0x0080 +#define AUDIT_TRAIL 0x0100 +#define AUDIT_PATH 0x0200 +#define AUDIT_SCNT 0x0400 +#define AUDIT_PUBLIC 0x0800 +#define AUDIT_ZONENAME 0x1000 +#define AUDIT_PERZONE 0x2000 +#endif /* !OLD_WORLD_ORDER */ /* * Audit queue control parameters ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit_record.h#12 (text+ko) ==== @@ -30,7 +30,7 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit_record.h#11 $ + * $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit_record.h#12 $ */ #ifndef _BSM_AUDIT_RECORD_H_ @@ -184,7 +184,7 @@ #define AUR_CHAR AUR_BYTE #define AUR_SHORT 1 #define AUR_INT32 2 -#define AUR_INT AUR_INT +#define AUR_INT AUR_INT32 #define AUR_INT64 3 /* ... and their sizes */ @@ -308,8 +308,13 @@ gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid); token_t *au_to_subject64_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); -token_t *au_to_exec_args(const char **); -token_t *au_to_exec_env(const char **); +#if defined(_KERNEL) || defined(KERNEL) +token_t *au_to_exec_args(char *args, int argc); +token_t *au_to_exec_env(char *envs, int envc); +#else +token_t *au_to_exec_args(char **argv); +token_t *au_to_exec_env(char **envp); +#endif token_t *au_to_text(char *text); token_t *au_to_kevent(struct kevent *kev); token_t *au_to_trailer(int rec_size); ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/configure.ac#8 (text+ko) ==== @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([OpenBSM], [1.0a7], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/configure.ac#7 $]) +AC_INIT([OpenBSM], [1.0a8], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) +AC_REVISION([$P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/configure.ac#8 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config/config.h]) ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/au_token.3#7 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/au_token.3#6 $ +.\" $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/au_token.3#7 $ .\" .Dd April 19, 2005 .Dt AU_TOKEN 3 @@ -155,9 +155,9 @@ .Ft token_t * .Fn au_to_me "void" .Ft token_t * -.Fn au_to_exec_args "const char **args" +.Fn au_to_exec_args "char **argv" .Ft token_t * -.Fn au_to_exec_env "const char **env" +.Fn au_to_exec_env "char **envp" .Ft token_t * .Fn au_to_header "int rec_size" "au_event_t e_type" "au_emod_t emod" .Ft token_t * ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_io.c#15 (text+ko) ==== @@ -31,7 +31,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_io.c#14 $ + * $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_io.c#15 $ */ #include @@ -1259,7 +1259,7 @@ { int i; - print_tok_type(fp, tok->id, "exec arg", raw); + print_tok_type(fp, tok->id, "exec env", raw); for (i = 0; i< tok->tt.execenv.count; i++) { print_delim(fp, del); print_string(fp, tok->tt.execenv.text[i], ==== //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_token.c#18 (text+ko) ==== @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_token.c#17 $ + * $P4: //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_token.c#18 $ */ #include @@ -1055,7 +1055,7 @@ * text count null-terminated strings */ token_t * -au_to_exec_args(const char **args) +au_to_exec_args(char **argv) { token_t *t; u_char *dptr = NULL; @@ -1063,7 +1063,7 @@ int i, count = 0; size_t totlen = 0; - nextarg = *args; + nextarg = *argv; while (nextarg != NULL) { int nextlen; @@ -1071,7 +1071,7 @@ nextlen = strlen(nextarg); totlen += nextlen + 1; count++; - nextarg = *(args + count); + nextarg = *(argv + count); } totlen += count * sizeof(char); /* nul terminations. */ @@ -1083,7 +1083,7 @@ ADD_U_INT32(dptr, count); for (i = 0; i < count; i++) { - nextarg = *(args + i); + nextarg = *(argv + i); ADD_MEM(dptr, nextarg, strlen(nextarg) + 1); } @@ -1096,7 +1096,7 @@ * text count null-terminated strings */ token_t * -au_to_exec_env(const char **env) +au_to_exec_env(char **envp) { token_t *t; u_char *dptr = NULL; @@ -1104,7 +1104,7 @@ size_t totlen = 0; const char *nextenv; - nextenv = *env; + nextenv = *envp; while (nextenv != NULL) { int nextlen; @@ -1112,7 +1112,7 @@ nextlen = strlen(nextenv); totlen += nextlen + 1; count++; - nextenv = *(env + count); + nextenv = *(envp + count); } totlen += sizeof(char) * count; @@ -1124,7 +1124,7 @@ ADD_U_INT32(dptr, count); for (i = 0; i < count; i++) { - nextenv = *(env + i); + nextenv = *(envp + i); ADD_MEM(dptr, nextenv, strlen(nextenv) + 1); }