aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 14:43:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 14:43:54 -0500
commitbb26c6c29b7cc9f39e491b074b09f3c284738d36 (patch)
treec7867af2bb4ff0feae889183efcd4d79b0f9a325 /include/linux/fs.h
parente14e61e967f2b3bdf23f05e4ae5b9aa830151a44 (diff)
parentcbacc2c7f066a1e01b33b0e27ae5efbf534bc2db (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (105 commits) SELinux: don't check permissions for kernel mounts security: pass mount flags to security_sb_kern_mount() SELinux: correctly detect proc filesystems of the form "proc/foo" Audit: Log TIOCSTI user namespaces: document CFS behavior user namespaces: require cap_set{ug}id for CLONE_NEWUSER user namespaces: let user_ns be cloned with fairsched CRED: fix sparse warnings User namespaces: use the current_user_ns() macro User namespaces: set of cleanups (v2) nfsctl: add headers for credentials coda: fix creds reference capabilities: define get_vfs_caps_from_disk when file caps are not enabled CRED: Allow kernel services to override LSM settings for task actions CRED: Add a kernel_service object class to SELinux CRED: Differentiate objective and effective subjective credentials on a task CRED: Documentation CRED: Use creds in file structs CRED: Prettify commoncap.c CRED: Make execve() take advantage of copy-on-write credentials ...
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4a853ef6fd35..195a8cb2a749 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -316,6 +316,7 @@ struct poll_table_struct;
316struct kstatfs; 316struct kstatfs;
317struct vm_area_struct; 317struct vm_area_struct;
318struct vfsmount; 318struct vfsmount;
319struct cred;
319 320
320extern void __init inode_init(void); 321extern void __init inode_init(void);
321extern void __init inode_init_early(void); 322extern void __init inode_init_early(void);
@@ -827,7 +828,7 @@ struct file {
827 fmode_t f_mode; 828 fmode_t f_mode;
828 loff_t f_pos; 829 loff_t f_pos;
829 struct fown_struct f_owner; 830 struct fown_struct f_owner;
830 unsigned int f_uid, f_gid; 831 const struct cred *f_cred;
831 struct file_ra_state f_ra; 832 struct file_ra_state f_ra;
832 833
833 u64 f_version; 834 u64 f_version;
@@ -1194,7 +1195,7 @@ enum {
1194#define has_fs_excl() atomic_read(&current->fs_excl) 1195#define has_fs_excl() atomic_read(&current->fs_excl)
1195 1196
1196#define is_owner_or_cap(inode) \ 1197#define is_owner_or_cap(inode) \
1197 ((current->fsuid == (inode)->i_uid) || capable(CAP_FOWNER)) 1198 ((current_fsuid() == (inode)->i_uid) || capable(CAP_FOWNER))
1198 1199
1199/* not quite ready to be deprecated, but... */ 1200/* not quite ready to be deprecated, but... */
1200extern void lock_super(struct super_block *); 1201extern void lock_super(struct super_block *);
@@ -1674,7 +1675,8 @@ extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
1674extern long do_sys_open(int dfd, const char __user *filename, int flags, 1675extern long do_sys_open(int dfd, const char __user *filename, int flags,
1675 int mode); 1676 int mode);
1676extern struct file *filp_open(const char *, int, int); 1677extern struct file *filp_open(const char *, int, int);
1677extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); 1678extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
1679 const struct cred *);
1678extern int filp_close(struct file *, fl_owner_t id); 1680extern int filp_close(struct file *, fl_owner_t id);
1679extern char * getname(const char __user *); 1681extern char * getname(const char __user *);
1680 1682