summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-11-05 11:13:57 +0000
committerOlivier Blin <oblin@mandriva.org>2004-11-05 11:13:57 +0000
commitdadb979d986293437649ccf4b595ca3e1efe8589 (patch)
treecdaa31f1df78b54d302b9653e274fb95f8f06cdf
parenta26e6245600a6e247d567f6a1b6a549c392ffe9d (diff)
downloaddrakx-dadb979d986293437649ccf4b595ca3e1efe8589.tar
drakx-dadb979d986293437649ccf4b595ca3e1efe8589.tar.gz
drakx-dadb979d986293437649ccf4b595ca3e1efe8589.tar.bz2
drakx-dadb979d986293437649ccf4b595ca3e1efe8589.tar.xz
drakx-dadb979d986293437649ccf4b595ca3e1efe8589.zip
hide ifcfg files for non-root users if they contain a WEP key (#12177)
-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");
}