summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-08-07 20:02:11 +1000
committerJames Morris <jmorris@namei.org>2008-08-07 20:02:11 +1000
commit785af0f385cd424d4b40908bf0e467df3dc05434 (patch)
tree2cfcf5047af49ea1fda95715b79e51769cfd2ebb /net
parent471e6394d37cf3f32de0fb158d26038db5bf58ba (diff)
CRED: Change current->fs[ug]id to current_fs[ug]id()
Change current->fs[ug]id to current_fs[ug]id() so that fsgid and fsuid can be separated from the task_struct. 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 'net')
-rw-r--r--net/9p/client.c2
-rw-r--r--net/socket.c4
-rw-r--r--net/sunrpc/auth.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 2ffe40cf2f01..a5dfc17623be 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1049,7 +1049,7 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt)
fid->rdir_fpos = 0;
fid->rdir_pos = 0;
fid->rdir_fcall = NULL;
- fid->uid = current->fsuid;
+ fid->uid = current_fsuid();
fid->clnt = clnt;
fid->aux = NULL;
diff --git a/net/socket.c b/net/socket.c
index 8ef8ba81b9e2..1080f7a341bf 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -491,8 +491,8 @@ static struct socket *sock_alloc(void)
sock = SOCKET_I(inode);
inode->i_mode = S_IFSOCK | S_IRWXUGO;
- inode->i_uid = current->fsuid;
- inode->i_gid = current->fsgid;
+ inode->i_uid = current_fsuid();
+ inode->i_gid = current_fsgid();
get_cpu_var(sockets_in_use)++;
put_cpu_var(sockets_in_use);
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 6bfea9ed6869..9dd80626361c 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -351,8 +351,8 @@ struct rpc_cred *
rpcauth_lookupcred(struct rpc_auth *auth, int flags)
{
struct auth_cred acred = {
- .uid = current->fsuid,
- .gid = current->fsgid,
+ .uid = current_fsuid(),
+ .gid = current_fsgid(),
.group_info = current->group_info,
};
struct rpc_cred *ret;