Date: Mon, 16 Apr 2007 11:41:00 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 118228 for review Message-ID: <200704161141.l3GBf0X2053695@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=118228 Change 118228 by rwatson@rwatson_cinnamon on 2007/04/16 11:39:59 When an invalid address type is passed to functions building tokens, panic. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_bsm_token.c#32 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_bsm_token.c#32 (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/sys/security/audit/audit_bsm_token.c#31 $ + * $P4: //depot/projects/trustedbsd/audit3/sys/security/audit/audit_bsm_token.c#32 $ * $FreeBSD: src/sys/security/audit/audit_bsm_token.c,v 1.9 2006/12/28 22:18:43 rwatson Exp $ */ @@ -710,10 +710,9 @@ GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 7 * sizeof(u_int32_t) + sizeof(u_int64_t) + 5 * sizeof(u_int32_t)); - else { - errno = EINVAL; - return (NULL); - } + else + panic("au_to_process64_ex: invalidate at_type (%d)", + tid->at_type); ADD_U_CHAR(dptr, AUT_PROCESS64_EX); ADD_U_INT32(dptr, auid); @@ -1094,10 +1093,9 @@ GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 7 * sizeof(u_int32_t) + sizeof(u_int64_t) + 5 * sizeof(u_int32_t)); - else { - errno = EINVAL; - return (NULL); - } + else + panic("au_to_subject64_ex: invalid at_type (%d)", + tid->at_type); ADD_U_CHAR(dptr, AUT_SUBJECT64_EX); ADD_U_INT32(dptr, auid);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704161141.l3GBf0X2053695>