PERFORCE change 160170 for review

Robert Watson rwatson at FreeBSD.org
Fri Apr 3 03:07:52 PDT 2009


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

Change 160170 by rwatson at rwatson_cinnamon on 2009/04/03 10:07:20

	Fix a bug introduced by me in audit_submit(3), in which we apply
	local->BSM errno conversion to the return value field rather than
	the status field.
	
	Spotted by:	sson

Affected files ...

.. //depot/projects/trustedbsd/openbsm/NEWS#37 edit
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#31 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/NEWS#37 (text+ko) ====

@@ -11,6 +11,8 @@
 - Interface to convert between local and BSM fcntl(2) command values has been
   added:  au_bsm_to_fcntl_cmd(3) and au_fcntl_cmd_to_bsm(3), along with 
   definitions of constants in audit_fcntl.h.
+- A bug, introduced in OpenBSM 1.1 alpha 4, in which AUT_RETURN32 tokens
+  generated by audit_submit(3) were improperly encoded has been fixed.
 
 OpenBSM 1.1 beta 1
 
@@ -443,4 +445,4 @@
   to support reloading of kernel event table.
 - Allow comments in /etc/security configuration files.
 
-$P4: //depot/projects/trustedbsd/openbsm/NEWS#36 $
+$P4: //depot/projects/trustedbsd/openbsm/NEWS#37 $

==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#31 (text+ko) ====

@@ -26,7 +26,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#30 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#31 $
  */
 
 #ifdef __APPLE__
@@ -178,7 +178,7 @@
 			return (-1);
 		}
 	}
-	token = au_to_return32(status, au_errno_to_bsm(reterr));
+	token = au_to_return32(au_errno_to_bsm(status), reterr);
 	if (token == NULL) {
 		syslog(LOG_AUTH | LOG_ERR,
 		    "audit: enable to build return token");


More information about the p4-projects mailing list