Permalink
Browse files

unbreak USER_NS build

Change-Id: I3436c09e726a2a401b3ad98b53d29292196c1b54
  • Loading branch information...
1 parent c842abb commit aa4ba07269ece18ebfaf1febbd78f395fdf40d7a @mdrjr mdrjr committed Sep 16, 2014
Showing with 1 addition and 447 deletions.
  1. +1 −30 fs/proc/base.c
  2. +0 −18 kernel/sched/core.c
  3. +0 −12 net/netfilter/Kconfig
  4. +0 −2 net/netfilter/Makefile
  5. +0 −385 net/netfilter/xt_quota2.c
View
@@ -1006,35 +1006,6 @@ static ssize_t oom_adj_write(struct file *file, const char __user *buf,
return err < 0 ? err : count; return err < 0 ? err : count;
} }
-static int oom_adjust_permission(struct inode *inode, int mask)
-{
- uid_t uid;
- struct task_struct *p;
-
- p = get_proc_task(inode);
- if(p) {
- uid = task_uid(p);
- put_task_struct(p);
- }
-
- /*
- * 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 (inode->i_mode >> 6 & mask) {
- return 0;
- }
- }
-
- /* Fall back to default. */
- return generic_permission(inode, mask);
-}
-
-static const struct inode_operations proc_oom_adj_inode_operations = {
- .permission = oom_adjust_permission,
-};
-
static const struct file_operations proc_oom_adj_operations = { static const struct file_operations proc_oom_adj_operations = {
.read = oom_adj_read, .read = oom_adj_read,
.write = oom_adj_write, .write = oom_adj_write,
@@ -2733,7 +2704,7 @@ static const struct pid_entry tgid_base_stuff[] = {
REG("cgroup", S_IRUGO, proc_cgroup_operations), REG("cgroup", S_IRUGO, proc_cgroup_operations),
#endif #endif
INF("oom_score", S_IRUGO, proc_oom_score), INF("oom_score", S_IRUGO, proc_oom_score),
- ANDROID("oom_adj", S_IRUGO|S_IWUSR, oom_adj), + REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations),
REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations), REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
#ifdef CONFIG_AUDITSYSCALL #ifdef CONFIG_AUDITSYSCALL
REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations), REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
View
@@ -7758,23 +7758,6 @@ static void cpu_cgroup_css_offline(struct cgroup *cgrp)
sched_offline_group(tg); sched_offline_group(tg);
} }
-static int
-cpu_cgroup_allow_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
-{
- const struct cred *cred = current_cred(), *tcred;
- struct task_struct *task;
-
- cgroup_taskset_for_each(task, cgrp, tset) {
- tcred = __task_cred(task);
-
- if ((current != task) && !capable(CAP_SYS_NICE) &&
- cred->euid != tcred->uid && cred->euid != tcred->suid)
- return -EACCES;
- }
-
- return 0;
-}
-
static int cpu_cgroup_can_attach(struct cgroup *cgrp, static int cpu_cgroup_can_attach(struct cgroup *cgrp,
struct cgroup_taskset *tset) struct cgroup_taskset *tset)
{ {
@@ -8141,7 +8124,6 @@ struct cgroup_subsys cpu_cgroup_subsys = {
.css_offline = cpu_cgroup_css_offline, .css_offline = cpu_cgroup_css_offline,
.can_attach = cpu_cgroup_can_attach, .can_attach = cpu_cgroup_can_attach,
.attach = cpu_cgroup_attach, .attach = cpu_cgroup_attach,
- .allow_attach = cpu_cgroup_allow_attach,
.exit = cpu_cgroup_exit, .exit = cpu_cgroup_exit,
.subsys_id = cpu_cgroup_subsys_id, .subsys_id = cpu_cgroup_subsys_id,
.base_cftypes = cpu_files, .base_cftypes = cpu_files,
View
@@ -1150,18 +1150,6 @@ config NETFILTER_XT_MATCH_QUOTA
If you want to compile it as a module, say M here and read If you want to compile it as a module, say M here and read
<file:Documentation/kbuild/modules.txt>. If unsure, say `N'. <file:Documentation/kbuild/modules.txt>. If unsure, say `N'.
-config NETFILTER_XT_MATCH_QUOTA2
- tristate '"quota2" match support'
- depends on NETFILTER_ADVANCED
- help
- This option adds a `quota2' match, which allows to match on a
- byte counter correctly and not per CPU.
- It allows naming the quotas.
- This is based on http://xtables-addons.git.sourceforge.net
-
- If you want to compile it as a module, say M here and read
- <file:Documentation/kbuild/modules.txt>. If unsure, say `N'.
-
config NETFILTER_XT_MATCH_QUOTA2_LOG config NETFILTER_XT_MATCH_QUOTA2_LOG
bool '"quota2" Netfilter LOG support' bool '"quota2" Netfilter LOG support'
depends on NETFILTER_XT_MATCH_QUOTA2 depends on NETFILTER_XT_MATCH_QUOTA2
View
@@ -127,9 +127,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_OWNER) += xt_owner.o
obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o
obj-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype.o obj-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype.o
obj-$(CONFIG_NETFILTER_XT_MATCH_POLICY) += xt_policy.o obj-$(CONFIG_NETFILTER_XT_MATCH_POLICY) += xt_policy.o
-obj-$(CONFIG_NETFILTER_XT_MATCH_QTAGUID) += xt_qtaguid_print.o xt_qtaguid.o
obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA) += xt_quota.o obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA) += xt_quota.o
-obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA2) += xt_quota2.o
obj-$(CONFIG_NETFILTER_XT_MATCH_RATEEST) += xt_rateest.o obj-$(CONFIG_NETFILTER_XT_MATCH_RATEEST) += xt_rateest.o
obj-$(CONFIG_NETFILTER_XT_MATCH_REALM) += xt_realm.o obj-$(CONFIG_NETFILTER_XT_MATCH_REALM) += xt_realm.o
obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT) += xt_recent.o obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT) += xt_recent.o
Oops, something went wrong.

0 comments on commit aa4ba07

Please sign in to comment.