summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-08-07 20:02:12 +1000
committerJames Morris <jmorris@namei.org>2008-08-07 20:02:12 +1000
commitf4d399d40debd14b22967153294b94087cbcf789 (patch)
tree74adf7e935d48d2c90d3a9fdcee33169a230111d /include/net
parent785af0f385cd424d4b40908bf0e467df3dc05434 (diff)
CRED: Wrap most current->e?[ug]id and some task->e?[ug]id
Change most current->e?[ug]id to current_e?[ug]id(). Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more sense to use RCU directly rather than a convenient wrapper; these are addressed by a later patch (see the patch entitled "CRED: Use RCU to access another task's creds and to release a task's own creds"). Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/scm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/scm.h b/include/net/scm.h
index 06df126103ca..f160116db54a 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -54,8 +54,8 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
struct scm_cookie *scm)
{
struct task_struct *p = current;
- scm->creds.uid = p->uid;
- scm->creds.gid = p->gid;
+ scm->creds.uid = current_uid();
+ scm->creds.gid = current_gid();
scm->creds.pid = task_tgid_vnr(p);
scm->fp = NULL;
scm->seq = 0;