Deleted Added
full compact
link_elf.c (167020) link_elf.c (170152)
1/*-
2 * Copyright (c) 1998-2000 Doug Rabson
3 * 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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998-2000 Doug Rabson
3 * 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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/kern/link_elf.c 167020 2007-02-26 16:48:14Z jhb $");
28__FBSDID("$FreeBSD: head/sys/kern/link_elf.c 170152 2007-05-31 11:51:53Z kib $");
29
30#include "opt_gdb.h"
31#include "opt_mac.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#ifdef GPROF
36#include <sys/gmon.h>

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

561 int strcnt;
562 int vfslocked;
563
564 shdr = NULL;
565 lf = NULL;
566
567 NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, filename, td);
568 flags = FREAD;
29
30#include "opt_gdb.h"
31#include "opt_mac.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#ifdef GPROF
36#include <sys/gmon.h>

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

561 int strcnt;
562 int vfslocked;
563
564 shdr = NULL;
565 lf = NULL;
566
567 NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, filename, td);
568 flags = FREAD;
569 error = vn_open(&nd, &flags, 0, -1);
569 error = vn_open(&nd, &flags, 0, NULL);
570 if (error)
571 return error;
572 vfslocked = NDHASGIANT(&nd);
573 NDFREE(&nd, NDF_ONLY_PNBUF);
574#ifdef MAC
575 error = mac_check_kld_load(curthread->td_ucred, nd.ni_vp);
576 if (error) {
577 firstpage = NULL;

--- 760 unchanged lines hidden ---
570 if (error)
571 return error;
572 vfslocked = NDHASGIANT(&nd);
573 NDFREE(&nd, NDF_ONLY_PNBUF);
574#ifdef MAC
575 error = mac_check_kld_load(curthread->td_ucred, nd.ni_vp);
576 if (error) {
577 firstpage = NULL;

--- 760 unchanged lines hidden ---