perform pathname lookup with NOCHROOT flag
This commit is contained in:
parent
41dc37e6d7
commit
5823e38b87
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: firmload.c,v 1.12 2010/06/24 13:03:08 hannken Exp $ */
|
||||
/* $NetBSD: firmload.c,v 1.13 2010/10/21 01:02:34 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: firmload.c,v 1.12 2010/06/24 13:03:08 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: firmload.c,v 1.13 2010/10/21 01:02:34 jmcneill Exp $");
|
||||
|
||||
/*
|
||||
* The firmload API provides an interface for device drivers to access
|
||||
|
@ -244,7 +244,7 @@ firmware_open(const char *drvname, const char *imgname, firmware_handle_t *fhp)
|
|||
for (path = firmware_path_first(drvname, imgname, pnbuf, &prefix);
|
||||
path != NULL;
|
||||
path = firmware_path_next(drvname, imgname, pnbuf, &prefix)) {
|
||||
NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path);
|
||||
NDINIT(&nd, LOOKUP, FOLLOW | NOCHROOT, UIO_SYSSPACE, path);
|
||||
error = vn_open(&nd, FREAD, 0);
|
||||
if (error == ENOENT)
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue