diff options
author | Xin LI <delphij@FreeBSD.org> | 2016-12-22 16:19:05 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2016-12-22 16:19:05 +0000 |
commit | b06b7e647fe7b4eefbd29369cf0c24e1902bf72a (patch) | |
tree | d18590df36faea870c6827c64a75516475938e4d /contrib/ntp/scripts/build/genAuthors.in | |
parent | 8c7ff71d356bdceffa6cd5b5017c65d0d63d9abc (diff) | |
download | src-b06b7e647fe7b4eefbd29369cf0c24e1902bf72a.tar.gz src-b06b7e647fe7b4eefbd29369cf0c24e1902bf72a.zip |
Fix multiple vulnerabilities of ntp.releng/9.3
Approved by: so
Notes
Notes:
svn path=/releng/9.3/; revision=310419
Diffstat (limited to 'contrib/ntp/scripts/build/genAuthors.in')
-rw-r--r-- | contrib/ntp/scripts/build/genAuthors.in | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/ntp/scripts/build/genAuthors.in b/contrib/ntp/scripts/build/genAuthors.in index f0e49c587e7c..a5a15e1270b0 100644 --- a/contrib/ntp/scripts/build/genAuthors.in +++ b/contrib/ntp/scripts/build/genAuthors.in @@ -34,21 +34,23 @@ use warnings; my $bk_u = "bk changes -and:USER: | sort -u |"; chomp(my $bk_root = `bk root`); -my $A_path = "$bk_root/BitKeeper/etc/authors.txt"; +my $A_dir = "$bk_root/BitKeeper/etc/Authors"; +my $A_file = "$bk_root/BitKeeper/etc/authors.txt"; my %authors; my $problem = 0; -die "bkroot: <$bk_root>, A_path: <$A_path>\n" if (! -r $A_path); +die "bkroot: <$bk_root>, A_dir: <$A_dir>\n" if (! -r $A_dir); +die "bkroot: <$bk_root>, A_file: <$A_file>\n" if (! -r $A_file); # Process the authors.txt file -open(my $FILE, '<', $A_path) or die "Could not open <$A_path>: $!\n"; +open(my $FILE, '<', $A_file) or die "Could not open <$A_file>: $!\n"; while (<$FILE>) { chomp; if (/^([\S]+) = ([\V]+) <([\w.-]+\@[\w.-]+)>$/) { # print "Got '$1 = $2 <$3>'\n"; $authors{$1} = ""; } else { - print "In $A_path: unrecognized line: '$_'\n"; + print "In $A_file: unrecognized line: '$_'\n"; $problem = 1; } } @@ -69,7 +71,7 @@ while (<BKU>) { if (!defined($authors{$Name})) { $problem = 1; print "<$Name> is not a defined author!\n"; - open(my $FILE, '>>', "$A_path/$name.txt") || die "Cannot create '$A_path/$name.txt': $!\n"; + open(my $FILE, '>>', "$A_dir/$name.txt") || die "Cannot create '$A_dir/$name.txt': $!\n"; print $FILE "$Name = \n"; close($FILE); } |