Date: Mon, 25 Aug 2008 16:13:08 GMT From: Stacey Son <sson@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 148394 for review Message-ID: <200808251613.m7PGD8FU037278@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=148394 Change 148394 by sson@sson_amd64 on 2008/08/25 16:12:46 Bug fix for darwin: missing notify_post(). Typo in comment. Affected files ... .. //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#37 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#37 (text+ko) ==== @@ -26,7 +26,7 @@ * (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/bin/auditd/auditd.c#36 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#37 $ */ #include <sys/types.h> @@ -301,6 +301,14 @@ close(fd); } else { /* Success. */ +#ifdef USE_MACH_IPC + /* + * auditctl() potentially changes the audit + * state so post that the audit config (may + * have) changed. + */ + notify_post(__BSM_INTERNAL_NOTIFY_KEY); +#endif close_lastfile(TS); lastfile = fn; close(fd); @@ -338,11 +346,6 @@ free_dir_q(); endac(); -#ifdef USE_MACH_IPC - /* Post that the audit config changed. */ - notify_post(__BSM_INTERNAL_NOTIFY_KEY); -#endif - /* * Read the list of directories into a local linked list. * @@ -440,6 +443,12 @@ strerror(errno)); err_ret = 1; } +#ifdef USE_MACH_IPC + /* + * Post a notification that the audit config changed. + */ + notify_post(__BSM_INTERNAL_NOTIFY_KEY); +#endif if (getTSstr(TS, TIMESTAMP_LEN) == 0) close_lastfile(TS); if (lastfile != NULL) @@ -1060,7 +1069,7 @@ #endif /* - * To provide event feedback cycles and avoid auditd becoming + * To prevent event feedback cycles and avoid auditd becoming * stalled if auditing is suspended, auditd and its children run * without their events being audited. We allow the uid, tid, and * mask fields to be implicitly set to zero, but do set the pid. We
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808251613.m7PGD8FU037278>