From 3782c0363f779072e73c4440862cd1ca563027bb Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 30 Oct 2003 12:29:36 +0000 Subject: fix anthill bug #50: ensure /etc/ppp/pap-secrets is not world readable since it contains password/user mapping for dialup --- perl-install/network/tools.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 993fe2c2a..59bd397ca 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -29,8 +29,10 @@ sub write_cnx_script { sub write_secret_backend { my ($a, $b) = @_; - foreach my $i ("pap-secrets", "chap-secrets") { - substInFile { s/^'$a'.*\n//; $_ .= "\n'$a' * '$b' * \n" if eof } "$prefix/etc/ppp/$i"; + foreach my $i ("$prefix/etc/ppp/pap-secrets", "$prefix/etc/ppp/chap-secrets") { + substInFile { s/^'$a'.*\n//; $_ .= "\n'$a' * '$b' * \n" if eof } $i; + #- restore access right to secrets file, just in case. + chmod 0600, $i; } } -- cgit v1.2.1