kern_acct.c (169857) | kern_acct.c (170152) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * Copyright (c) 2005 Robert N. M. Watson 6 * All rights reserved. 7 * 8 * All or some portions of this file are derived from material licensed --- 54 unchanged lines hidden (view full) --- 63 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 64 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 65 * SUCH DAMAGE. 66 * 67 * @(#)kern_acct.c 8.1 (Berkeley) 6/14/93 68 */ 69 70#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * Copyright (c) 2005 Robert N. M. Watson 6 * All rights reserved. 7 * 8 * All or some portions of this file are derived from material licensed --- 54 unchanged lines hidden (view full) --- 63 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 64 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 65 * SUCH DAMAGE. 66 * 67 * @(#)kern_acct.c 8.1 (Berkeley) 6/14/93 68 */ 69 70#include <sys/cdefs.h> |
71__FBSDID("$FreeBSD: head/sys/kern/kern_acct.c 169857 2007-05-22 06:51:38Z dds $"); | 71__FBSDID("$FreeBSD: head/sys/kern/kern_acct.c 170152 2007-05-31 11:51:53Z kib $"); |
72 73#include "opt_mac.h" 74 75#include <sys/param.h> 76#include <sys/systm.h> 77#include <sys/acct.h> 78#include <sys/fcntl.h> 79#include <sys/kernel.h> --- 126 unchanged lines hidden (view full) --- 206 /* 207 * If accounting is to be started to a file, open that file for 208 * appending and make sure it's a 'normal'. 209 */ 210 if (uap->path != NULL) { 211 NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE | AUDITVNODE1, 212 UIO_USERSPACE, uap->path, td); 213 flags = FWRITE | O_APPEND; | 72 73#include "opt_mac.h" 74 75#include <sys/param.h> 76#include <sys/systm.h> 77#include <sys/acct.h> 78#include <sys/fcntl.h> 79#include <sys/kernel.h> --- 126 unchanged lines hidden (view full) --- 206 /* 207 * If accounting is to be started to a file, open that file for 208 * appending and make sure it's a 'normal'. 209 */ 210 if (uap->path != NULL) { 211 NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE | AUDITVNODE1, 212 UIO_USERSPACE, uap->path, td); 213 flags = FWRITE | O_APPEND; |
214 error = vn_open(&nd, &flags, 0, -1); | 214 error = vn_open(&nd, &flags, 0, NULL); |
215 if (error) 216 return (error); 217 vfslocked = NDHASGIANT(&nd); 218 NDFREE(&nd, NDF_ONLY_PNBUF); 219#ifdef MAC 220 error = mac_check_system_acct(td->td_ucred, nd.ni_vp); 221 if (error) { 222 VOP_UNLOCK(nd.ni_vp, 0, td); --- 429 unchanged lines hidden --- | 215 if (error) 216 return (error); 217 vfslocked = NDHASGIANT(&nd); 218 NDFREE(&nd, NDF_ONLY_PNBUF); 219#ifdef MAC 220 error = mac_check_system_acct(td->td_ucred, nd.ni_vp); 221 if (error) { 222 VOP_UNLOCK(nd.ni_vp, 0, td); --- 429 unchanged lines hidden --- |