diff options
author | David Howells <dhowells@redhat.com> | 2008-11-13 18:39:25 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-13 18:39:25 -0500 |
commit | d76b0d9b2d87cfc95686e148767cbf7d0e22bdc0 (patch) | |
tree | 1a2956614018d245facb256ffb8662568cdabcd4 /net/sched/cls_flow.c | |
parent | 1d045980e1eff4800472f0e81df9460640c8eee9 (diff) |
CRED: Use creds in file structs
Attach creds to file structs and discard f_uid/f_gid.
file_operations::open() methods (such as hppfs_open()) should use file->f_cred
rather than current_cred(). At the moment file->f_cred will be current_cred()
at this point.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'net/sched/cls_flow.c')
-rw-r--r-- | net/sched/cls_flow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 0ebaff637e31..0ef4e3065bcd 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c | |||
@@ -260,14 +260,14 @@ static u32 flow_get_rtclassid(const struct sk_buff *skb) | |||
260 | static u32 flow_get_skuid(const struct sk_buff *skb) | 260 | static u32 flow_get_skuid(const struct sk_buff *skb) |
261 | { | 261 | { |
262 | if (skb->sk && skb->sk->sk_socket && skb->sk->sk_socket->file) | 262 | if (skb->sk && skb->sk->sk_socket && skb->sk->sk_socket->file) |
263 | return skb->sk->sk_socket->file->f_uid; | 263 | return skb->sk->sk_socket->file->f_cred->fsuid; |
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
267 | static u32 flow_get_skgid(const struct sk_buff *skb) | 267 | static u32 flow_get_skgid(const struct sk_buff *skb) |
268 | { | 268 | { |
269 | if (skb->sk && skb->sk->sk_socket && skb->sk->sk_socket->file) | 269 | if (skb->sk && skb->sk->sk_socket && skb->sk->sk_socket->file) |
270 | return skb->sk->sk_socket->file->f_gid; | 270 | return skb->sk->sk_socket->file->f_cred->fsgid; |
271 | return 0; | 271 | return 0; |
272 | } | 272 | } |
273 | 273 | ||