Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/namei.h
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | struct nameidata { | ||||
cap_rights_t ni_rightsneeded; /* rights required to look up vnode */ | cap_rights_t ni_rightsneeded; /* rights required to look up vnode */ | ||||
/* | /* | ||||
* Arguments to lookup. | * Arguments to lookup. | ||||
*/ | */ | ||||
struct vnode *ni_startdir; /* starting directory */ | struct vnode *ni_startdir; /* starting directory */ | ||||
struct vnode *ni_rootdir; /* logical root directory */ | struct vnode *ni_rootdir; /* logical root directory */ | ||||
struct vnode *ni_topdir; /* logical top directory */ | struct vnode *ni_topdir; /* logical top directory */ | ||||
int ni_dirfd; /* starting directory for *at functions */ | int ni_dirfd; /* starting directory for *at functions */ | ||||
int ni_strictrelative; /* relative lookup only; no '..' */ | int ni_nonrelativeerrno; /* errno for non-relative (..) lookup */ | ||||
/* | /* | ||||
* Results: returned from namei | * Results: returned from namei | ||||
*/ | */ | ||||
struct filecaps ni_filecaps; /* rights the *at base has */ | struct filecaps ni_filecaps; /* rights the *at base has */ | ||||
/* | /* | ||||
* Results: returned from/manipulated by lookup | * Results: returned from/manipulated by lookup | ||||
*/ | */ | ||||
struct vnode *ni_vp; /* vnode of result */ | struct vnode *ni_vp; /* vnode of result */ | ||||
▲ Show 20 Lines • Show All 60 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); | ||||
#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 | ||||
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… | |||||
#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 | ||||
#define NDF_NO_FREE_PNBUF 0x00000020 | #define NDF_NO_FREE_PNBUF 0x00000020 | ||||
#define NDF_ONLY_PNBUF (~NDF_NO_FREE_PNBUF) | #define NDF_ONLY_PNBUF (~NDF_NO_FREE_PNBUF) | ||||
void NDFREE(struct nameidata *, const u_int); | void NDFREE(struct nameidata *, const u_int); | ||||
Show All 24 Lines |
I couldn't see where this is used - is it needed?