From 005d3feb53a9a10272d4a24b03991575d6a9bcb3 Mon Sep 17 00:00:00 2001 From: Marek Pospisil Date: Fri, 5 Mar 2010 13:16:08 -0800 Subject: PSARC/2009/354 Always on / no reboot Solaris Audit 6192139 Solaris auditing should be able to start collecting audit records without a reboot --- usr/src/uts/common/syscall/open.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/src/uts/common/syscall/open.c') diff --git a/usr/src/uts/common/syscall/open.c b/usr/src/uts/common/syscall/open.c index e4fc89f3ec..3f5f484f6d 100644 --- a/usr/src/uts/common/syscall/open.c +++ b/usr/src/uts/common/syscall/open.c @@ -48,7 +48,6 @@ #include #include #include -#include /* * Common code for openat(). Check permissions, allocate an open @@ -68,6 +67,7 @@ copen(int startfd, char *fname, int filemode, int createmode) proc_t *p = curproc; uio_seg_t seg = UIO_USERSPACE; char *open_filename = fname; + uint32_t auditing = AU_AUDITING(); if (startfd == AT_FDCWD) { /* @@ -101,7 +101,7 @@ copen(int startfd, char *fname, int filemode, int createmode) * Handle openattrdirat request */ if (filemode & FXATTRDIROPEN) { - if (audit_active) + if (auditing) audit_setfsat_path(1); if (error = lookupnameat(fname, seg, FOLLOW, @@ -185,7 +185,7 @@ copen(int startfd, char *fname, int filemode, int createmode) filemode &= ~FNDELAY; error = falloc((vnode_t *)NULL, filemode, &fp, &fd); if (error == 0) { - if (audit_active) + if (auditing) audit_setfsat_path(1); /* * Last arg is a don't-care term if @@ -200,7 +200,7 @@ copen(int startfd, char *fname, int filemode, int createmode) if (startvp != NULL) VN_RELE(startvp); if (error == 0) { - if (audit_active) + if (auditing) audit_copen(fd, fp, vp); if ((vp->v_flag & VDUP) == 0) { fp->f_vnode = vp; -- cgit v1.2.3