mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 05:34:58 +02:00
extensions: resolve compile error when CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
xt_DNETMAP.c: In function "dnetmap_tg_check": xt_DNETMAP.c:331:16: error: incompatible types when assigning to type "kuid_t" from type "unsigned int" xt_DNETMAP.c:332:16: error: incompatible types when assigning to type "kgid_t" from type "unsigned int" xt_DNETMAP.c:344:16: error: incompatible types when assigning to type "kuid_t" from type "unsigned int" xt_DNETMAP.c:345:16: error: incompatible types when assigning to type "kgid_t" from type "unsigned int" xt_condition.c: In function "condition_mt_check": xt_condition.c:158:24: error: incompatible types when assigning to type "kuid_t" from type "unsigned int" xt_condition.c:159:24: error: incompatible types when assigning to type "kgid_t" from type "unsigned int" xt_quota2.c: In function "q2_get_counter": xt_quota2.c:134:18: error: incompatible types when assigning to type "kuid_t" from type "unsigned int" xt_quota2.c:135:18: error: incompatible types when assigning to type "kgid_t" from type "unsigned int"
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
HEAD
|
HEAD
|
||||||
====
|
====
|
||||||
Fixes:
|
Fixes:
|
||||||
|
- xt_DNETMAP, xt_condition, xt_quota2: resolve compile error when
|
||||||
|
CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
|
||||||
- xt_RAWNAT: ensure correct operation in the presence of IPv4 options
|
- xt_RAWNAT: ensure correct operation in the presence of IPv4 options
|
||||||
- xt_geoip: do not throw a warnings when country database is size 0
|
- xt_geoip: do not throw a warnings when country database is size 0
|
||||||
- xt_quota2: print "!" at the correct position during iptables-save
|
- xt_quota2: print "!" at the correct position during iptables-save
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
#include <linux/netfilter.h>
|
#include <linux/netfilter.h>
|
||||||
#include <linux/netfilter_ipv4.h>
|
#include <linux/netfilter_ipv4.h>
|
||||||
#include <linux/netfilter/x_tables.h>
|
#include <linux/netfilter/x_tables.h>
|
||||||
|
#include <linux/uidgid.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <net/net_namespace.h>
|
#include <net/net_namespace.h>
|
||||||
#include <net/netns/generic.h>
|
#include <net/netns/generic.h>
|
||||||
@@ -328,8 +329,8 @@ static int dnetmap_tg_check(const struct xt_tgchk_param *par)
|
|||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
pde_data->uid = proc_uid;
|
pde_data->uid = make_kuid(&init_user_ns, proc_uid);
|
||||||
pde_data->gid = proc_gid;
|
pde_data->gid = make_kgid(&init_user_ns, proc_gid);
|
||||||
|
|
||||||
/* statistics */
|
/* statistics */
|
||||||
pde_stat = create_proc_entry(p->proc_str_stat, proc_perms,
|
pde_stat = create_proc_entry(p->proc_str_stat, proc_perms,
|
||||||
@@ -341,8 +342,8 @@ static int dnetmap_tg_check(const struct xt_tgchk_param *par)
|
|||||||
}
|
}
|
||||||
pde_stat->data = p;
|
pde_stat->data = p;
|
||||||
pde_stat->read_proc = dnetmap_stat_proc_read;
|
pde_stat->read_proc = dnetmap_stat_proc_read;
|
||||||
pde_stat->uid = proc_uid;
|
pde_stat->uid = make_kuid(&init_user_ns, proc_uid);
|
||||||
pde_stat->gid = proc_gid;
|
pde_stat->gid = make_kgid(&init_user_ns, proc_gid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
spin_lock_bh(&dnetmap_lock);
|
spin_lock_bh(&dnetmap_lock);
|
||||||
|
@@ -155,8 +155,8 @@ static int condition_mt_check(const struct xt_mtchk_param *par)
|
|||||||
var->status_proc->read_proc = condition_proc_read;
|
var->status_proc->read_proc = condition_proc_read;
|
||||||
var->status_proc->write_proc = condition_proc_write;
|
var->status_proc->write_proc = condition_proc_write;
|
||||||
list_add(&var->list, &conditions_list);
|
list_add(&var->list, &conditions_list);
|
||||||
var->status_proc->uid = condition_uid_perms;
|
var->status_proc->uid = make_kuid(&init_user_ns, condition_uid_perms);
|
||||||
var->status_proc->gid = condition_gid_perms;
|
var->status_proc->gid = make_kgid(&init_user_ns, condition_gid_perms);
|
||||||
mutex_unlock(&proc_lock);
|
mutex_unlock(&proc_lock);
|
||||||
info->condvar = var;
|
info->condvar = var;
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <linux/proc_fs.h>
|
#include <linux/proc_fs.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
|
#include <linux/uidgid.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <asm/atomic.h>
|
#include <asm/atomic.h>
|
||||||
|
|
||||||
@@ -131,8 +132,8 @@ q2_get_counter(const struct xt_quota_mtinfo2 *q)
|
|||||||
p->data = e;
|
p->data = e;
|
||||||
p->read_proc = quota_proc_read;
|
p->read_proc = quota_proc_read;
|
||||||
p->write_proc = quota_proc_write;
|
p->write_proc = quota_proc_write;
|
||||||
p->uid = quota_list_uid;
|
p->uid = make_kuid(&init_user_ns, quota_list_uid);
|
||||||
p->gid = quota_list_gid;
|
p->gid = make_kgid(&init_user_ns, quota_list_gid);
|
||||||
list_add_tail(&e->list, &counter_list);
|
list_add_tail(&e->list, &counter_list);
|
||||||
spin_unlock_bh(&counter_list_lock);
|
spin_unlock_bh(&counter_list_lock);
|
||||||
return e;
|
return e;
|
||||||
|
Reference in New Issue
Block a user