Deleted Added
full compact
kern_ktrace.c (116182) kern_ktrace.c (118094)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93
34 */
35
36#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 20 unchanged lines hidden (view full) ---

29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/kern/kern_ktrace.c 116182 2003-06-11 00:56:59Z obrien $");
37__FBSDID("$FreeBSD: head/sys/kern/kern_ktrace.c 118094 2003-07-27 17:04:56Z phk $");
38
39#include "opt_ktrace.h"
40#include "opt_mac.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/fcntl.h>
45#include <sys/jail.h>

--- 473 unchanged lines hidden (view full) ---

519 td->td_pflags |= TDP_INKTRACE;
520 if (ops != KTROP_CLEAR) {
521 /*
522 * an operation which requires a file argument.
523 */
524 NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, uap->fname, td);
525 flags = FREAD | FWRITE | O_NOFOLLOW;
526 mtx_lock(&Giant);
38
39#include "opt_ktrace.h"
40#include "opt_mac.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/fcntl.h>
45#include <sys/jail.h>

--- 473 unchanged lines hidden (view full) ---

519 td->td_pflags |= TDP_INKTRACE;
520 if (ops != KTROP_CLEAR) {
521 /*
522 * an operation which requires a file argument.
523 */
524 NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, uap->fname, td);
525 flags = FREAD | FWRITE | O_NOFOLLOW;
526 mtx_lock(&Giant);
527 error = vn_open(&nd, &flags, 0);
527 error = vn_open(&nd, &flags, 0, -1);
528 if (error) {
529 mtx_unlock(&Giant);
530 td->td_pflags &= ~TDP_INKTRACE;
531 return (error);
532 }
533 NDFREE(&nd, NDF_ONLY_PNBUF);
534 vp = nd.ni_vp;
535 VOP_UNLOCK(vp, 0, td);

--- 371 unchanged lines hidden ---
528 if (error) {
529 mtx_unlock(&Giant);
530 td->td_pflags &= ~TDP_INKTRACE;
531 return (error);
532 }
533 NDFREE(&nd, NDF_ONLY_PNBUF);
534 vp = nd.ni_vp;
535 VOP_UNLOCK(vp, 0, td);

--- 371 unchanged lines hidden ---