Skip to content

Commit

Permalink
cred: Add forward declaration of init_user_ns in all cases.
Browse files Browse the repository at this point in the history
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
  • Loading branch information
Eric W. Biederman committed Apr 7, 2012
1 parent 74ba508 commit 7e6bd8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/cred.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,11 @@ static inline void put_cred(const struct cred *_cred)
#define current_user() (current_cred_xxx(user))
#define current_security() (current_cred_xxx(security))

extern struct user_namespace init_user_ns;
#ifdef CONFIG_USER_NS
#define current_user_ns() (current_cred_xxx(user_ns))
#define task_user_ns(task) (task_cred_xxx((task), user_ns))
#else
extern struct user_namespace init_user_ns;
#define current_user_ns() (&init_user_ns)
#define task_user_ns(task) (&init_user_ns)
#endif
Expand Down

0 comments on commit 7e6bd8f

Please sign in to comment.