Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/namei.h
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | |||||
#define ISUNICODE 0x00100000 /* current component name is unicode*/ | #define ISUNICODE 0x00100000 /* current component name is unicode*/ | ||||
#define ISOPEN 0x00200000 /* caller is opening; return a real vnode. */ | #define ISOPEN 0x00200000 /* caller is opening; return a real vnode. */ | ||||
#define NOCROSSMOUNT 0x00400000 /* do not cross mount points */ | #define NOCROSSMOUNT 0x00400000 /* do not cross mount points */ | ||||
#define NOMACCHECK 0x00800000 /* do not perform MAC checks */ | #define NOMACCHECK 0x00800000 /* do not perform MAC checks */ | ||||
#define AUDITVNODE1 0x04000000 /* audit the looked up vnode information */ | #define AUDITVNODE1 0x04000000 /* audit the looked up vnode information */ | ||||
#define AUDITVNODE2 0x08000000 /* audit the looked up vnode information */ | #define AUDITVNODE2 0x08000000 /* audit the looked up vnode information */ | ||||
#define TRAILINGSLASH 0x10000000 /* path ended in a slash */ | #define TRAILINGSLASH 0x10000000 /* path ended in a slash */ | ||||
#define NOCAPCHECK 0x20000000 /* do not perform capability checks */ | #define NOCAPCHECK 0x20000000 /* do not perform capability checks */ | ||||
#define PARAMASK 0x3ffffe00 /* mask of parameter descriptors */ | #define BENEATH 0x40000000 /* strict downwards-only lookup */ | ||||
#define PARAMASK 0x7ffffe00 /* mask of parameter descriptors */ | |||||
drysdale_google.com: I couldn't see where this is used - is it needed? | |||||
Done Inline ActionsYou are quite right: that was only needed in my very first patch version. I'll remove it. jonathan: You are quite right: that was only needed in my very first patch version. I'll remove it. | |||||
/* | /* | ||||
* Initialization of a nameidata structure. | * Initialization of a nameidata structure. | ||||
*/ | */ | ||||
#define NDINIT(ndp, op, flags, segflg, namep, td) \ | #define NDINIT(ndp, op, flags, segflg, namep, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, 0, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, 0, td) | ||||
#define NDINIT_AT(ndp, op, flags, segflg, namep, dirfd, td) \ | #define NDINIT_AT(ndp, op, flags, segflg, namep, dirfd, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, 0, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, 0, td) | ||||
#define NDINIT_ATRIGHTS(ndp, op, flags, segflg, namep, dirfd, rightsp, td) \ | #define NDINIT_ATRIGHTS(ndp, op, flags, segflg, namep, dirfd, rightsp, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, rightsp, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, rightsp, td) | ||||
#define NDINIT_ATVP(ndp, op, flags, segflg, namep, vp, td) \ | #define NDINIT_ATVP(ndp, op, flags, segflg, namep, vp, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, vp, 0, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, vp, 0, td) | ||||
void NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, | void NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, | ||||
enum uio_seg segflg, const char *namep, int dirfd, struct vnode *startdir, | enum uio_seg segflg, const char *namep, int dirfd, struct vnode *startdir, | ||||
cap_rights_t *rightsp, struct thread *td); | cap_rights_t *rightsp, struct thread *td); | ||||
/* | |||||
* Set the ni_strictrelative field of a struct nameidata according to a | |||||
* monotonically-increasing policy. | |||||
Done Inline ActionsThis just seems to describe ndrequire_strict_relative_lookups's implementation, and I'm not sure it would help my understanding of this functionality without the full context of this change. emaste: This just seems to describe `ndrequire_strict_relative_lookups`'s implementation, and I'm not… | |||||
Done Inline ActionsI'm going to change this by removing the function and just setting the fields in the appropriate places. The logic will be unconditional in one place and if (foo != EPERM) in two, so it's probably not worth the cost of this only-inlineable-with-LTO function call. jonathan: I'm going to change this by removing the function and just setting the fields in the… | |||||
*/ | |||||
void ndrequire_strict_relative_lookups(struct nameidata*, int errnum); | |||||
#define NDF_NO_DVP_RELE 0x00000001 | #define NDF_NO_DVP_RELE 0x00000001 | ||||
#define NDF_NO_DVP_UNLOCK 0x00000002 | #define NDF_NO_DVP_UNLOCK 0x00000002 | ||||
#define NDF_NO_DVP_PUT 0x00000003 | #define NDF_NO_DVP_PUT 0x00000003 | ||||
#define NDF_NO_VP_RELE 0x00000004 | #define NDF_NO_VP_RELE 0x00000004 | ||||
#define NDF_NO_VP_UNLOCK 0x00000008 | #define NDF_NO_VP_UNLOCK 0x00000008 | ||||
#define NDF_NO_VP_PUT 0x0000000c | #define NDF_NO_VP_PUT 0x0000000c | ||||
#define NDF_NO_STARTDIR_RELE 0x00000010 | #define NDF_NO_STARTDIR_RELE 0x00000010 | ||||
Show All 28 Lines |
I couldn't see where this is used - is it needed?