proc: Pass file mode to proc_pid_make_inode
Pass the file mode of the proc inode to be created to proc_pid_make_inode. In proc_pid_make_inode, initialize inode->i_mode before calling security_task_to_inode. This allows selinux to set isec->sclass right away without introducing "half-initialized" inode security structs. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:

committato da
Paul Moore

parent
420591128c
commit
db978da8fa
@@ -162,7 +162,7 @@ extern int proc_pid_statm(struct seq_file *, struct pid_namespace *,
|
||||
extern const struct dentry_operations pid_dentry_operations;
|
||||
extern int pid_getattr(struct vfsmount *, struct dentry *, struct kstat *);
|
||||
extern int proc_setattr(struct dentry *, struct iattr *);
|
||||
extern struct inode *proc_pid_make_inode(struct super_block *, struct task_struct *);
|
||||
extern struct inode *proc_pid_make_inode(struct super_block *, struct task_struct *, umode_t);
|
||||
extern int pid_revalidate(struct dentry *, unsigned int);
|
||||
extern int pid_delete_dentry(const struct dentry *);
|
||||
extern int proc_pid_readdir(struct file *, struct dir_context *);
|
||||
|
Fai riferimento in un nuovo problema
Block a user