mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 05:05:12 +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:
@@ -26,6 +26,7 @@
|
||||
#include <linux/netfilter.h>
|
||||
#include <linux/netfilter_ipv4.h>
|
||||
#include <linux/netfilter/x_tables.h>
|
||||
#include <linux/uidgid.h>
|
||||
#include <linux/version.h>
|
||||
#include <net/net_namespace.h>
|
||||
#include <net/netns/generic.h>
|
||||
@@ -328,8 +329,8 @@ static int dnetmap_tg_check(const struct xt_tgchk_param *par)
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
pde_data->uid = proc_uid;
|
||||
pde_data->gid = proc_gid;
|
||||
pde_data->uid = make_kuid(&init_user_ns, proc_uid);
|
||||
pde_data->gid = make_kgid(&init_user_ns, proc_gid);
|
||||
|
||||
/* statistics */
|
||||
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->read_proc = dnetmap_stat_proc_read;
|
||||
pde_stat->uid = proc_uid;
|
||||
pde_stat->gid = proc_gid;
|
||||
pde_stat->uid = make_kuid(&init_user_ns, proc_uid);
|
||||
pde_stat->gid = make_kgid(&init_user_ns, proc_gid);
|
||||
#endif
|
||||
|
||||
spin_lock_bh(&dnetmap_lock);
|
||||
|
Reference in New Issue
Block a user