From 375fcd7fc379f0277d1e918224cd5b7692f849d5 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 30 Oct 2003 12:30:22 +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(-) (limited to 'perl-install/network') diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 6f9a1ff52..c330ff948 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