PERFORCE change 90075 for review

Robert Watson rwatson at FreeBSD.org
Sat Jan 21 13:49:37 GMT 2006


http://perforce.freebsd.org/chv.cgi?CH=90075

Change 90075 by rwatson at rwatson_sesame on 2006/01/21 13:48:38

	When I removed the marginally incorrect return() calls, I introduced
	a much larger bug in that everything fell through the switch.  The
	perils of not fully thinking through things...
	
	Submitted by:	phk
	Found with:	FlexeLint

Affected files ...

.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#21 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#21 (text+ko) ====

@@ -46,7 +46,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <errno.h>
-#include <fcntl.h>
 #include <time.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -2534,111 +2533,146 @@
 	switch(tok->id) {
 	case AUT_HEADER32:
 		print_header32_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_HEADER32_EX:
 		print_header32_ex_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_HEADER64:
 		print_header64_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_HEADER64_EX:
 		print_header64_ex_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_TRAILER:
 		print_trailer_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_ARG32:
 		print_arg32_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_ARG64:
 		print_arg64_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_DATA:
 		print_arb_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_ATTR32:
 		print_attr32_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_ATTR64:
 		print_attr64_tok(outfp, tok, del, raw, sfrm);
 
 	case AUT_EXIT:
 		print_exit_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_EXEC_ARGS:
 		print_execarg_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_EXEC_ENV:
 		print_execenv_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_OTHER_FILE32:
 		print_file_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_NEWGROUPS:
 		print_newgroups_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_IN_ADDR:
 		print_inaddr_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_IN_ADDR_EX:
 		print_inaddr_ex_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_IP:
 		print_ip_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_IPC:
 		print_ipc_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_IPC_PERM:
 		print_ipcperm_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_IPORT:
 		print_iport_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_OPAQUE:
 		print_opaque_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_PATH:
 		print_path_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_PROCESS32:
 		print_process32_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_PROCESS32_EX:
 		print_process32ex_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_RETURN32:
 		print_return32_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_RETURN64:
 		print_return64_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_SEQ:
 		print_seq_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_SOCKET:
 		print_socket_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_SOCKINET32:
 		print_sock_inet32_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_SOCKUNIX:
 		print_sock_unix_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_SUBJECT32:
 		print_subject32_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_SUBJECT64:
 		print_subject64_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_SUBJECT32_EX:
 		print_subject32ex_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_TEXT:
 		print_text_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	case AUT_SOCKET_EX:
 		print_socketex32_tok(outfp, tok, del, raw, sfrm);
+		return;
 
 	default:
 		print_invalid_tok(outfp, tok, del, raw, sfrm);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list