2 ===================================================================
3 RCS file: /cvsroot/pptpclient/pptp-linux/pptpsetup,v
4 retrieving revision 1.4
5 diff -u -r1.4 pptpsetup
6 --- a/pptpsetup 2 Aug 2006 07:02:47 -0000 1.4
7 +++ b/pptpsetup 25 Mar 2009 13:41:37 -0000
10 # delete entry from chap-secrets
11 my $chap_file = '/etc/ppp/chap-secrets';
12 + my $mode = (stat($chap_file))[2] & 07777;
14 open( FILE, $chap_file )
15 or die "$0: can't read '$chap_file': $!\n";
17 # write new chap-secrets
18 open( FILE, ">$chap_file" )
19 or die "$0: can't write '$chap_file': $!\n";
20 + chmod $mode, $chap_file;