]> ruderich.org/simon Gitweb - blhc/blhc.git/blob - bin/blhc
Ignore compiler when used as file suffixes.
[blhc/blhc.git] / bin / blhc
1 #!/usr/bin/perl
2
3 # Build log hardening check, checks build logs for missing hardening flags.
4
5 # Copyright (C) 2012  Simon Ruderich
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20
21 use strict;
22 use warnings;
23
24 use Getopt::Long ();
25 use Term::ANSIColor ();
26 use Text::ParseWords ();
27
28 our $VERSION = '0.01';
29
30
31 # CONSTANTS/VARIABLES
32
33 # Regex to catch compiler commands.
34 my $cc_regex = qr/(?:[a-z0-9_]+-(?:linux-|kfreebsd-)?gnu(?:eabi|eabihf)?-)?
35                   (?<!\.)(?:cc|gcc|g\+\+|c\+\+)
36                   (?:-[\d.]+)?/x;
37 # Regex to catch (GCC) compiler warnings.
38 my $warning_regex = qr/^(.+?):([0-9]+):[0-9]+: warning: (.+?) \[(.+?)\]$/;
39
40 # Regex for source files which require preprocessing.
41 my $source_preprocess_compile_regex = qr/
42     # C
43       c
44     # Objective-C
45     | m
46     # C++
47     | cc | cp | cxx | cpp | CPP | c\+\+ | C
48     # Objective-C++
49     | mm | M
50     # Fortran
51     | F | FOR | fpp | FPP | FTN | F90 | F95 | F03 | F08
52     /x;
53 my $source_preprocess_no_compile_regex = qr/
54     # Assembly
55       s
56     /x;
57 my $source_preprocess_regex = qr/
58       $source_preprocess_compile_regex
59     | $source_preprocess_no_compile_regex
60     /x;
61 # Regex for source files which don't require preprocessing.
62 my $source_no_preprocess_compile_regex = qr/
63     # C
64       i
65     # C++
66     | ii
67     # Objective-C
68     | mi
69     # Objective-C++
70     | mii
71     # Fortran
72     | f | for | ftn | f90 | f95 | f03 | f08
73     /x;
74 my $source_no_preprocess_no_compile_regex = qr/
75     # Assembly
76       S | sx
77     /x;
78 my $source_no_preprocess_regex = qr/
79       $source_no_preprocess_compile_regex
80     | $source_no_preprocess_no_compile_regex
81     /x;
82 # Regex for header files which require preprocessing.
83 my $header_preprocess_regex = qr/
84     # C, C++, Objective-C, Objective-C++
85       h
86     # C++
87     | hh | H | hp | hxx | hpp | HPP | h\+\+ | tcc
88     /x;
89 # Regexps to match files with the given characteristics.
90 my $file_no_preprocess_regex = qr/
91     $cc_regex.+?
92     \.(?: $source_no_preprocess_regex)\b
93     /x;
94 my $file_preprocess_regex = qr/
95     $cc_regex.+?
96     \.(?: $header_preprocess_regex
97         | $source_preprocess_regex)\b
98     /x;
99 my $file_compile_link_regex = qr/
100     $cc_regex.+?
101     \.(?: $source_preprocess_regex
102         | $source_no_preprocess_regex)\b
103     /x;
104 my $file_compile_regex = qr/
105     $cc_regex.+?
106     \.(?: $source_preprocess_compile_regex
107         | $source_no_preprocess_compile_regex)\b
108     /x;
109 my $file_no_compile_regex = qr/
110     $cc_regex.+
111     \.(?: $source_preprocess_no_compile_regex
112         | $source_no_preprocess_no_compile_regex)\b
113     /x;
114
115 # Expected (hardening) flags. All flags are used as regexps.
116 my @cflags = (
117     '-g',
118     '-O(?:2|3)',
119 );
120 my @cflags_format = (
121     '-Wformat',
122     '-Wformat-security',
123     '-Werror=format-security',
124 );
125 my @cflags_fortify = (
126     # fortify needs at least -O1, but -O2 is recommended anyway
127 );
128 my @cflags_stack = (
129     '-fstack-protector',
130     '--param=ssp-buffer-size=4',
131 );
132 my @cflags_pie = (
133     '-fPIE',
134 );
135 my @cppflags = ();
136 my @cppflags_fortify = (
137     '-D_FORTIFY_SOURCE=2',
138 );
139 my @ldflags = ();
140 my @ldflags_relro = (
141     '-Wl,(-z,)?relro',
142 );
143 my @ldflags_bindnow = (
144     '-Wl,(-z,)?now',
145 );
146 my @ldflags_pie = (
147     '-fPIE',
148     '-pie',
149 );
150 # Renaming rules for the output so the regex parts are not visible.
151 my %flag_renames = (
152     '-O(?:2|3)'       => '-O2',
153     '-Wl,(-z,)?relro' => '-Wl,-z,relro',
154     '-Wl,(-z,)?now'   => '-Wl,-z,now',
155 );
156
157
158 # FUNCTIONS
159
160 sub error_flags {
161     my ($message, $missing_flags_ref, $flag_renames_ref, $line) = @_;
162
163     # Rename flags if requested.
164     my @missing_flags = map {
165         (exists $flag_renames_ref->{$_})
166             ? $flag_renames_ref->{$_}
167             : $_
168     } @{$missing_flags_ref};
169
170     my $flags = join ' ', @missing_flags;
171     printf "%s (%s)%s %s",
172            error_color($message, 'red'), $flags, error_color(':', 'yellow'),
173            $line;
174 }
175 sub error_non_verbose_build {
176     my ($line) = @_;
177
178     printf "%s%s %s",
179            error_color('NONVERBOSE BUILD', 'red'),
180            error_color(':', 'yellow'),
181            $line;
182 }
183 sub error_hardening_wrapper {
184     printf "%s%s %s\n",
185             error_color('HARDENING WRAPPER', 'red'),
186             error_color(':', 'yellow'),
187             'no checks possible, aborting';
188 }
189 sub error_color {
190     my ($message, $color) = @_;
191
192     # Use colors when writing to a terminal.
193     if (-t STDOUT) {
194         return Term::ANSIColor::colored($message, $color);
195     } else {
196         return $message;
197     }
198 }
199
200 sub any_flags_used {
201     my ($line, @flags) = @_;
202
203     foreach my $flag (@flags) {
204         return 1 if $line =~ /\s$flag(?:\s|\\)/;
205     }
206
207     return 0;
208 }
209 sub all_flags_used {
210     my ($line, $missing_flags_ref, @flags) = @_;
211
212     my @missing_flags = ();
213     foreach my $flag (@flags) {
214         if ($line !~ /\s$flag(?:\s|\\)/) {
215             push @missing_flags, $flag;
216         }
217     }
218
219     return 1 if scalar @missing_flags == 0;
220
221     @{$missing_flags_ref} = @missing_flags;
222     return 0;
223 }
224
225 # Modifies $missing_flags_ref array.
226 sub pic_pie_conflict {
227     my ($line, $pie, $missing_flags_ref, @flags_pie) = @_;
228
229     return 0 if not $pie;
230     return 0 if not any_flags_used($line, ('-fPIC', '-fpic'));
231
232     my %flags = map { $_ => 1 } @flags_pie;
233
234     # Remove all PIE flags from @missing_flags as they are not required with
235     # -fPIC.
236     my @result = grep {
237         not exists $flags{$_}
238     } @{$missing_flags_ref};
239     @{$missing_flags_ref} = @result;
240
241     # We got a conflict when no flags are left, thus only PIE flags were
242     # missing. If other flags were missing abort because the conflict is not
243     # the problem.
244     return scalar @result == 0;
245 }
246
247 sub is_non_verbose_build {
248     my ($line, $next_line, $skip_ref) = @_;
249
250     if (not ($line =~ /^checking if you want to see long compiling messages\.\.\. no/
251                 or $line =~ /^\s*\[?(?:CC|CCLD|CXX|CXXLD|LD|LINK)\]?\s+(.+?)$/
252                 or $line =~ /^\s*(?:C|c)ompiling\s+(.+?)(?:\.\.\.)?$/
253                 or $line =~ /^\s*(?:B|b)uilding (?:program|shared library)\s+(.+?)$/
254                 or $line =~ /^\s*\[[\d ]+%\] Building (?:C|CXX) object (.+?)$/)) {
255         return 0;
256     }
257
258     my $file = $1;
259
260     # On the first pass we only check if this line is verbose or not.
261     return 1 if not defined $next_line;
262
263     # Second pass, we have access to the next line.
264     ${$skip_ref} = 0;
265
266     # CMake and other build systems print the non-verbose messages also when
267     # building verbose. If a compiler and the file name occurs in the next
268     # line, treat it as verbose build.
269     if (defined $file) {
270         # Get filename, we can't use the complete path as only parts of it are
271         # used in the real compiler command.
272         $file =~ m{/([a-zA-Z0-9._-]+)$};
273         $file = $1;
274
275         if ($next_line =~ /\Q$file\E/ and $next_line =~ /$cc_regex/) {
276             # We still have to skip the current line as it doesn't contain any
277             # compiler commands.
278             ${$skip_ref} = 1;
279             return 0;
280         }
281     }
282
283     return 1;
284 }
285
286
287 # MAIN
288
289 # Hardening options. Not all architectures support all hardening options.
290 my $harden_format  = 1;
291 my $harden_fortify = 1;
292 my $harden_stack   = 1;
293 my $harden_relro   = 1;
294 my $harden_bindnow = 0;
295 my $harden_pie     = 0;
296
297 # Parse command line arguments.
298 my $option_help    = 0;
299 my $option_version = 0;
300 my $option_all     = 0;
301 my $option_arch    = undef;
302 my $option_buildd  = 0;
303 if (not Getopt::Long::GetOptions(
304             'help|h|?' => \$option_help,
305             'version'  => \$option_version,
306             # Hardening options.
307             'pie'      => \$harden_pie,
308             'bindnow'  => \$harden_bindnow,
309             'all'      => \$option_all,
310             # Misc.
311             'arch'     => \$option_arch,
312             'buildd'   => \$option_buildd,
313         )) {
314     require Pod::Usage;
315     Pod::Usage::pod2usage(2);
316 }
317 if ($option_help) {
318     require Pod::Usage;
319     Pod::Usage::pod2usage(1);
320 }
321 if ($option_version) {
322     print "blhc $VERSION  Copyright (C) 2012  Simon Ruderich
323
324 This program is free software: you can redistribute it and/or modify
325 it under the terms of the GNU General Public License as published by
326 the Free Software Foundation, either version 3 of the License, or
327 (at your option) any later version.
328
329 This program is distributed in the hope that it will be useful,
330 but WITHOUT ANY WARRANTY; without even the implied warranty of
331 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
332 GNU General Public License for more details.
333
334 You should have received a copy of the GNU General Public License
335 along with this program.  If not, see <http://www.gnu.org/licenses/>.
336 ";
337     exit 0;
338 }
339
340 if ($option_all) {
341     $harden_pie     = 1;
342     $harden_bindnow = 1;
343 }
344
345 # Final exit code.
346 my $exit = 0;
347
348 # Input lines, contain only the lines with compiler commands.
349 my @input = ();
350
351 my $start = 0;
352 my $continuation = 0;
353 my $complete_line = undef;
354 while (my $line = <>) {
355     # dpkg-buildflags only provides hardening flags since 1.16.1, don't check
356     # for hardening flags in buildd mode if an older dpkg-dev is used. Default
357     # flags (-g -O2) are still checked.
358     #
359     # Packages which were built before 1.16.1 but used their own hardening
360     # flags are not checked.
361     if ($option_buildd and not $start
362             and $line =~ /^Toolchain package versions: /) {
363         require Dpkg::Version;
364         if ($line !~ /dpkg-dev_(\S+)/
365                 or Dpkg::Version::version_compare($1, '1.16.1') < 0) {
366             $harden_format  = 0;
367             $harden_fortify = 0;
368             $harden_stack   = 0;
369             $harden_relro   = 0;
370             $harden_bindnow = 0;
371             $harden_pie     = 0;
372         }
373     }
374
375     # If hardening wrapper is used (wraps calls to gcc and adds hardening
376     # flags automatically) we can't perform any checks, abort.
377     if (not $start and $line =~ /^Build-Depends: .*\bhardening-wrapper\b/) {
378         error_hardening_wrapper();
379         $exit |= 1 << 4;
380         exit $exit;
381     }
382
383     # We skip over unimportant lines at the beginning of the log to prevent
384     # false positives.
385     $start = 1 if $line =~ /^dpkg-buildpackage:/;
386     next if not $start;
387     # And stop at the end of the build log. Package details (reported by the
388     # buildd logs) are not important for us. This also prevents false
389     # positives.
390     last if $line =~ /^Build finished at \d{8}-\d{4}$/;
391
392     # Detect architecture automatically unless overridden.
393     if (not $option_arch
394             and $line =~ /^dpkg-buildpackage: host architecture (.+)$/) {
395         $option_arch = $1;
396     }
397
398     # Ignore compiler warnings for now.
399     next if $line =~ /$warning_regex/;
400
401     # Remove all ANSI color sequences which are sometimes used in non-verbose
402     # builds.
403     $line = Term::ANSIColor::colorstrip($line);
404     # Also strip '\0xf' (delete previous character), used by Elinks' build
405     # system.
406     $line =~ s/\x0f//g;
407     # And "ESC(B" which seems to be used on armhf and hurd (not sure what it
408     # does).
409     $line =~ s/\033\(B//g;
410
411     # Check if this line indicates a non verbose build.
412     my $non_verbose = is_non_verbose_build($line);
413
414     # One line may contain multiple commands (";"). Treat each one as single
415     # line. parse_line() is slow, only use it when necessary.
416     my @line = (not $line =~ /;/)
417              ? ($line)
418              : Text::ParseWords::parse_line(';', 1, $line);
419     foreach $line (@line) {
420         # Add newline, drop all other whitespace at the end of a line.
421         $line =~ s/\s+$//;
422         $line .= "\n";
423
424         if ($continuation) {
425             $continuation = 0;
426
427             # Join lines, but leave the "\" in place so it's clear where the
428             # original line break was.
429             chomp $complete_line;
430             $complete_line .= ' ' . $line;
431         }
432         # Line continuation, line ends with "\".
433         if ($line =~ /\\\s*$/) {
434             $continuation = 1;
435             # Start line continuation.
436             if (not defined $complete_line) {
437                 $complete_line = $line;
438             }
439             next;
440         }
441
442         if (not $continuation) {
443             # Use the complete line if a line continuation occurred.
444             if (defined $complete_line) {
445                 $line = $complete_line;
446                 $complete_line = undef;
447             }
448
449             # Ignore lines with no compiler commands.
450             next if $line !~ /\b$cc_regex(?:\s|\\)/ and not $non_verbose;
451
452             # Ignore false positives.
453             #
454             # `./configure` output.
455             next if not $non_verbose and $line =~ /^checking /;
456             next if $line =~ /^\s*(?:Host\s+)?(?:C\s+)?
457                                (?:C|c)ompiler[\s.]*:?\s+
458                                $cc_regex
459                                (?:\s-std=[a-z0-9:+]+)?\s*$
460                              /x
461                     or $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex\s*$/
462                     or $line =~ /^\s*-- Check for working (?:C|CXX) compiler: /
463                     or $line =~ /^\s*(?:echo )?Using [A-Z_]+\s*=\s*/;
464             # Debian buildd output.
465             next if $line =~ /^\s*Depends: .*?$cc_regex.*?$/
466                     and $line !~ /\s-./; # option, prevent false negatives
467
468             # Check if additional hardening options were used. Used to ensure
469             # they are used for the complete build.
470             $harden_pie     = 1 if any_flags_used($line, @cflags_pie, @ldflags_pie);
471             $harden_bindnow = 1 if any_flags_used($line, @ldflags_bindnow);
472
473             push @input, $line;
474         }
475     }
476 }
477
478 if (scalar @input == 0) {
479     print "No compiler commands!\n";
480     $exit |= 1;
481     exit $exit;
482 }
483
484 # Option or auto detected.
485 if ($option_arch) {
486     # The following was partially copied from dpkg-dev 1.16.1.2
487     # (/usr/share/perl5/Dpkg/Vendor/Debian.pm, add_hardening_flags()),
488     # copyright RaphaĆ«l Hertzog <hertzog@debian.org>, Kees Cook
489     # <kees@debian.org>, Canonical, Ltd. licensed under GPL version 2 or
490     # later. Keep it in sync.
491
492     require Dpkg::Arch;
493     my ($abi, $os, $cpu) = Dpkg::Arch::debarch_to_debtriplet($option_arch);
494
495     # Disable unsupported hardening options.
496     if ($cpu =~ /^(ia64|alpha|mips|mipsel|hppa)$/ or $option_arch eq 'arm') {
497         $harden_stack = 0;
498     }
499     if ($cpu =~ /^(ia64|hppa|avr32)$/) {
500         $harden_relro   = 0;
501         $harden_bindnow = 0;
502     }
503 }
504
505 # Check the specified hardening options, same order as dpkg-buildflags.
506 if ($harden_pie) {
507     @cflags  = (@cflags,  @cflags_pie);
508     @ldflags = (@ldflags, @ldflags_pie);
509 }
510 if ($harden_stack) {
511     @cflags = (@cflags, @cflags_stack);
512 }
513 if ($harden_fortify) {
514     @cflags   = (@cflags,   @cflags_fortify);
515     @cppflags = (@cppflags, @cppflags_fortify);
516 }
517 if ($harden_format) {
518     @cflags = (@cflags, @cflags_format);
519 }
520 if ($harden_relro) {
521     @ldflags = (@ldflags, @ldflags_relro);
522 }
523 if ($harden_bindnow) {
524     @ldflags = (@ldflags, @ldflags_bindnow);
525 }
526
527 for (my $i = 0; $i < scalar @input; $i++) {
528     my $line = $input[$i];
529
530     my $skip = 0;
531     if (is_non_verbose_build($line, $input[$i + 1], \$skip)) {
532         error_non_verbose_build($line);
533         $exit |= 1 << 2;
534         next;
535     }
536     # Even if it's a verbose build, we might have to skip this line.
537     next if $skip;
538
539     # Skip unnecessary tests when only preprocessing.
540     my $flag_preprocess = 0;
541
542     my $preprocess = 0;
543     my $compile    = 0;
544     my $link       = 0;
545
546     # Preprocess, compile, assemble.
547     if ($line =~ /$cc_regex.*?\s(-E|-S|-c)\b/) {
548         $preprocess      = 1;
549         $flag_preprocess = 1 if $1 eq '-E';
550         $compile         = 1 if $1 eq '-S' or $1 eq '-c';
551     # Otherwise assume we are linking.
552     } else {
553         $link = 1;
554     }
555
556     # These file types don't require preprocessing.
557     if ($line =~ /$file_no_preprocess_regex/) {
558         $preprocess = 0;
559     }
560     # These file types require preprocessing.
561     if ($line =~ /$file_preprocess_regex/) {
562         $preprocess = 1;
563     }
564
565     # If there are source files then it's compiling/linking in one step and we
566     # must check both. We only check for source files here, because header
567     # files cause too many false positives.
568     if (not $flag_preprocess and $line =~ /$file_compile_link_regex/) {
569         # Assembly files don't need CFLAGS.
570         if (not $line =~ /$file_compile_regex/
571                 and $line =~ /$file_no_compile_regex/) {
572             $compile = 0;
573         # But the rest does.
574         } else {
575             $compile = 1;
576         }
577     }
578
579     # Check hardening flags.
580     my @missing;
581     if ($compile and not all_flags_used($line, \@missing, @cflags)
582             # Libraries linked with -fPIC don't have to (and can't) be linked
583             # with -fPIE as well. It's no error if only PIE flags are missing.
584             and not pic_pie_conflict($line, $harden_pie, \@missing, @cflags_pie)
585             # Assume dpkg-buildflags returns the correct flags.
586             and not $line =~ /`dpkg-buildflags --get (?:CFLAGS|CXXFLAGS)`/) {
587         error_flags('CFLAGS missing', \@missing, \%flag_renames, $line);
588         $exit |= 1 << 3;
589     }
590     if ($preprocess and not all_flags_used($line, \@missing, @cppflags)
591             # Assume dpkg-buildflags returns the correct flags.
592             and not $line =~ /`dpkg-buildflags --get CPPFLAGS`/) {
593         error_flags('CPPFLAGS missing', \@missing, \%flag_renames, $line);
594         $exit |= 1 << 3;
595     }
596     if ($link and not all_flags_used($line, \@missing, @ldflags)
597             # Same here, -fPIC conflicts with -fPIE.
598             and not pic_pie_conflict($line, $harden_pie, \@missing, @ldflags_pie)
599             # Assume dpkg-buildflags returns the correct flags.
600             and not $line =~ /`dpkg-buildflags --get LDFLAGS`/) {
601         error_flags('LDFLAGS missing', \@missing, \%flag_renames, $line);
602         $exit |= 1 << 3;
603     }
604 }
605
606 exit $exit;
607
608
609 __END__
610
611 =head1 NAME
612
613 blhc - build log hardening check, checks build logs for missing hardening flags
614
615 =head1 SYNOPSIS
616
617 B<blhc> [-h -? --help]
618
619 B<blhc> [--pie] [--bindnow] [--all]
620
621     --help                  available options
622     --version               version number and license
623     --pie                   force +pie check
624     --bindnow               force +bindbow check
625     --all                   force +all (+pie, +bindnow) check
626     --arch                  set architecture (autodetected)
627     --buildd                parser mode for buildds
628
629 =head1 DESCRIPTION
630
631 blhc is a small tool which checks build logs for missing hardening flags and
632 other important warnings. It's licensed under the GPL 3 or later.
633
634 =head1 OPTIONS
635
636 =over 8
637
638 =item B<-h -? --help>
639
640 Print available options.
641
642 =item B<--version>
643
644 Print version number and license.
645
646 =item B<--pie>
647
648 Force check for all +pie hardening flags. By default it's auto detected.
649
650 =item B<--bindnow>
651
652 Force check for all +bindnow hardening flags. By default it's auto detected.
653
654 =item B<--all>
655
656 Force check for all +all (+pie, +bindnow) hardening flags. By default it's
657 auto detected.
658
659 =item B<--arch>
660
661 Set the specific architecture (e.g. amd64, armel, etc.), automatically
662 disables hardening flags not available on this architecture. Is detected
663 automatically if dpkg-buildpackage is used.
664
665 =item B<--buildd>
666
667 Special mode for buildds when automatically parsing log files. The following
668 changes are in effect:
669
670 =over 2
671
672 =item
673
674 Don't check hardening flags in old log files (if dpkg-dev << 1.16.1 is
675 detected).
676
677 =back
678
679 =back
680
681 Auto detection for B<--pie> and B<--bindnow> only works if at least one
682 command uses the required hardening flag (e.g. -fPIE). Then it's required for
683 all other commands as well.
684
685 =head1 EXIT STATUS
686
687 The exit status is a "bit mask", each listed status is ORed when the error
688 condition occurs to get the result.
689
690 =over 8
691
692 =item B<0>
693
694 Success.
695
696 =item B<1>
697
698 No compiler commands were found.
699
700 =item B<2>
701
702 Invalid arguments/options given to blhc.
703
704 =item B<4>
705
706 Non verbose build.
707
708 =item B<8>
709
710 Missing hardening flags.
711
712 =item B<16>
713
714 Hardening wrapper detected, no tests performed.
715
716 =back
717
718 =head1 AUTHOR
719
720 Simon Ruderich, E<lt>simon@ruderich.orgE<gt>
721
722 =head1 COPYRIGHT AND LICENSE
723
724 Copyright (C) 2012 by Simon Ruderich
725
726 This program is free software: you can redistribute it and/or modify
727 it under the terms of the GNU General Public License as published by
728 the Free Software Foundation, either version 3 of the License, or
729 (at your option) any later version.
730
731 This program is distributed in the hope that it will be useful,
732 but WITHOUT ANY WARRANTY; without even the implied warranty of
733 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
734 GNU General Public License for more details.
735
736 You should have received a copy of the GNU General Public License
737 along with this program.  If not, see <http://www.gnu.org/licenses/>.
738
739 =cut