diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2009-03-02 10:46:23 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2009-03-02 10:46:23 +0000 |
commit | 694dcf49ac5cf33f6cbf6e1a4687a1eb9a2dc0ce (patch) | |
tree | a5ce36d3531eaaae9f5cf6c822527f47a238e1e9 /tools/audump.c | |
parent | a4bd134433fd2aaa1d814163ac7b29acc444654a (diff) | |
download | src-694dcf49ac5cf33f6cbf6e1a4687a1eb9a2dc0ce.tar.gz src-694dcf49ac5cf33f6cbf6e1a4687a1eb9a2dc0ce.zip |
Vendor import of OpenBSM 1.1 beta1, which incorporates the followingvendor/openbsm/1.1-BETA-1
changes since the last imported OpenBSM release:
OpenBSM 1.1 beta 1
- The filesz parameter in audit_control(5) now accepts suffixes: 'B' for
Bytes, 'K' for Kilobytes, 'M' for Megabytes, and 'G' for Gigabytes.
For legacy support no suffix defaults to bytes.
- Audit trail log expiration support added. It is configured in
audit_control(5) with the expire-after parameter. If there is no
expire-after parameter in audit_control(5), the default, then the audit
trail files are not expired and removed. See audit_control(5) for
more information.
- Change defaults in audit_control: warn at 5% rather than 20% free for audit
partitions, rotate automatically at 2mb, and set the default policy to
cnt,argv rather than cnt so that execve(2) arguments are captured if
AUE_EXECVE events are audited. These may provide more usable defaults for
many users.
- Use au_domain_to_bsm(3) and au_socket_type_to_bsm(3) to convert
au_to_socket_ex(3) arguments to BSM format.
- Fix error encoding AUT_IPC_PERM tokens.
Obtained from: TrustedBSD Project
Sponsored by: Apple Inc.
Notes
Notes:
svn path=/vendor/openbsm/dist/; revision=189277
svn path=/vendor/openbsm/1.1-BETA-1/; revision=189278; tag=vendor/openbsm/1.1-BETA-1
Diffstat (limited to 'tools/audump.c')
-rw-r--r-- | tools/audump.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/tools/audump.c b/tools/audump.c index 65dc87abba06..a5f4b6d0602b 100644 --- a/tools/audump.c +++ b/tools/audump.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#7 $ + * $P4: //depot/projects/trustedbsd/openbsm/tools/audump.c#8 $ */ #include <bsm/libbsm.h> @@ -80,6 +80,8 @@ audump_control(void) char string[PATH_MAX], string2[PATH_MAX]; int ret, val; long policy; + time_t age; + size_t size; ret = getacflg(string, PATH_MAX); if (ret == -2) @@ -126,6 +128,32 @@ audump_control(void) if (au_poltostr(policy, PATH_MAX, string2) < 0) err(-1, "au_poltostr"); printf("policy:%s\n", string2); + + ret = getacfilesz(&size); + if (ret == -2) + err(-1, "getacfilesz"); + if (ret != 0) + err(-1, "getacfilesz: %d", ret); + + printf("filesz:%ldB\n", size); + + + ret = getachost(string, PATH_MAX); + if (ret == -2) + err(-1, "getachost"); + if (ret == -3) + err(-1, "getachost: %d", ret); + if (ret == 0 && ret != 1) + printf("host:%s\n", string); + + ret = getacexpire(&val, &age, &size); + if (ret == -2) + err(-1, "getacexpire"); + if (ret == -1) + err(-1, "getacexpire: %d", ret); + if (ret == 0 && ret != 1) + printf("expire-after:%ldB %s %lds\n", size, + val ? "AND" : "OR", age); } static void |