diff options
| author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2003-07-03 22:06:43 -0700 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2003-07-03 22:06:43 -0700 |
| commit | a574f324dab607946682f60b9efdc1b3d810cf03 (patch) | |
| tree | 61f685215a89d897c29082474e24d0201f3eea90 /include/linux | |
| parent | 675b5da0145fb4b54c4d9f6ea0106df844e4f75d (diff) | |
[PATCH] Pass 'nameidata' to ->permission()
- Make the VFS pass the struct nameidata as an optional parameter
to the permission() inode operation.
- Patch may_create()/may_open() so it passes the struct nameidata from
vfs_create()/open_namei() as an argument to permission().
- Add an intent flag for the sys_access() function.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/coda_linux.h | 2 | ||||
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/namei.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index b22d34fcfb6d..650a6f997f8a 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h @@ -38,7 +38,7 @@ extern struct file_operations coda_ioctl_operations; int coda_open(struct inode *i, struct file *f); int coda_flush(struct file *f); int coda_release(struct inode *i, struct file *f); -int coda_permission(struct inode *inode, int mask); +int coda_permission(struct inode *inode, int mask, struct nameidata *nd); int coda_revalidate_inode(struct dentry *); int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); int coda_setattr(struct dentry *, struct iattr *); diff --git a/include/linux/fs.h b/include/linux/fs.h index 66cf193c6e64..7a5f305101c5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -743,7 +743,7 @@ struct inode_operations { int (*readlink) (struct dentry *, char __user *,int); int (*follow_link) (struct dentry *, struct nameidata *); void (*truncate) (struct inode *); - int (*permission) (struct inode *, int); + int (*permission) (struct inode *, int, struct nameidata *); int (*setattr) (struct dentry *, struct iattr *); int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); @@ -1121,7 +1121,7 @@ extern int do_remount_sb(struct super_block *sb, int flags, extern sector_t bmap(struct inode *, sector_t); extern int setattr_mask(unsigned int); extern int notify_change(struct dentry *, struct iattr *); -extern int permission(struct inode *, int); +extern int permission(struct inode *, int, struct nameidata *); extern int vfs_permission(struct inode *, int); extern int get_write_access(struct inode *); extern int deny_write_access(struct file *); diff --git a/include/linux/namei.h b/include/linux/namei.h index 256ceac1fc69..4117cd90a345 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -46,6 +46,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; */ #define LOOKUP_OPEN (0x0100) #define LOOKUP_CREATE (0x0200) +#define LOOKUP_ACCESS (0x0400) extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); #define user_path_walk(name,nd) \ diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 3d7525998534..a6d594bb252c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -240,7 +240,7 @@ extern struct inode *nfs_fhget(struct dentry *, struct nfs_fh *, struct nfs_fattr *); extern int __nfs_refresh_inode(struct inode *, struct nfs_fattr *); extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); -extern int nfs_permission(struct inode *, int); +extern int nfs_permission(struct inode *, int, struct nameidata *); extern int nfs_open(struct inode *, struct file *); extern int nfs_release(struct inode *, struct file *); extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); |
