Date: Mon, 12 Jan 2004 19:21:08 -0800 (PST) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 45242 for review Message-ID: <200401130321.i0D3L8lD070595@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 *)];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401130321.i0D3L8lD070595>