Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/vfs_lookup.c
Show First 20 Lines • Show All 589 Lines • ▼ Show 20 Lines | #endif | ||||
ndp->ni_loopcnt = 0; | ndp->ni_loopcnt = 0; | ||||
/* | /* | ||||
* Locked lookup. | * Locked lookup. | ||||
*/ | */ | ||||
for (;;) { | for (;;) { | ||||
ndp->ni_startdir = dp; | ndp->ni_startdir = dp; | ||||
error = lookup(ndp); | error = lookup(ndp); | ||||
if (error != 0) | if (error != 0) { | ||||
/* | |||||
* Override an error to not allow user to use | |||||
* BENEATH as an oracle. | |||||
*/ | |||||
if ((ndp->ni_lcf & (NI_LCF_LATCH | | |||||
NI_LCF_BENEATH_LATCHED)) == NI_LCF_LATCH) | |||||
error = ENOTCAPABLE; | |||||
goto out; | goto out; | ||||
} | |||||
/* | /* | ||||
* If not a symbolic link, we're done. | * If not a symbolic link, we're done. | ||||
*/ | */ | ||||
if ((cnp->cn_flags & ISSYMLINK) == 0) { | if ((cnp->cn_flags & ISSYMLINK) == 0) { | ||||
if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) { | if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) { | ||||
namei_cleanup_cnp(cnp); | namei_cleanup_cnp(cnp); | ||||
} else | } else | ||||
cnp->cn_flags |= HASBUF; | cnp->cn_flags |= HASBUF; | ||||
▲ Show 20 Lines • Show All 1,048 Lines • Show Last 20 Lines |