Skip to contentSkip to conversation

libxtables: Set proper name of application.

PATCH In review jamal 2 participants 5 messages Feb 12, 2009 netfilter

lore
Share & tools
lore

jamal

author
#0 lore raw

PATCH 1/1 libxtables: Set proper name of application.

commit 10b0261ab18d3f9a8beb541b6e93a4c72e483e39

Author: Jamal Hadi Salim <[email protected]>
Date:   Wed Feb 11 16:28:31 2009 -0500

Set proper name of application.
Thanks to Jan Engelhardt <[email protected]> for catching this.

include/ip6tables.h +1 -0
index 1956cf0..05a963e 100644
@@ -14,6 +14,7 @@
 #define ip6t_tryload		xt_tryload
 
 extern int line;
+extern struct xtables_globals ip6tables_globals;
 
 /* Your shared library should call one of these. */
 extern int do_command6(int argc, char *argv[], char **table,
include/iptables.h +1 -0
index f7ae0cc..5c48699 100644
@@ -14,6 +14,7 @@
 #define ipt_tryload		xt_tryload
 
 extern int line;
+extern struct xtables_globals iptables_globals;
 
 /* Your shared library should call one of these. */
 extern int do_command(int argc, char *argv[], char **table,
ip6tables-restore.c +1 -0
index acaf97b..3d535de 100644
@@ -133,6 +133,7 @@ int main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV6);
+	ip6tables_globals.program_name = "ip6tables-restore";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
ip6tables-save.c +1 -0
index 32b5992..3af81ab 100644
@@ -142,6 +142,7 @@ int main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV6);
+	ip6tables_globals.program_name = "ip6tables-save";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
ip6tables-standalone.c +1 -0
index cea4818..ab77065 100644
@@ -55,6 +55,7 @@ main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV6);
+	ip6tables_globals.program_name = "ip6tables";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
ip6tables.c +0 -0
index 9262b14..541c1a9 100644
@@ -149,7 +149,6 @@ void ip6tables_exit_error(enum xtables_exittype

status, const char *msg, ...) __
struct xtables_globals ip6tables_globals = {
.option_offset = 0,
.program_version = IPTABLES_VERSION,
- .program_name = "ip6tables",
.opts = original_opts,
.exit_err = ip6tables_exit_error,
};

iptables-restore.c +1 -0
index 810806f..0103016 100644
@@ -135,6 +135,7 @@ main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV4);
+	iptables_globals.program_name = "iptables-restore";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
iptables-save.c +1 -0
index c4306fd..396406f 100644
@@ -142,6 +142,7 @@ main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV4);
+	iptables_globals.program_name = "iptables-save";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
iptables-standalone.c +1 -0
index ece7cf4..007f2c2 100644
@@ -56,6 +56,7 @@ main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV4);
+	iptables_globals.program_name = "iptables";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
iptables.c +0 -0
index fe28e50..f8ccad7 100644
@@ -150,7 +150,6 @@ void iptables_exit_error(enum xtables_exittype

status, const char *msg, ...) __a
struct xtables_globals iptables_globals = {
.option_offset = 0,
.program_version = IPTABLES_VERSION,
- .program_name = "iptables",
.opts = original_opts,
.exit_err = iptables_exit_error,
};

author
#2 lore raw
Quoted 2 lines · Jan Engelhardt

If you cannot avoid the patch getting whitespace-mingled (as it did), please send it as attachment.

I just havent been able to do it with evolution. I will resend the 3 patches. I just saw the sync on Patrick's tree - so I may send an additional one if i managed to squeeze it in timewise else i will send it later today.

cheers,
jamal

author
#3 lore raw

PATCH 1/1 libxtables: Set proper name of application.

In reply to jamal

This is a resend.

cheers,
jamal

commit 10b0261ab18d3f9a8beb541b6e93a4c72e483e39

Author: Jamal Hadi Salim <[email protected]>
Date:   Wed Feb 11 16:28:31 2009 -0500

Set proper name of application.
Thanks to Jan Engelhardt <[email protected]> for catching this.

include/ip6tables.h +1 -0
index 1956cf0..05a963e 100644
@@ -14,6 +14,7 @@
 #define ip6t_tryload		xt_tryload
 
 extern int line;
+extern struct xtables_globals ip6tables_globals;
 
 /* Your shared library should call one of these. */
 extern int do_command6(int argc, char *argv[], char **table,
include/iptables.h +1 -0
index f7ae0cc..5c48699 100644
@@ -14,6 +14,7 @@
 #define ipt_tryload		xt_tryload
 
 extern int line;
+extern struct xtables_globals iptables_globals;
 
 /* Your shared library should call one of these. */
 extern int do_command(int argc, char *argv[], char **table,
ip6tables-restore.c +1 -0
index acaf97b..3d535de 100644
@@ -133,6 +133,7 @@ int main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV6);
+	ip6tables_globals.program_name = "ip6tables-restore";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
ip6tables-save.c +1 -0
index 32b5992..3af81ab 100644
@@ -142,6 +142,7 @@ int main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV6);
+	ip6tables_globals.program_name = "ip6tables-save";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
ip6tables-standalone.c +1 -0
index cea4818..ab77065 100644
@@ -55,6 +55,7 @@ main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV6);
+	ip6tables_globals.program_name = "ip6tables";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
ip6tables.c +0 -1
index 9262b14..541c1a9 100644
@@ -149,7 +149,6 @@ void ip6tables_exit_error(enum xtables_exittype status, const char *msg, ...) __
 struct xtables_globals ip6tables_globals = {
 	.option_offset = 0,
 	.program_version = IPTABLES_VERSION,
-	.program_name = "ip6tables",
 	.opts = original_opts,
 	.exit_err = ip6tables_exit_error,
 };
iptables-restore.c +1 -0
index 810806f..0103016 100644
@@ -135,6 +135,7 @@ main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV4);
+	iptables_globals.program_name = "iptables-restore";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
iptables-save.c +1 -0
index c4306fd..396406f 100644
@@ -142,6 +142,7 @@ main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV4);
+	iptables_globals.program_name = "iptables-save";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
iptables-standalone.c +1 -0
index ece7cf4..007f2c2 100644
@@ -56,6 +56,7 @@ main(int argc, char *argv[])
 	xtables_program_name = program_name;
 	xtables_init();
 	xtables_set_nfproto(NFPROTO_IPV4);
+	iptables_globals.program_name = "iptables";
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif
iptables.c +0 -1
index fe28e50..f8ccad7 100644
@@ -150,7 +150,6 @@ void iptables_exit_error(enum xtables_exittype status, const char *msg, ...) __a
 struct xtables_globals iptables_globals = {
 	.option_offset = 0,
 	.program_version = IPTABLES_VERSION,
-	.program_name = "iptables",
 	.opts = original_opts,
 	.exit_err = iptables_exit_error,
 };