summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-11-05 10:34:19 +0000
committerOlivier Blin <oblin@mandriva.org>2004-11-05 10:34:19 +0000
commit75934b664684403bd03279f3c416c803b703a942 (patch)
tree61936fa9e763d7b3aa33b6d9dd560fbeb29392d4 /perl-install/network
parent0a4397923c19fb7cdc240f2febdb61fbab289477 (diff)
downloaddrakx-75934b664684403bd03279f3c416c803b703a942.tar
drakx-75934b664684403bd03279f3c416c803b703a942.tar.gz
drakx-75934b664684403bd03279f3c416c803b703a942.tar.bz2
drakx-75934b664684403bd03279f3c416c803b703a942.tar.xz
drakx-75934b664684403bd03279f3c416c803b703a942.zip
hide ifcfg files for non-root users if they contain a WEP key (#12177)
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/network.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 53ea5d6f5..3a99c2f96 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -167,6 +167,8 @@ sub write_interface_conf {
if_($intf->{DEVICE} =~ /^ippp\d+$/, qw(DIAL_ON_IFUP))
);
substInFile { s/^DEVICE='(`.*`)'/DEVICE=$1/g } $file; #- remove quotes if DEVICE is the result of a command
+
+ chmod $intf->{WIRELESS_ENC_KEY} ? 0700 : 0755, $file; #- hide WEP key for non-root users
log::explanations("written $intf->{DEVICE} interface configuration in $file");
}