diff options
author | Marek Pospisil <Marek.Pospisil@Sun.COM> | 2010-03-05 13:16:08 -0800 |
---|---|---|
committer | Marek Pospisil <Marek.Pospisil@Sun.COM> | 2010-03-05 13:16:08 -0800 |
commit | 005d3feb53a9a10272d4a24b03991575d6a9bcb3 (patch) | |
tree | 3c239c5ec7be3de4c1719c4539033149da56a799 /usr/src/uts/common/fs/sockfs | |
parent | 83d7a2524bdbf7b1da1c47b52bc20eee0f12c60e (diff) | |
download | illumos-joyent-005d3feb53a9a10272d4a24b03991575d6a9bcb3.tar.gz |
PSARC/2009/354 Always on / no reboot Solaris Audit
6192139 Solaris auditing should be able to start collecting audit records without a reboot
Diffstat (limited to 'usr/src/uts/common/fs/sockfs')
-rw-r--r-- | usr/src/uts/common/fs/sockfs/sockstr.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/fs/sockfs/socksubr.c | 5 | ||||
-rw-r--r-- | usr/src/uts/common/fs/sockfs/socktpi.c | 13 |
3 files changed, 13 insertions, 12 deletions
diff --git a/usr/src/uts/common/fs/sockfs/sockstr.c b/usr/src/uts/common/fs/sockfs/sockstr.c index dc2af07a93..4b08e4aac3 100644 --- a/usr/src/uts/common/fs/sockfs/sockstr.c +++ b/usr/src/uts/common/fs/sockfs/sockstr.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1679,6 +1679,7 @@ strsock_proto(vnode_t *vp, mblk_t *mp, union T_primitives *tpr; struct sonode *so; sotpi_info_t *sti; + uint32_t auditing = AU_AUDITING(); so = VTOSO(vp); sti = SOTOTPI(so); @@ -1788,7 +1789,7 @@ strsock_proto(vnode_t *vp, mblk_t *mp, *allmsgsigs = S_INPUT | S_RDNORM; *pollwakeups = POLLIN | POLLRDNORM; *wakeups = RSLEEP; - if (audit_active) + if (auditing) audit_sock(T_UNITDATA_IND, strvp2wq(vp), mp, 0); return (mp); @@ -2279,7 +2280,7 @@ strsock_proto(vnode_t *vp, mblk_t *mp, return (NULL); } - if (audit_active) + if (auditing) audit_sock(T_CONN_IND, strvp2wq(vp), mp, 0); if (!(so->so_state & SS_ACCEPTCONN)) { zcmn_err(getzoneid(), CE_WARN, diff --git a/usr/src/uts/common/fs/sockfs/socksubr.c b/usr/src/uts/common/fs/sockfs/socksubr.c index 526fdd4937..2a329da653 100644 --- a/usr/src/uts/common/fs/sockfs/socksubr.c +++ b/usr/src/uts/common/fs/sockfs/socksubr.c @@ -62,7 +62,6 @@ #include <sys/socketvar.h> #include <netinet/in.h> #include <sys/un.h> - #include <sys/ucred.h> #include <sys/tiuser.h> @@ -756,7 +755,7 @@ fdbuf_extract(struct fdbuf *fdbuf, void *rights, int rightslen) mutex_exit(&fp->f_tlock); setf(fd, fp); *rp++ = fd; - if (audit_active) + if (AU_AUDITING()) audit_fdrecv(fd, fp); dprint(1, ("fdbuf_extract: [%d] = %d, %p refcnt %d\n", i, fd, (void *)fp, fp->f_count)); @@ -830,7 +829,7 @@ fdbuf_create(void *rights, int rightslen, struct fdbuf **fdbufp) fdbuf->fd_fds[i] = fp; fdbuf->fd_numfd++; releasef(fds[i]); - if (audit_active) + if (AU_AUDITING()) audit_fdsend(fds[i], fp, 0); } *fdbufp = fdbuf; diff --git a/usr/src/uts/common/fs/sockfs/socktpi.c b/usr/src/uts/common/fs/sockfs/socktpi.c index bfbd67ad81..de0293e710 100644 --- a/usr/src/uts/common/fs/sockfs/socktpi.c +++ b/usr/src/uts/common/fs/sockfs/socktpi.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2591,7 +2591,7 @@ sotpi_connect(struct sonode *so, soisconnecting(so); mutex_exit(&so->so_lock); - if (audit_active) + if (AU_AUDITING()) audit_sock(T_CONN_REQ, strvp2wq(SOTOV(so)), mp, 0); error = kstrputmsg(SOTOV(so), mp, NULL, 0, 0, @@ -3857,7 +3857,7 @@ sosend_dgramcmsg(struct sonode *so, struct sockaddr *name, socklen_t namelen, ASSERT(MBLKL(mp) <= (ssize_t)size); ASSERT(mp->b_wptr <= mp->b_datap->db_lim); - if (audit_active) + if (AU_AUDITING()) audit_sock(T_UNITDATA_REQ, strvp2wq(SOTOV(so)), mp, 0); error = kstrputmsg(SOTOV(so), mp, uiop, len, 0, MSG_BAND, 0); @@ -4135,7 +4135,7 @@ sosend_dgram(struct sonode *so, struct sockaddr *name, socklen_t namelen, ASSERT(mp->b_wptr <= mp->b_datap->db_lim); } - if (audit_active) + if (AU_AUDITING()) audit_sock(T_UNITDATA_REQ, strvp2wq(SOTOV(so)), mp, 0); error = kstrputmsg(SOTOV(so), mp, uiop, len, 0, MSG_BAND, 0); @@ -4657,6 +4657,7 @@ sodgram_direct(struct sonode *so, struct sockaddr *name, boolean_t connected; mblk_t *mpdata = NULL; sotpi_info_t *sti = SOTOTPI(so); + uint32_t auditing = AU_AUDITING(); ASSERT(name != NULL && namelen != 0); ASSERT(!(so->so_mode & SM_CONNREQUIRED)); @@ -4721,7 +4722,7 @@ sodgram_direct(struct sonode *so, struct sockaddr *name, linkb(mp, mpdata); else mp = mpdata; - if (audit_active) + if (auditing) audit_sock(T_UNITDATA_REQ, strvp2wq(SOTOV(so)), mp, 0); udp_wput(udp_wq, mp); @@ -4741,7 +4742,7 @@ sodgram_direct(struct sonode *so, struct sockaddr *name, if (connected) return (strwrite(SOTOV(so), uiop, CRED())); - if (audit_active) + if (auditing) audit_sock(T_UNITDATA_REQ, strvp2wq(SOTOV(so)), mp, 0); error = kstrputmsg(SOTOV(so), mp, uiop, len, 0, MSG_BAND, 0); |