Commit Graph

43 Commits

Author SHA1 Message Date
Robert Watson
b9ad4a7bf0 Resolve conflicts from OpenBSM 1.0 alpha 12 import.
Obtained from:	TrustedBSD Project
2006-09-25 11:53:06 +00:00
Robert Watson
b3a9bf4df7 This commit was generated by cvs2svn to compensate for changes in r162621,
which included commits to RCS files with non-trunk default branches.
2006-09-25 11:40:29 +00:00
Robert Watson
4bd0c025f3 Vendor import TrustedBSD OpenBSM 1.0 alpha 12, with the following change
history notes since the last import:

OpenBSM 1.0 alpha 12

- Correct bug in auditreduce which prevented the -c option from working
  correctly when the user specifies to process successful or failed events.
  The problem stemmed from not having access to the return token at the time
  the initial preselection occurred, but now a second preselection process
  occurs while processing the return token.
- getacfilesz(3) API added to read new audit_control(5) filesz setting,
  which auditd(8) now sets the kernel audit trail rotation size to.
- auditreduce(1) now uses stdin if no file names are specified on the command
  line; this was the documented behavior previously, but it was not
  implemented.  Be more specific in auditreduce(1)'s examples section about
  what might be done with the output of auditreduce.
- Add audit_warn(5) closefile event so that administrators can hook
  termination of an audit trail file.  For example, this might be used to
  compress the trail file after it is closed.
- auditreduce(1) now uses regular expressions for pathname matching. Users can
  now supply one or more (comma delimited) regular expressions for searching
  the pathnames. If one of the regular expressions is prefixed with a tilde
  (~), and a path matches, it will be excluded from the search results.

MFC after:	3 days
Obtained from:	TrustedBSD Project
2006-09-25 11:40:29 +00:00
Robert Watson
5bf75b12ba Update config.h for OpenBSM 1.0 alpha 11 import: strlcat is now detected
by configure.
2006-09-21 07:14:41 +00:00
Robert Watson
2a62e5451b Resolve conflicts from OpenBSM 1.0 alpha 11 vendor import: we have locally
added $FreeBSD$ to /etc configuration files to assist mergemaster.
2006-09-21 07:12:33 +00:00
Robert Watson
bb97b41819 Vendor import of OpenBSM 1.0 alpha 11, with the following change history
notes since the last import:

OpenBSM 1.0 alpha 11

- Reclassify certain read/write operations as having no class rather than the
  fr/fw class; our default classes audit intent (open) not operations (read,
  write).
- Introduce AUE_SYSCTL_WRITE event so that BSD/Darwin systems can audit reads
  and writes of sysctls as separate events.  Add additional kernel
  environment and jail events for FreeBSD.
- Break AUDIT_TRIGGER_OPEN_NEW into two events, AUDIT_TRIGGER_ROTATE_USER
  (issued by the user audit(8) tool) and AUDIT_TRIGGER_ROTATE_KERNEL (issued
  by the kernel audit implementation) so that they can be distinguished.
- Disable rate limiting of rotate requests; as the kernel doesn't retransmit
  a dropped request, the log file will otherwise grow indefinitely if the
  trigger is dropped.
- Improve auditd debugging output.
- Fix a number of threading related bugs in audit_control file reading
  routines.
- Add APIs au_poltostr() and au_strtopol() to convert between text
  representations of audit_control policy flags and the flags passed to
  auditon(A_SETPOLICY) and retrieved from auditon(A_GETPOLICY).
- Add API getacpol() to return the 'policy:' entry from audit_control, an
  extension to the Solaris file format to allow specification of policy
  persistent flags.
- Update audump to print the audit_control policy field.
- Update auditd to read the audit_control policy field and set the kernel
  policy to match it when configuring/reconfiguring.  Remove the -s and -h
  arguments as these policies are now set via the configuration file.  If a
  policy line is not found in the configuration file, continue with the
  current default of setting AUDIT_CNT.
- Fix bugs in the parsing of large execve(2) arguments and environmental
  variable tokens; increase maximum parsed argument and variable count.
- configure now detects strlcat(), used by policy-related functions.
- Reference token and record sample files added to test tree.

Obtained from:	TrustedBSD Project
2006-09-21 07:07:33 +00:00
Robert Watson
55b15aaa25 This commit was generated by cvs2svn to compensate for changes in r162503,
which included commits to RCS files with non-trunk default branches.
2006-09-21 07:07:33 +00:00
Robert Watson
33c207f0e2 Note removal of certain contrib/openbsm/bsm include files from
FreeBSD development branches, they exist only in the vendor branch.

Obtained from:	TrustedBSD Project
2006-09-02 09:56:28 +00:00
Robert Watson
fdb4472c92 Vendor import of OpenBSM 1.0 alpha 10, with the following changes:
- auditd now generates complete audit records for its events, as required for
  application-submitted audit records in the the FreeBSD kernel audit
  implementation.

This also restores contrib/openbsm/bsm/audit_record to the vendor version
after the build fixes previously committed; however, this file is not used
in the build.

Obtained from:	TrustedBSD Project
2006-09-02 09:37:14 +00:00
Robert Watson
ba33e7d9dd This commit was generated by cvs2svn to compensate for changes in r161863,
which included commits to RCS files with non-trunk default branches.
2006-09-02 09:37:14 +00:00
Robert Watson
85feadf62a Back out imp's quick build fix for OpenBSM now that the prototypes and
functions are in sync between the kernel and user space.

This restores bsm_token.c as found in OpenBSM 1.0 alpha 9.
2006-09-01 15:47:07 +00:00
Robert Watson
2965fc7642 This commit was generated by cvs2svn to compensate for changes in r161818,
which included commits to RCS files with non-trunk default branches.
2006-09-01 15:47:07 +00:00
Robert Watson
8379353c85 Remove duplicated include files from HEAD that appear in both
contrib/openbsm/bsm and sys/bsm.  This will help avoid triggering
problems due to an inconsistent include order between the base and
lib32 builds.  We will continue to import these files on the vendor
branch.  Files used purely in user space (audit_uevents.h) are not
removed.

Suggested by:	ru
2006-09-01 04:58:39 +00:00
Warner Losh
58178f6693 Import on vendor branch two files that have been tweaked to unbreak
the build.  The openbsm folks are free to fix it in any other way they
see fit once they resurface.

Basically, make everything always be const char **, even though const
char ** usually should be 'const char * const *' in most cases.  This
makes the three different definitions consistant and allows world to
build.
2006-08-28 17:26:38 +00:00
Warner Losh
cd437e7ec6 This commit was generated by cvs2svn to compensate for changes in r161701,
which included commits to RCS files with non-trunk default branches.
2006-08-28 17:26:38 +00:00
Robert Watson
7932086ef1 Update FreeBSD upgrade notes for OpenBSM.
Obtained from:	TrustedBSD Project
2006-08-26 10:35:54 +00:00
Robert Watson
98c38adbfd Update for OpenBSM 1.0 alpha 9.
Obtained from:	TrustedBSD Project
2006-08-26 08:12:17 +00:00
Robert Watson
505237ac0c Resolove conflicts from OpenBSM 1.0 alpha 9 into audit_event.
Obtained from:	TrustedBSD Project
2006-08-26 08:08:47 +00:00
Robert Watson
22ccb20de4 Vendor import of OpenBSM 1.0 alpha 9, with the following change history
notes since the last import:

OpenBSM 1.0 alpha 9

- Rename many OpenBSM-specific constants and API elements containing the
  strings "BSM" and "bsm" to "AUDIT" and "audit", observing that this is true
  for almost all existing constants and APIs.
- Instead of passing a per-instance cookie directly into all audit filter
  APIs, pass in the audit filter daemon state pointer, which is then used by
  the module using an audit_filter_{get,set}cookie() API.  This will allow
  future service APIs provided by the filter daemon to maintain their own
  state -- for example, per-module preselection state.

OpenBSM 1.0 alpha 8

- Correct typo in definition of AUR_INT.
- Adopt OpenSolaris constant values for AUDIT_* configuration flags.
- Arguments to au_to_exec_args() and au_to_exec_env() no longer const.
- Add kernel versions of au_to_exec_args() and au_to_exec_env().
- Fix exec argument type that is printed for env strings from 'arg' to 'env'.
- New OpenBSM token version number assigned, constants added for other
  commonly seen version numbers.
- OpenBSM-specific events assigned numbers in the 43xxx range to avoid future
  collisions with Solaris.  Darwin events renamed to AUE_DARWIN_foo, as they
  are now deprecated numberings.
- autoconf now detects clock_gettime(), which is not available on Darwin.
- praudit output fixes relating to arg32 and arg64 tokens.
- Maximum record size updated to 64k-1 to match Solaris record size limit.
- Various style and comment cleanups in include files.

This is an MFC candidate to RELENG_6.

Obtained from:	TrustedBSD Project
2006-08-26 08:04:15 +00:00
Robert Watson
c9965e710d This commit was generated by cvs2svn to compensate for changes in r161630,
which included commits to RCS files with non-trunk default branches.
2006-08-26 08:04:15 +00:00
Robert Watson
1727deefa8 Resolve conflicts from OpenBSM 1.0 alpha 7 import.
Obtained from:	TrustedBSD Project
2006-06-27 18:09:54 +00:00
Robert Watson
d9af45c4c8 Vendor import of OpenBSM 1.0 alpha 7, with the following change history
notes:

- Adopted Solaris-compatible format for subject32_ex and subject64_ex
  tokens, which previously did not correctly implement variable length
  address storage.
- Prefer inttypes.h to stdint.h; enhance queue.h detection to test for
  TAILQ_FOREACH_SAFE(), which is present in recent BSD queue.h's, but not
  older ones.  OpenBSM now builds on some FreeBSD 4.x version.
- New event types for extended attributes, ACLs, and scheduling.

Obtained from:	TrustedBSD Project
2006-06-27 18:06:41 +00:00
Robert Watson
258cc56708 This commit was generated by cvs2svn to compensate for changes in r159985,
which included commits to RCS files with non-trunk default branches.
2006-06-27 18:06:41 +00:00
Robert Watson
21b2c802f6 Modify import instructions to include "-n" in the sample command line for
the CVS import, and suggest removing it for the real import, rather than
suggesting it for testing.  This will hopefully prevent me (and others)
from making errors.
2006-06-27 17:55:38 +00:00
Robert Watson
0163f8cb67 Regenerate config.h from OpenBSM 1.0 alpha 6 import.
Obtained from:	TrustedBSD Project
2006-06-05 11:06:32 +00:00
Robert Watson
506764c6f6 Vendor branch import of TrustedBSD OpenBSM 1.0 alpha 6:
- Use AU_TO_WRITE and AU_NO_TO_WRITE for the 'keep' argument to au_close();
  previously we used hard-coded 0 and 1 values.
- Add man page for au_open(), au_write(), au_close(), and
  au_close_buffer().
- Support a more complete range of data types for the arbitrary data token:
  add AUR_CHAR (alias to AUR_BYTE), remove AUR_LONG, add AUR_INT32 (alias
  to AUR_INT), add AUR_INT64.
- Add au_close_token(), which allows writing a single token_t to a memory
  buffer.  Not likely to be used much by applications, but useful for
  writing test tools.
- Modify au_to_file() so that it accepts a timeval in user space, not just
  kernel -- this is not a Solaris BSM API so can be modified without
  causing compatibility issues.
- Define a new API, au_to_header32_tm(), which adds a struct timeval
  argument to the ordinary au_to_header32(), which is now implemented by
  wrapping au_to_header32_tm() and calling gettimeofday().  #ifndef KERNEL
  the APIs that invoke gettimeofday(), rather than having a variable
  definition.  Don't try to retrieve time zone information using
  gettimeofday(), as it's not needed, and introduces possible failure
  modes.
- Don't perform byte order transformations on the addr/machine fields of
  the terminal ID that appears in the process32/subject32 tokens.  These
  are assumed to be IP addresses, and as such, to be in network byte
  order.
- Universally, APIs now assume that IP addresses and ports are provided
  in network byte order.  APIs now generally provide these types in
  network byte order when decoding.
- Beginnings of an OpenBSM test framework can now be found in openbsm/test.
  This code is not built or installed by default.
- auditd now assigns more appropriate syslog levels to its debugging and
  error information.
- Support for audit filters introduced: audit filters are dynamically
  loaded shared objects that run in the context of a new daemon,
  auditfilterd.  The daemon reads from an audit pipe and feeds both BSM and
  parsed versions of records to shared objects using a module API.  This
  will provide a framework for the writing of intrusion detection services.
- New utility API, audit_submit(), added to capture common elements of audit
  record submission for many applications.

Obtained from:	TrustedBSD Project
2006-06-05 10:52:12 +00:00
Robert Watson
0127a4bb1b This commit was generated by cvs2svn to compensate for changes in r159248,
which included commits to RCS files with non-trunk default branches.
2006-06-05 10:52:12 +00:00
Robert Watson
e61dc6cac4 Take contrib/openbsm/etc configuration files off the vendor branch in
order to add $FreeBSD$ tags, which helps mergemaster better manage
updating them.

Requested by:	several
Obtained from:	TrustedBSD Project
2006-03-26 01:44:35 +00:00
Robert Watson
679b9244fb Fix spelling error.
Submitted by:	remko
2006-03-05 13:30:37 +00:00
Robert Watson
7a0f8e4631 Delete file from FreeBSD vendor branch of OpenBSM that has been removed
from the TrustedBSD OpenBSM distribution.

Obtained from:	TrustedBSD Project
2006-03-04 17:14:22 +00:00
Robert Watson
fd5763909d Update FreeBSD import instructions for OpenBSM based on the new autoconf
and automake OpenBSM world order.

Obtained from:	TrustedBSD Project
2006-03-04 16:50:04 +00:00
Robert Watson
6d585cab13 Add generated config.h for FreeBSD.
Obtained from:	TrustedBSD Project
2006-03-04 16:49:24 +00:00
Robert Watson
aed7487172 Remove files deleted in the OpenBSM distribution from the OpenBSM
vendor branch.

Obtained from:	TrustedBSD Project
2006-03-04 16:48:36 +00:00
Robert Watson
3b97a967e1 Vendor branch import of TrustedBSD OpenBSM 1.0 alpha 5:
- Update install notes to indicate /etc files are to be installed manually.
- On systems without LOG_SECURITY, use LOG_AUTH.
- Convert to autoconf/automake in order to move to a more portable (not
  BSD-specific) build infrastructure, and more easy conditional building of
  components.  Currently, the primary feature loss is that automake does
  not have native support for manual symlinks.  This will be addressed in a
  future OpenBSM release.
- Add compat/queue.h, to be used on systems dated BSD queue macro libraries
  (as found on Linux).
- Rename CHANGELOG to HISTORY, as our change log doesn't follow some of the
  existing conventions for a CHANGELOG.
- Some private data structures moved from audit.h to audit_internal.h to
  prevent inappropriate use by applications and name space pollution.
- Improved detection and use of endian macros using autoconf.
- Avoid non-portable use of struct in6_addr, which is largely opaque.
- Avoid leaking BSD kernel socket related token code to user space in
  bsm_token.c.
- Teach System V IPC calls to look for Linux naming variations for certain
  struct ipc_perm fields.
- Test for audit system calls, and if not present, don't build
  bsm_wrappers.c, bsm_notify.c, audit(8), and auditd(8), which rely on
  those system calls.
- au_close() is not implemented on systems that don't have audit system
  calls, but au_close_buffer() is.
- Work around missing BSDisms in bsm_wrapper.c.
- Fix nested includes so including libbsm.h in an application on Linux
  picks up the necessary definitions.

Obtained from:	TrustedBSD Project
2006-03-04 16:45:52 +00:00
Robert Watson
4c936f2998 This commit was generated by cvs2svn to compensate for changes in r156283,
which included commits to RCS files with non-trunk default branches.
2006-03-04 16:45:52 +00:00
Robert Watson
f4e380b0ce CVS import OpenBSM 1.0 alpha 4:
- Remove "audit" user example from audit_user, as it's not present on most
  systems.
- Add cannot_audit() function non-Darwin systems that wraps auditon();
  required by OpenSSH BSM support.  Convert Darwin cannot_audit() into a
  function rather than a macro.
- Library build fixed on Darwin following include file tweaks.  The native
  Darwin sys/audit.h conflicts with bsm/audit.h due to duplicate types, so
  for now we force bsm_wrappers.c to not perform a nested include of
  sys/audit.h.

Obtained from:	TrustedBSD Project
2006-02-11 00:39:23 +00:00
Robert Watson
4cdd6c8fe6 This commit was generated by cvs2svn to compensate for changes in r155518,
which included commits to RCS files with non-trunk default branches.
2006-02-11 00:39:23 +00:00
Robert Watson
23bf6e2091 Vendor branch import of OpenBSM 1.0 alpha 3:
- Man page formatting, cross reference, mlinks, and accuracy improvements.
- auditd and tools now compile and run on FreeBSD/arm.
- auditd will now fchown() the trail file to the audit review group, if
  defined at compile-time.
- Added AUE_SYSARCH for FreeBSD.
- Definition of AUE_SETFSGID fixed for Linux.

Many thanks to:	brueffer, cognet
Obtained from:	TrustedBSD Project
2006-02-06 00:06:04 +00:00
Robert Watson
a29c2a4bf4 This commit was generated by cvs2svn to compensate for changes in r155364,
which included commits to RCS files with non-trunk default branches.
2006-02-06 00:06:04 +00:00
Robert Watson
41efe1543c Correct typo in sample CVS import line: must specify full path to the
CVS repository on repoman.
2006-02-06 00:03:39 +00:00
Robert Watson
41b0acb1ac Add a brief FREEBSD-upgrade file to provide direction on how to perform
OpenBSM upgrades.  Right now, this is very easy, but in the future it
will probably become more complicated.
2006-02-04 18:29:51 +00:00
Robert Watson
742561f0d7 Import OpenBSM 1.0 alpha 2, a minor update on alpha 1:
- Man page formatting improvements.
- A number of new audit event identifiers for FreeBSD, Linux, and POSIX.1b
  events.
- Remove 'tfm' class, unused in OpenBSM.

Obtained from:	TrustedBSD Project
2006-02-04 13:17:48 +00:00
Robert Watson
ca0716f571 Initial vendor import of the TrustedBSD OpenBSM distribution, version
1.0 alpha 1, an implementation of the documented Sun Basic Security
Module (BSM) Audit API and file format, as well as local extensions to
support the Mac OS X and FreeBSD operating systems.  Also included are
command line tools for audit trail reduction and conversion to text,
as well as documentation of the commands, file format, and APIs.  This
distribution is the foundation for the TrustedBSD Audit implementation,
and is a pre-release.

This is the first in a series of commits to introduce support for
Common Criteria CAPP security event audit support.

This software has been made possible through the generous
contributions of Apple Computer, Inc., SPARTA, Inc., as well as
members of the TrustedBSD Project, including Wayne Salamon <wsalamon>
and Tom Rhodes <trhodes>.  The original OpenBSM implementation was
created by McAfee Research under contract to Apple Computer, Inc., as
part of their CC CAPP security evaluation.

Many thanks to:	wsalamon, trhodes
Obtained from:	TrustedBSD Project
2006-01-31 19:40:12 +00:00