Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262653
b: refs/heads/master
c: 3295514
h: refs/heads/master
i:
  262651: 3343a8a
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Aug 7, 2011
1 parent ade7e8c commit 16a2f88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 7813b94a54987571082ff19e9d87eabbfec23b4e
refs/heads/master: 3295514841c2112d94451ba5deaf54f5afb78ea9
11 changes: 6 additions & 5 deletions trunk/include/linux/cred.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,11 @@ static inline void put_cred(const struct cred *_cred)
/**
* current_cred - Access the current task's subjective credentials
*
* Access the subjective credentials of the current task.
* Access the subjective credentials of the current task. RCU-safe,
* since nobody else can modify it.
*/
#define current_cred() \
(current->cred)
(*(__force struct cred **)&current->cred)

/**
* __task_cred - Access a task's objective credentials
Expand Down Expand Up @@ -307,7 +308,7 @@ static inline void put_cred(const struct cred *_cred)
({ \
struct user_struct *__u; \
struct cred *__cred; \
__cred = (struct cred *) current_cred(); \
__cred = current_cred(); \
__u = get_uid(__cred->user); \
__u; \
})
Expand All @@ -322,7 +323,7 @@ static inline void put_cred(const struct cred *_cred)
({ \
struct group_info *__groups; \
struct cred *__cred; \
__cred = (struct cred *) current_cred(); \
__cred = current_cred(); \
__groups = get_group_info(__cred->group_info); \
__groups; \
})
Expand All @@ -341,7 +342,7 @@ static inline void put_cred(const struct cred *_cred)

#define current_cred_xxx(xxx) \
({ \
current->cred->xxx; \
current_cred()->xxx; \
})

#define current_uid() (current_cred_xxx(uid))
Expand Down

0 comments on commit 16a2f88

Please sign in to comment.