Unverified Commit 2a03aba1 authored by Shawn Webb's avatar Shawn Webb
Browse files

Do not lock the parent directory.



It's already locked.
Signed-off-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
parent 7be20c02
......@@ -98,7 +98,7 @@ tpe_check(struct image_params *imgp, secadm_prison_entry_t *entry)
strncpy(newpath, path, p1 - path);
memset(&nd, 0x00, sizeof(nd));
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_SYSSPACE, newpath, curthread);
NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, newpath, curthread);
if ((err = namei(&nd))) {
free(newpath, M_SECADM);
NDFREE(&nd, NDF_ONLY_PNBUF);
......@@ -122,7 +122,6 @@ tpe_check(struct image_params *imgp, secadm_prison_entry_t *entry)
}
cleanup:
vput(nd.ni_vp);
NDFREE(&nd, NDF_ONLY_PNBUF);
free(newpath, M_SECADM);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment