diff options
author | brueffer <brueffer@FreeBSD.org> | 2015-12-18 09:48:01 +0000 |
---|---|---|
committer | brueffer <brueffer@FreeBSD.org> | 2015-12-18 09:48:01 +0000 |
commit | d0695185279685fedc5cd2ef6b615c4be9378c43 (patch) | |
tree | aa8cfe0cdfd8d3707778fac1df526d01b514cb3d /contrib/openbsm/libauditd | |
parent | c013da36dd6433af682a60f3f39d806ea5fcebd3 (diff) | |
parent | ab2965f3f31f8900072b6d17188253d21c93474a (diff) | |
download | FreeBSD-src-d0695185279685fedc5cd2ef6b615c4be9378c43.zip FreeBSD-src-d0695185279685fedc5cd2ef6b615c4be9378c43.tar.gz |
Merge OpenBSM 1.2 alpha 4.
MFC after: 2 weeks
Relnotes: yes
Diffstat (limited to 'contrib/openbsm/libauditd')
-rw-r--r-- | contrib/openbsm/libauditd/Makefile.am | 4 | ||||
-rw-r--r-- | contrib/openbsm/libauditd/auditd_lib.c | 11 | ||||
-rw-r--r-- | contrib/openbsm/libauditd/libauditd.3 | 4 |
3 files changed, 7 insertions, 12 deletions
diff --git a/contrib/openbsm/libauditd/Makefile.am b/contrib/openbsm/libauditd/Makefile.am index 3a4e7ab..c6e09aa 100644 --- a/contrib/openbsm/libauditd/Makefile.am +++ b/contrib/openbsm/libauditd/Makefile.am @@ -1,7 +1,3 @@ -## -## $P4: //depot/projects/trustedbsd/openbsm/libauditd/Makefile.am#3 $ -## - if USE_NATIVE_INCLUDES INCLUDES = -I$(top_builddir) -I$(top_srcdir) else diff --git a/contrib/openbsm/libauditd/auditd_lib.c b/contrib/openbsm/libauditd/auditd_lib.c index 3c03348..6079df0 100644 --- a/contrib/openbsm/libauditd/auditd_lib.c +++ b/contrib/openbsm/libauditd/auditd_lib.c @@ -25,8 +25,6 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * $P4: //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#18 $ */ #include <sys/param.h> @@ -402,12 +400,13 @@ trailname_to_tstamp(char *fn, time_t *tstamp) * ADE_NOERR on success or there is nothing to do. * ADE_PARSE if error parsing audit_control(5). * ADE_NOMEM if could not allocate memory. - * ADE_EXPIRE if there was an unespected error. + * ADE_READLINK if could not read link file. + * ADE_EXPIRE if there was an unexpected error. */ int auditd_expire_trails(int (*warn_expired)(char *)) { - int andflg, ret = ADE_NOERR; + int andflg, len, ret = ADE_NOERR; size_t expire_size, total_size = 0L; time_t expire_age, oldest_time, current_time = time(NULL); struct dir_ent *traildir; @@ -431,7 +430,9 @@ auditd_expire_trails(int (*warn_expired)(char *)) * Read the 'current' trail file name. Trim off directory path. */ activefn[0] = '\0'; - readlink(AUDIT_CURRENT_LINK, activefn, MAXPATHLEN - 1); + len = readlink(AUDIT_CURRENT_LINK, activefn, MAXPATHLEN - 1); + if (len < 0) + return (ADE_READLINK); if ((afnp = strrchr(activefn, '/')) != NULL) afnp++; diff --git a/contrib/openbsm/libauditd/libauditd.3 b/contrib/openbsm/libauditd/libauditd.3 index 0fece29..06c5246 100644 --- a/contrib/openbsm/libauditd/libauditd.3 +++ b/contrib/openbsm/libauditd/libauditd.3 @@ -26,8 +26,6 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/openbsm/libauditd/libauditd.3#1 $ -.\" .Dd December 27, 2008 .Dt LIBAUDITD 3 .Os @@ -45,7 +43,7 @@ library provides the internal implementation of There are no public interfaces in .Nm . .Sh SEE ALSO -.Xr auditd 8 . +.Xr auditd 8 .Sh HISTORY The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer, Inc., in 2004. |