diff options
| author | James Wylder <jwylder@motorola.com> | 2014-02-28 11:34:56 -0600 |
|---|---|---|
| committer | James Wylder <jwylder@motorola.com> | 2014-03-05 17:46:16 -0600 |
| commit | 0b56745f5408ffc96e8bdbc8c8b85cac1db163b5 (patch) | |
| tree | a954b58aef312d4ede444953730389541498c3ec | |
| parent | c74090f8afeac95df81f318d5ddae3f1ecc53256 (diff) | |
| download | olio-linux-3.10-0b56745f5408ffc96e8bdbc8c8b85cac1db163b5.tar.xz olio-linux-3.10-0b56745f5408ffc96e8bdbc8c8b85cac1db163b5.zip | |
IKXCLOCK-380 AID_* to kguid_t mappings
Update references to AID_* definions to wrap the
corresponding uid type.
Signed-off-by: James Wylder <jwylder@motorola.com>
| -rw-r--r-- | fs/proc/base.c | 4 | ||||
| -rw-r--r-- | net/ipv4/af_inet.c | 3 | ||||
| -rw-r--r-- | net/ipv6/af_inet6.c | 3 | ||||
| -rw-r--r-- | security/commoncap.c | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 2d00fdde934..8051324d187 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1013,7 +1013,7 @@ static int oom_adjust_permission(struct inode *inode, int mask) p = get_proc_task(inode); if(p) { - uid = task_uid(p); + uid = __kuid_val(task_uid(p)); put_task_struct(p); } @@ -1021,7 +1021,7 @@ static int oom_adjust_permission(struct inode *inode, int mask) * System Server (uid == 1000) is granted access to oom_adj of all * android applications (uid > 10000) as and services (uid >= 1000) */ - if (p && (current_fsuid() == 1000) && (uid >= 1000)) { + if (p && (__kuid_val(current_fsuid()) == 1000) && (uid >= 1000)) { if (inode->i_mode >> 6 & mask) { return 0; } diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 109017e8226..19edfcdaf3e 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -124,7 +124,8 @@ static inline int current_has_network(void) { - return in_egroup_p(AID_INET) || capable(CAP_NET_RAW); + return in_egroup_p(KGIDT_INIT(AID_INET)) || + capable(CAP_NET_RAW); } #else static inline int current_has_network(void) diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index a4cfde67fcb..f0081f9cc84 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -68,7 +68,8 @@ static inline int current_has_network(void) { - return in_egroup_p(AID_INET) || capable(CAP_NET_RAW); + return in_egroup_p(KGIDT_INIT(AID_INET)) || + capable(CAP_NET_RAW); } #else static inline int current_has_network(void) diff --git a/security/commoncap.c b/security/commoncap.c index 5870fdc224b..205921a9748 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -83,9 +83,9 @@ int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, struct user_namespace *ns = targ_ns; #ifdef CONFIG_ANDROID_PARANOID_NETWORK - if (cap == CAP_NET_RAW && in_egroup_p(AID_NET_RAW)) + if (cap == CAP_NET_RAW && in_egroup_p(KGIDT_INIT(AID_NET_RAW))) return 0; - if (cap == CAP_NET_ADMIN && in_egroup_p(AID_NET_ADMIN)) + if (cap == CAP_NET_ADMIN && in_egroup_p(KGIDT_INIT(AID_NET_ADMIN))) return 0; #endif |