Index: contrib/openbsm/CREDITS =================================================================== --- contrib/openbsm/CREDITS +++ contrib/openbsm/CREDITS @@ -36,6 +36,9 @@ Ryan Steinmetz The FreeBSD Foundation Brooks Davis + Mateusz Piotrowski + Alan Somers + Aniket Pandey In addition, Coverity, Inc.'s Prevent(tm) static analysis tool and Gimpel Software's FlexeLint tool were used to identify a number of bugs in the Index: contrib/openbsm/bin/auditd/auditd.c =================================================================== --- contrib/openbsm/bin/auditd/auditd.c +++ contrib/openbsm/bin/auditd/auditd.c @@ -712,7 +712,7 @@ */ err = auditd_set_qsize(); if (err) { - auditd_log_err("audit_set_qsize() %s: %m", + auditd_log_err("auditd_set_qsize() %s: %m", auditd_strerror(err)); ret = -1; } else Index: contrib/openbsm/bin/auditdistd/auditdistd.c =================================================================== --- contrib/openbsm/bin/auditdistd/auditdistd.c +++ contrib/openbsm/bin/auditdistd/auditdistd.c @@ -523,7 +523,7 @@ } TAILQ_FOREACH(adhost, &adcfg->adc_hosts, adh_next) { if (adhost->adh_role == ADIST_ROLE_SENDER) { - /* Only sender workers asks for connections. */ + /* Only sender workers ask for connections. */ PJDLOG_ASSERT(adhost->adh_conn != NULL); fd = proto_descriptor(adhost->adh_conn); PJDLOG_ASSERT(fd >= 0); Index: contrib/openbsm/bin/auditdistd/proto_tls.c =================================================================== --- contrib/openbsm/bin/auditdistd/proto_tls.c +++ contrib/openbsm/bin/auditdistd/proto_tls.c @@ -413,7 +413,7 @@ tls_certificate_verify(ssl, fingerprint); /* - * The following byte is send to make proto_connect_wait() to work. + * The following byte is sent to make proto_connect_wait() work. */ connected = 1; for (;;) { @@ -460,7 +460,7 @@ proto_close(sock); } else { /* - * The FD_CLOEXEC is cleared by dup2(2), so when we not + * The FD_CLOEXEC is cleared by dup2(2), so when we do not * call it, we have to clear it by hand in case it is set. */ if (fcntl(startfd, F_SETFD, 0) == -1) Index: contrib/openbsm/libauditd/auditd_lib.c =================================================================== --- contrib/openbsm/libauditd/auditd_lib.c +++ contrib/openbsm/libauditd/auditd_lib.c @@ -498,7 +498,7 @@ * update the mtime of the trail file to the current * time. This is so we don't prematurely remove a trail * file that was created while the system clock reset - * to the * "beginning of time" but later the system + * to the "beginning of time" but later the system * clock is set to the correct current time. */ if (current_time >= JAN_01_2000 && Index: contrib/openbsm/libbsm/au_control.3 =================================================================== --- contrib/openbsm/libbsm/au_control.3 +++ contrib/openbsm/libbsm/au_control.3 @@ -201,7 +201,7 @@ .Fa polstr , to a numeric audit policy mask returned via .Fa policy . -.Sh RETURN VALULES +.Sh RETURN VALUES The .Fn getacfilesz , .Fn getacdir , Index: contrib/openbsm/libbsm/au_domain.3 =================================================================== --- contrib/openbsm/libbsm/au_domain.3 +++ contrib/openbsm/libbsm/au_domain.3 @@ -62,7 +62,7 @@ function accepts a local domain, and returns the BSM domain for it. This call cannot fail, and instead returns a BSM domain indicating to a later decoder that the domain could not be encoded. -.Sh RETURN VALULES +.Sh RETURN VALUES On success, .Fn au_bsm_to_domain returns 0 and a converted domain; on failure, it returns -1 but does not set Index: contrib/openbsm/libbsm/au_errno.3 =================================================================== --- contrib/openbsm/libbsm/au_errno.3 +++ contrib/openbsm/libbsm/au_errno.3 @@ -76,7 +76,7 @@ local error number and using the local .Xr strerror 3 function, but will also work for errors that are not locally defined. -.Sh RETURN VALULES +.Sh RETURN VALUES On success, .Fn au_bsm_to_errno returns 0 and a converted error value; on failure, it returns -1 but does not Index: contrib/openbsm/libbsm/au_socket_type.3 =================================================================== --- contrib/openbsm/libbsm/au_socket_type.3 +++ contrib/openbsm/libbsm/au_socket_type.3 @@ -61,7 +61,7 @@ function accepts a local socket type, and returns the BSM socket type for it. This call cannot fail, and instead returns a BSM socket type indicating to a later decoder that the socket type could not be encoded. -.Sh RETURN VALULES +.Sh RETURN VALUES On success, .Fn au_bsm_to_socket_type returns 0 and a converted socket type; on failure, it returns -1 but does not Index: contrib/openbsm/man/audit.log.5 =================================================================== --- contrib/openbsm/man/audit.log.5 +++ contrib/openbsm/man/audit.log.5 @@ -102,7 +102,7 @@ .It Sy "Field Bytes Description" .It "Token ID 1 byte Token ID" .It "Record Byte Count 4 bytes Number of bytes in record" -.It "Version Number 2 bytes Record version number" +.It "Version Number 1 byte Record version number" .It "Event Type 2 bytes Event type" .It "Event Modifier 2 bytes Event sub-type" .It "Seconds 4/8 bytes Record time stamp (32/64-bits)" @@ -126,7 +126,7 @@ .It Sy "Field Bytes Description" .It "Token ID 1 byte Token ID" .It "Record Byte Count 4 bytes Number of bytes in record" -.It "Version Number 2 bytes Record version number" +.It "Version Number 1 byte Record version number" .It "Event Type 2 bytes Event type" .It "Event Modifier 2 bytes Event sub-type" .It "Address Type/Length 1 byte Host address type and length" @@ -325,7 +325,7 @@ .It "Process ID 4 bytes Process ID" .It "Session ID 4 bytes Audit session ID" .It "Terminal Port ID 4/8 bytes Terminal port ID (32/64-bits)" -.It "Terminal Address Type/Length 1 byte Length of machine address" +.It "Terminal Address Type/Length 4 bytes Length of machine address" .It "Terminal Machine Address 4 bytes IPv4 or IPv6 address of machine" .El .Ss Return Token Index: contrib/openbsm/man/getaudit.2 =================================================================== --- contrib/openbsm/man/getaudit.2 +++ contrib/openbsm/man/getaudit.2 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 19, 2008 +.Dd March 14, 2018 .Dt GETAUDIT 2 .Os .Sh NAME @@ -62,6 +62,7 @@ au_mask_t ai_mask; /* Audit masks */ au_tid_t ai_termid; /* Terminal ID */ au_asid_t ai_asid; /* Audit session ID */ + au_asflgs_t ai_flags; /* Audit session flags. */ }; typedef struct auditinfo auditinfo_t; .Ed Index: contrib/openbsm/sys/bsm/audit.h =================================================================== --- contrib/openbsm/sys/bsm/audit.h +++ contrib/openbsm/sys/bsm/audit.h @@ -46,7 +46,7 @@ #define MIN_AUDIT_FILE_SIZE (512 * 1024) /* - * Minimum noumber of free blocks on the filesystem containing the audit + * Minimum number of free blocks on the filesystem containing the audit * log necessary to avoid a hard log rotation. DO NOT SET THIS VALUE TO 0 * as the kernel does an unsigned compare, plus we want to leave a few blocks * free so userspace can terminate the log, etc. @@ -249,14 +249,14 @@ /* * Kernel audit queue control parameters: * Default: Maximum: - * aq_hiwater: AQ_HIWATER (100) AQ_MAXHIGH (10000) + * aq_hiwater: AQ_HIWATER (100) AQ_MAXHIGH (10000) * aq_lowater: AQ_LOWATER (10)