PERFORCE change 152889 for review
Robert Watson
rwatson at FreeBSD.org
Wed Nov 12 11:25:40 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=152889
Change 152889 by rwatson at rwatson_cinnamon on 2008/11/12 19:25:17
In au_assemble(), rather than failing if EPERM is returned on
querying the kernel audit state, generate a token without that
additional state. This allows building audit records without
privilege, such as in our regression suite.
Affected files ...
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#32 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.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/openbsm/libbsm/bsm_audit.c#31 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#32 $
*/
#include <sys/types.h>
@@ -221,7 +221,7 @@
aia.ai_termid.at_type = AU_IPv4;
aia.ai_termid.at_addr[0] = INADDR_ANY;
if (auditon(A_GETKAUDIT, &aia, sizeof(aia)) < 0) {
- if (errno != ENOSYS)
+ if (errno != ENOSYS && errno != EPERM)
return (-1);
#endif /* HAVE_AUDIT_SYSCALLS */
tot_rec_size = rec->len + AUDIT_HEADER_SIZE +
More information about the p4-projects
mailing list