mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c
Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931
This commit is contained in:
parent
0135101e23
commit
66df81021e
|
@ -86,6 +86,11 @@ static void NDVALIDATE_impl(struct nameidata *, int);
|
|||
ndp->ni_cnd.cn_flags |= ISRESTARTED; \
|
||||
} while (0)
|
||||
|
||||
#define NI_CAP_VIOLATION(ndp, path) do { \
|
||||
ktrcapfail(CAPFAIL_NAMEI, (path)); \
|
||||
(ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \
|
||||
} while (0)
|
||||
|
||||
SDT_PROVIDER_DEFINE(vfs);
|
||||
SDT_PROBE_DEFINE4(vfs, namei, lookup, entry, "struct vnode *", "char *",
|
||||
"unsigned long", "bool");
|
||||
|
|
|
@ -205,11 +205,6 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status,
|
|||
#define NI_LCF_CAP_DOTDOT_KTR 0x0008 /* ".." in strictrelative case */
|
||||
#define NI_LCF_KTR_FLAGS (NI_LCF_STRICTREL_KTR | NI_LCF_CAP_DOTDOT_KTR)
|
||||
|
||||
#define NI_CAP_VIOLATION(ndp, path) do { \
|
||||
ktrcapfail(CAPFAIL_NAMEI, (path)); \
|
||||
(ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Initialization of a nameidata structure.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue