CRED: Separate task security context from task_struct
Separate the task security context from task_struct. At this point, the security data is temporarily embedded in the task_struct with two pointers pointing to it. Note that the Alpha arch is altered as it refers to (E)UID and (E)GID in entry.S via asm-offsets. With comment fixes Signed-off-by: Marc Dionne <marc.c.dionne@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
committed by
James Morris
parent
15a2460ed0
commit
b6dff3ec5e
@@ -23,11 +23,9 @@
|
||||
/*
|
||||
* Credentials
|
||||
*/
|
||||
typedef struct cred {
|
||||
/* EMPTY */
|
||||
} cred_t;
|
||||
typedef const struct cred cred_t;
|
||||
|
||||
extern struct cred *sys_cred;
|
||||
extern cred_t *sys_cred;
|
||||
|
||||
/* this is a hack.. (assumes sys_cred is the only cred_t in the system) */
|
||||
static inline int capable_cred(cred_t *cr, int cid)
|
||||
|
@@ -19,6 +19,6 @@
|
||||
#define __XFS_GLOBALS_H__
|
||||
|
||||
extern uint64_t xfs_panic_mask; /* set to cause more panics */
|
||||
extern struct cred *sys_cred;
|
||||
extern cred_t *sys_cred;
|
||||
|
||||
#endif /* __XFS_GLOBALS_H__ */
|
||||
|
@@ -497,7 +497,7 @@ int xfs_iread(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
|
||||
xfs_inode_t **, xfs_daddr_t, uint);
|
||||
int xfs_iread_extents(struct xfs_trans *, xfs_inode_t *, int);
|
||||
int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t,
|
||||
xfs_nlink_t, xfs_dev_t, struct cred *, xfs_prid_t,
|
||||
xfs_nlink_t, xfs_dev_t, cred_t *, xfs_prid_t,
|
||||
int, struct xfs_buf **, boolean_t *, xfs_inode_t **);
|
||||
void xfs_dinode_from_disk(struct xfs_icdinode *,
|
||||
struct xfs_dinode_core *);
|
||||
|
@@ -16,7 +16,7 @@ struct xfs_iomap;
|
||||
|
||||
int xfs_open(struct xfs_inode *ip);
|
||||
int xfs_setattr(struct xfs_inode *ip, struct iattr *vap, int flags,
|
||||
struct cred *credp);
|
||||
cred_t *credp);
|
||||
#define XFS_ATTR_DMI 0x01 /* invocation from a DMI function */
|
||||
#define XFS_ATTR_NONBLOCK 0x02 /* return EAGAIN if operation would block */
|
||||
#define XFS_ATTR_NOLOCK 0x04 /* Don't grab any conflicting locks */
|
||||
@@ -28,24 +28,24 @@ int xfs_inactive(struct xfs_inode *ip);
|
||||
int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name,
|
||||
struct xfs_inode **ipp, struct xfs_name *ci_name);
|
||||
int xfs_create(struct xfs_inode *dp, struct xfs_name *name, mode_t mode,
|
||||
xfs_dev_t rdev, struct xfs_inode **ipp, struct cred *credp);
|
||||
xfs_dev_t rdev, struct xfs_inode **ipp, cred_t *credp);
|
||||
int xfs_remove(struct xfs_inode *dp, struct xfs_name *name,
|
||||
struct xfs_inode *ip);
|
||||
int xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip,
|
||||
struct xfs_name *target_name);
|
||||
int xfs_mkdir(struct xfs_inode *dp, struct xfs_name *dir_name,
|
||||
mode_t mode, struct xfs_inode **ipp, struct cred *credp);
|
||||
mode_t mode, struct xfs_inode **ipp, cred_t *credp);
|
||||
int xfs_readdir(struct xfs_inode *dp, void *dirent, size_t bufsize,
|
||||
xfs_off_t *offset, filldir_t filldir);
|
||||
int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name,
|
||||
const char *target_path, mode_t mode, struct xfs_inode **ipp,
|
||||
struct cred *credp);
|
||||
cred_t *credp);
|
||||
int xfs_inode_flush(struct xfs_inode *ip, int flags);
|
||||
int xfs_set_dmattrs(struct xfs_inode *ip, u_int evmask, u_int16_t state);
|
||||
int xfs_reclaim(struct xfs_inode *ip);
|
||||
int xfs_change_file_space(struct xfs_inode *ip, int cmd,
|
||||
xfs_flock64_t *bf, xfs_off_t offset,
|
||||
struct cred *credp, int attr_flags);
|
||||
cred_t *credp, int attr_flags);
|
||||
int xfs_rename(struct xfs_inode *src_dp, struct xfs_name *src_name,
|
||||
struct xfs_inode *src_ip, struct xfs_inode *target_dp,
|
||||
struct xfs_name *target_name, struct xfs_inode *target_ip);
|
||||
|
Reference in New Issue
Block a user