Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201863
b: refs/heads/master
c: 5fb4987
h: refs/heads/master
i:
  201861: 9f2e990
  201859: f7a6e76
  201855: f0c69eb
v: v3
  • Loading branch information
Paul Moore authored and James Morris committed Aug 2, 2010
1 parent 6c161f6 commit 2ed75b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 253bfae6e0ad97554799affa0266052968a45808
refs/heads/master: 5fb49870e6d48d81d8ca0e1ef979073dc9a820f7
17 changes: 6 additions & 11 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static inline u32 task_sid(const struct task_struct *task)
*/
static inline u32 current_sid(void)
{
const struct task_security_struct *tsec = current_cred()->security;
const struct task_security_struct *tsec = current_security();

return tsec->sid;
}
Expand Down Expand Up @@ -1558,8 +1558,7 @@ static int may_create(struct inode *dir,
struct dentry *dentry,
u16 tclass)
{
const struct cred *cred = current_cred();
const struct task_security_struct *tsec = cred->security;
const struct task_security_struct *tsec = current_security();
struct inode_security_struct *dsec;
struct superblock_security_struct *sbsec;
u32 sid, newsid;
Expand Down Expand Up @@ -2157,8 +2156,7 @@ static int selinux_bprm_set_creds(struct linux_binprm *bprm)

static int selinux_bprm_secureexec(struct linux_binprm *bprm)
{
const struct cred *cred = current_cred();
const struct task_security_struct *tsec = cred->security;
const struct task_security_struct *tsec = current_security();
u32 sid, osid;
int atsecure = 0;

Expand Down Expand Up @@ -2533,8 +2531,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
char **name, void **value,
size_t *len)
{
const struct cred *cred = current_cred();
const struct task_security_struct *tsec = cred->security;
const struct task_security_struct *tsec = current_security();
struct inode_security_struct *dsec;
struct superblock_security_struct *sbsec;
u32 sid, newsid, clen;
Expand Down Expand Up @@ -3669,8 +3666,7 @@ static int sock_has_perm(struct task_struct *task, struct sock *sk, u32 perms)
static int selinux_socket_create(int family, int type,
int protocol, int kern)
{
const struct cred *cred = current_cred();
const struct task_security_struct *tsec = cred->security;
const struct task_security_struct *tsec = current_security();
u32 newsid;
u16 secclass;

Expand All @@ -3685,8 +3681,7 @@ static int selinux_socket_create(int family, int type,
static int selinux_socket_post_create(struct socket *sock, int family,
int type, int protocol, int kern)
{
const struct cred *cred = current_cred();
const struct task_security_struct *tsec = cred->security;
const struct task_security_struct *tsec = current_security();
struct inode_security_struct *isec = SOCK_INODE(sock)->i_security;
struct sk_security_struct *sksec;
int err = 0;
Expand Down

0 comments on commit 2ed75b2

Please sign in to comment.