PERFORCE change 76038 for review
Robert Watson
rwatson at FreeBSD.org
Tue Apr 26 23:15:48 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=76038
Change 76038 by rwatson at rwatson_paprika on 2005/04/26 23:14:47
Return errno values in various error cases associated with
audit record construction.
Affected files ...
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#9 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#9 (text+ko) ====
@@ -111,6 +111,7 @@
rec->data = (u_char *) malloc (MAX_AUDIT_RECORD_SIZE * sizeof(u_char));
if(rec->data == NULL) {
free(rec);
+ errno = ENOMEM;
return -1;
}
@@ -122,6 +123,7 @@
free(rec);
/* XXX We need to increase size of MAX_AUDIT_RECORDS */
+ errno = ENOMEM;
return -1;
}
rec->desc = bsm_rec_count;
@@ -264,6 +266,7 @@
rec = open_desc_table[d];
if((rec == NULL) || (rec->used == 0)) {
+ errno = EINVAL;
return -1; /* Invalid descriptor */
}
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