Fixed with this upload:
system-tools-backends (1.9.7-0ubuntu3) edgy; urgency=low . * debian/patches/01_chmod_network_interfaces_when_using_key.patch: - change network interfaces file mode to 640 and the group to "admin" when a key is set (Ubuntu: #14392)
The patch used:
diff -Nur system-tools-backends-1.9.7/Network/Ifaces.pm system-tools-backends-1.9.7.new/Network/Ifaces.pm --- system-tools-backends-1.9.7/Network/Ifaces.pm 2006-10-06 00:16:51.000000000 +0200 +++ system-tools-backends-1.9.7.new/Network/Ifaces.pm 2006-10-11 12:28:42.000000000 +0200 @@ -693,6 +693,17 @@ return (&get_debian_auto_by_stanza ($file, $iface) ne undef)? 1 : 0; }
+sub set_network_config_permission +{ + my ($key) = @_; + + if ($key) + { + chmod 0640, "/etc/network/interfaces"; + &Utils::File::run ("chgrp admin /etc/network/interfaces"); + } +} + sub set_debian_auto { my ($file, $iface, $value) = @_; @@ -3099,6 +3110,7 @@ [ "gateway", \&Utils::Replace::set_interfaces_option_str, [INTERFACES, IFACE], "gateway" ], [ "essid", \&Utils::Replace::set_interfaces_option_str, [INTERFACES, IFACE], "wireless-essid" ], [ "key", \&Utils::Replace::set_interfaces_option_str, [INTERFACES, IFACE], "wireless-key" ], + [ "key", \&set_network_config_permission, "%key%"], [ "key_type", \&set_wep_key_full, [ \&Utils::Replace::set_interfaces_option_str, INTERFACES, IFACE, "wireless-key", "%key%" ]], # ugly hack for deleting undesired options (due to syntax duality) [ "essid", \&Utils::Replace::set_interfaces_option_str, [INTERFACES, IFACE], "wireless_essid", "" ],
Fixed with this upload:
system- tools-backends (1.9.7-0ubuntu3) edgy; urgency=low patches/ 01_chmod_ network_ interfaces_ when_using_ key.patch:
.
* debian/
- change network interfaces file mode to 640 and the group to "admin"
when a key is set (Ubuntu: #14392)
The patch used:
diff -Nur system- tools-backends- 1.9.7/Network/ Ifaces. pm system- tools-backends- 1.9.7.new/ Network/ Ifaces. pm tools-backends- 1.9.7/Network/ Ifaces. pm 2006-10-06 00:16:51.000000000 +0200 tools-backends- 1.9.7.new/ Network/ Ifaces. pm 2006-10-11 12:28:42.000000000 +0200 auto_by_ stanza ($file, $iface) ne undef)? 1 : 0;
--- system-
+++ system-
@@ -693,6 +693,17 @@
return (&get_debian_
}
+sub set_network_ config_ permission interfaces" ; interfaces" ); :Replace: :set_interfaces _option_ str, [INTERFACES, IFACE], "gateway" ], :Replace: :set_interfaces _option_ str, [INTERFACES, IFACE], "wireless-essid" ], :Replace: :set_interfaces _option_ str, [INTERFACES, IFACE], "wireless-key" ], config_ permission, "%key%"], :Replace: :set_interfaces _option_ str, INTERFACES, IFACE, "wireless-key", "%key%" ]], :Replace: :set_interfaces _option_ str, [INTERFACES, IFACE], "wireless_essid", "" ],
+{
+ my ($key) = @_;
+
+ if ($key)
+ {
+ chmod 0640, "/etc/network/
+ &Utils::File::run ("chgrp admin /etc/network/
+ }
+}
+
sub set_debian_auto
{
my ($file, $iface, $value) = @_;
@@ -3099,6 +3110,7 @@
[ "gateway", \&Utils:
[ "essid", \&Utils:
[ "key", \&Utils:
+ [ "key", \&set_network_
[ "key_type", \&set_wep_key_full, [ \&Utils:
# ugly hack for deleting undesired options (due to syntax duality)
[ "essid", \&Utils: