From owner-p4-projects@FreeBSD.ORG Mon Jan 12 19:21:12 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA52D16A4D1; Mon, 12 Jan 2004 19:21:12 -0800 (PST) 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 7E35116A4CE for ; Mon, 12 Jan 2004 19:21:12 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 694A243D1F for ; Mon, 12 Jan 2004 19:21:09 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i0D3L90B070601 for ; Mon, 12 Jan 2004 19:21:09 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i0D3L8lD070595 for perforce@freebsd.org; Mon, 12 Jan 2004 19:21:08 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 12 Jan 2004 19:21:08 -0800 (PST) Message-Id: <200401130321.i0D3L8lD070595@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 Subject: PERFORCE change 45242 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2004 03:21:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=45242 Change 45242 by rwatson@rwatson_paprika on 2004/01/12 19:20:40 Use unsigned lengths for audit system call arguments; avoid nastiness in userspace. Affected files ... .. //depot/projects/trustedbsd/audit2/sys/kern/init_sysent.c#4 edit .. //depot/projects/trustedbsd/audit2/sys/kern/syscalls.c#4 edit .. //depot/projects/trustedbsd/audit2/sys/kern/syscalls.master#4 edit .. //depot/projects/trustedbsd/audit2/sys/sys/syscall.h#4 edit .. //depot/projects/trustedbsd/audit2/sys/sys/syscall.mk#4 edit .. //depot/projects/trustedbsd/audit2/sys/sys/sysproto.h#4 edit Differences ... ==== //depot/projects/trustedbsd/audit2/sys/kern/init_sysent.c#4 (text+ko) ==== ==== //depot/projects/trustedbsd/audit2/sys/kern/syscalls.c#4 (text+ko) ==== ==== //depot/projects/trustedbsd/audit2/sys/kern/syscalls.master#4 (text+ko) ==== @@ -639,17 +639,17 @@ int attrnamespace, void *data, size_t nbytes); } 439 STD BSD { ssize_t extattr_list_link(const char *path, \ int attrnamespace, void *data, size_t nbytes); } -440 MSTD BSD { int audit(const void *record, int length); } -441 MSTD BSD { int auditon(int cmd, void *data, int length); } +440 MSTD BSD { int audit(const void *record, u_int length); } +441 MSTD BSD { int auditon(int cmd, void *data, u_int length); } 442 MSTD BSD { int auditsvc(int fd, int limit); } 443 MSTD BSD { int getauid(uid_t *auid); } 444 MSTD BSD { int setauid(uid_t *auid); } 445 MSTD BSD { int getaudit(struct auditinfo *auditinfo); } 446 MSTD BSD { int setaudit(struct auditinfo *auditinfo); } 447 MSTD BSD { int getaudit_addr(struct auditinfo_addr \ - *auditinfo_addr, int length); } + *auditinfo_addr, u_int length); } 448 MSTD BSD { int setaudit_addr(struct auditinfo_addr \ - *auditinfo_addr, int length); } + *auditinfo_addr, u_int length); } 449 MSTD BSD { int auditctl(char *path); } ; Please copy any additions and changes to the following compatability tables: ==== //depot/projects/trustedbsd/audit2/sys/sys/syscall.h#4 (text+ko) ==== ==== //depot/projects/trustedbsd/audit2/sys/sys/syscall.mk#4 (text+ko) ==== ==== //depot/projects/trustedbsd/audit2/sys/sys/sysproto.h#4 (text+ko) ==== @@ -1286,12 +1286,12 @@ }; struct audit_args { char record_l_[PADL_(const void *)]; const void * record; char record_r_[PADR_(const void *)]; - char length_l_[PADL_(int)]; int length; char length_r_[PADR_(int)]; + char length_l_[PADL_(u_int)]; u_int length; char length_r_[PADR_(u_int)]; }; struct auditon_args { char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char data_l_[PADL_(void *)]; void * data; char data_r_[PADR_(void *)]; - char length_l_[PADL_(int)]; int length; char length_r_[PADR_(int)]; + char length_l_[PADL_(u_int)]; u_int length; char length_r_[PADR_(u_int)]; }; struct auditsvc_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -1311,11 +1311,11 @@ }; struct getaudit_addr_args { char auditinfo_addr_l_[PADL_(struct auditinfo_addr *)]; struct auditinfo_addr * auditinfo_addr; char auditinfo_addr_r_[PADR_(struct auditinfo_addr *)]; - char length_l_[PADL_(int)]; int length; char length_r_[PADR_(int)]; + char length_l_[PADL_(u_int)]; u_int length; char length_r_[PADR_(u_int)]; }; struct setaudit_addr_args { char auditinfo_addr_l_[PADL_(struct auditinfo_addr *)]; struct auditinfo_addr * auditinfo_addr; char auditinfo_addr_r_[PADR_(struct auditinfo_addr *)]; - char length_l_[PADL_(int)]; int length; char length_r_[PADR_(int)]; + char length_l_[PADL_(u_int)]; u_int length; char length_r_[PADR_(u_int)]; }; struct auditctl_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];