This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Resync with mainline prior to post-5.6.0 updates
[perl5.git] / t / op / taint.t
1 #!./perl -T
2 #
3 # Taint tests by Tom Phoenix <rootbeer@teleport.com>.
4 #
5 # I don't claim to know all about tainting. If anyone sees
6 # tests that I've missed here, please add them. But this is
7 # better than having no tests at all, right?
8 #
9
10 BEGIN {
11     chdir 't' if -d 't';
12     unshift @INC, '../lib' if -d '../lib';
13 }
14
15 use strict;
16 use Config;
17
18 # We do not want the whole taint.t to fail
19 # just because Errno possibly failing.
20 eval { require Errno; import Errno };
21
22 BEGIN {
23   if ($^O eq 'VMS' && !defined($Config{d_setenv})) {
24       $ENV{PATH} = $ENV{PATH};
25       $ENV{TERM} = $ENV{TERM} ne ''? $ENV{TERM} : 'dummy';
26   }
27   if ($Config{d_shm} || $Config{d_msg}) {
28      require IPC::SysV;
29      IPC::SysV->import(qw(IPC_PRIVATE IPC_RMID IPC_CREAT S_IRWXU));
30   }
31 }
32
33 my $Is_VMS = $^O eq 'VMS';
34 my $Is_MSWin32 = $^O eq 'MSWin32';
35 my $Is_Dos = $^O eq 'dos';
36 my $Invoke_Perl = $Is_VMS ? 'MCR Sys$Disk:[]Perl.' :
37                   $Is_MSWin32 ? '.\perl' : './perl';
38 my @MoreEnv = qw/IFS CDPATH ENV BASH_ENV/;
39
40 if ($Is_VMS) {
41     my (%old, $x);
42     for $x ('DCL$PATH', @MoreEnv) {
43         ($old{$x}) = $ENV{$x} =~ /^(.*)$/ if exists $ENV{$x};
44     }
45     eval <<EndOfCleanup;
46         END {
47             \$ENV{PATH} = '' if $Config{d_setenv};
48             warn "# Note: logical name 'PATH' may have been deleted\n";
49             \@ENV{keys %old} = values %old;
50         }
51 EndOfCleanup
52 }
53
54 # Sources of taint:
55 #   The empty tainted value, for tainting strings
56 my $TAINT = substr($^X, 0, 0);
57 #   A tainted zero, useful for tainting numbers
58 my $TAINT0 = 0 + $TAINT;
59
60 # This taints each argument passed. All must be lvalues.
61 # Side effect: It also stringifies them. :-(
62 sub taint_these (@) {
63     for (@_) { $_ .= $TAINT }
64 }
65
66 # How to identify taint when you see it
67 sub any_tainted (@) {
68     not eval { join("",@_), kill 0; 1 };
69 }
70 sub tainted ($) {
71     any_tainted @_;
72 }
73 sub all_tainted (@) {
74     for (@_) { return 0 unless tainted $_ }
75     1;
76 }
77
78 sub test ($$;$) {
79     my($serial, $boolean, $diag) = @_;
80     if ($boolean) {
81         print "ok $serial\n";
82     } else {
83         print "not ok $serial\n";
84         for (split m/^/m, $diag) {
85             print "# $_";
86         }
87         print "\n" unless
88             $diag eq ''
89             or substr($diag, -1) eq "\n";
90     }
91 }
92
93 # We need an external program to call.
94 my $ECHO = ($Is_MSWin32 ? ".\\echo$$" : "./echo$$");
95 END { unlink $ECHO }
96 open PROG, "> $ECHO" or die "Can't create $ECHO: $!";
97 print PROG 'print "@ARGV\n"', "\n";
98 close PROG;
99 my $echo = "$Invoke_Perl $ECHO";
100
101 print "1..151\n";
102
103 # First, let's make sure that Perl is checking the dangerous
104 # environment variables. Maybe they aren't set yet, so we'll
105 # taint them ourselves.
106 {
107     $ENV{'DCL$PATH'} = '' if $Is_VMS;
108
109     $ENV{PATH} = '';
110     delete @ENV{@MoreEnv};
111     $ENV{TERM} = 'dumb';
112
113     test 1, eval { `$echo 1` } eq "1\n";
114
115     if ($Is_MSWin32 || $Is_VMS || $Is_Dos) {
116         print "# Environment tainting tests skipped\n";
117         for (2..5) { print "ok $_\n" }
118     }
119     else {
120         my @vars = ('PATH', @MoreEnv);
121         while (my $v = $vars[0]) {
122             local $ENV{$v} = $TAINT;
123             last if eval { `$echo 1` };
124             last unless $@ =~ /^Insecure \$ENV{$v}/;
125             shift @vars;
126         }
127         test 2, !@vars, "\$$vars[0]";
128
129         # tainted $TERM is unsafe only if it contains metachars
130         local $ENV{TERM};
131         $ENV{TERM} = 'e=mc2';
132         test 3, eval { `$echo 1` } eq "1\n";
133         $ENV{TERM} = 'e=mc2' . $TAINT;
134         test 4, eval { `$echo 1` } eq '';
135         test 5, $@ =~ /^Insecure \$ENV{TERM}/, $@;
136     }
137
138     my $tmp;
139     if ($^O eq 'os2' || $^O eq 'amigaos' || $Is_MSWin32 || $Is_Dos) {
140         print "# all directories are writeable\n";
141     }
142     else {
143         $tmp = (grep { defined and -d and (stat _)[2] & 2 }
144                      qw(sys$scratch /tmp /var/tmp /usr/tmp),
145                      @ENV{qw(TMP TEMP)})[0]
146             or print "# can't find world-writeable directory to test PATH\n";
147     }
148
149     if ($tmp) {
150         local $ENV{PATH} = $tmp;
151         test 6, eval { `$echo 1` } eq '';
152         test 7, $@ =~ /^Insecure directory in \$ENV{PATH}/, $@;
153     }
154     else {
155         for (6..7) { print "ok $_ # Skipped: all directories are writeable\n" }
156     }
157
158     if ($Is_VMS) {
159         $ENV{'DCL$PATH'} = $TAINT;
160         test 8,  eval { `$echo 1` } eq '';
161         test 9, $@ =~ /^Insecure \$ENV{DCL\$PATH}/, $@;
162         if ($tmp) {
163             $ENV{'DCL$PATH'} = $tmp;
164             test 10, eval { `$echo 1` } eq '';
165             test 11, $@ =~ /^Insecure directory in \$ENV{DCL\$PATH}/, $@;
166         }
167         else {
168             for (10..11) { print "ok $_ # Skipped: can't find world-writeable directory to test DCL\$PATH\n" }
169         }
170         $ENV{'DCL$PATH'} = '';
171     }
172     else {
173         for (8..11) { print "ok $_ # Skipped: This is not VMS\n"; }
174     }
175 }
176
177 # Let's see that we can taint and untaint as needed.
178 {
179     my $foo = $TAINT;
180     test 12, tainted $foo;
181
182     # That was a sanity check. If it failed, stop the insanity!
183     die "Taint checks don't seem to be enabled" unless tainted $foo;
184
185     $foo = "foo";
186     test 13, not tainted $foo;
187
188     taint_these($foo);
189     test 14, tainted $foo;
190
191     my @list = 1..10;
192     test 15, not any_tainted @list;
193     taint_these @list[1,3,5,7,9];
194     test 16, any_tainted @list;
195     test 17, all_tainted @list[1,3,5,7,9];
196     test 18, not any_tainted @list[0,2,4,6,8];
197
198     ($foo) = $foo =~ /(.+)/;
199     test 19, not tainted $foo;
200
201     $foo = $1 if ('bar' . $TAINT) =~ /(.+)/;
202     test 20, not tainted $foo;
203     test 21, $foo eq 'bar';
204
205     {
206       use re 'taint';
207
208       ($foo) = ('bar' . $TAINT) =~ /(.+)/;
209       test 22, tainted $foo;
210       test 23, $foo eq 'bar';
211
212       $foo = $1 if ('bar' . $TAINT) =~ /(.+)/;
213       test 24, tainted $foo;
214       test 25, $foo eq 'bar';
215     }
216
217     $foo = $1 if 'bar' =~ /(.+)$TAINT/;
218     test 26, tainted $foo;
219     test 27, $foo eq 'bar';
220
221     my $pi = 4 * atan2(1,1) + $TAINT0;
222     test 28, tainted $pi;
223
224     ($pi) = $pi =~ /(\d+\.\d+)/;
225     test 29, not tainted $pi;
226     test 30, sprintf("%.5f", $pi) eq '3.14159';
227 }
228
229 # How about command-line arguments? The problem is that we don't
230 # always get some, so we'll run another process with some.
231 {
232     my $arg = "./arg$$";
233     open PROG, "> $arg" or die "Can't create $arg: $!";
234     print PROG q{
235         eval { join('', @ARGV), kill 0 };
236         exit 0 if $@ =~ /^Insecure dependency/;
237         print "# Oops: \$@ was [$@]\n";
238         exit 1;
239     };
240     close PROG;
241     print `$Invoke_Perl "-T" $arg and some suspect arguments`;
242     test 31, !$?, "Exited with status $?";
243     unlink $arg;
244 }
245
246 # Reading from a file should be tainted
247 {
248     my $file = './TEST';
249     test 32, open(FILE, $file), "Couldn't open '$file': $!";
250
251     my $block;
252     sysread(FILE, $block, 100);
253     my $line = <FILE>;
254     close FILE;
255     test 33, tainted $block;
256     test 34, tainted $line;
257 }
258
259 # Globs should be forbidden, except under VMS,
260 #   which doesn't spawn an external program.
261 if (1  # built-in glob
262     or $Is_VMS) {
263     for (35..36) { print "ok $_\n"; }
264 }
265 else {
266     my @globs = eval { <*> };
267     test 35, @globs == 0 && $@ =~ /^Insecure dependency/;
268
269     @globs = eval { glob '*' };
270     test 36, @globs == 0 && $@ =~ /^Insecure dependency/;
271 }
272
273 # Output of commands should be tainted
274 {
275     my $foo = `$echo abc`;
276     test 37, tainted $foo;
277 }
278
279 # Certain system variables should be tainted
280 {
281     test 38, all_tainted $^X, $0;
282 }
283
284 # Results of matching should all be untainted
285 {
286     my $foo = "abcdefghi" . $TAINT;
287     test 39, tainted $foo;
288
289     $foo =~ /def/;
290     test 40, not any_tainted $`, $&, $';
291
292     $foo =~ /(...)(...)(...)/;
293     test 41, not any_tainted $1, $2, $3, $+;
294
295     my @bar = $foo =~ /(...)(...)(...)/;
296     test 42, not any_tainted @bar;
297
298     test 43, tainted $foo;      # $foo should still be tainted!
299     test 44, $foo eq "abcdefghi";
300 }
301
302 # Operations which affect files can't use tainted data.
303 {
304     test 45, eval { chmod 0, $TAINT } eq '', 'chmod';
305     test 46, $@ =~ /^Insecure dependency/, $@;
306
307     # There is no feature test in $Config{} for truncate,
308     #   so we allow for the possibility that it's missing.
309     test 47, eval { truncate 'NoSuChFiLe', $TAINT0 } eq '', 'truncate';
310     test 48, $@ =~ /^(?:Insecure dependency|truncate not implemented)/, $@;
311
312     test 49, eval { rename '', $TAINT } eq '', 'rename';
313     test 50, $@ =~ /^Insecure dependency/, $@;
314
315     test 51, eval { unlink $TAINT } eq '', 'unlink';
316     test 52, $@ =~ /^Insecure dependency/, $@;
317
318     test 53, eval { utime $TAINT } eq '', 'utime';
319     test 54, $@ =~ /^Insecure dependency/, $@;
320
321     if ($Config{d_chown}) {
322         test 55, eval { chown -1, -1, $TAINT } eq '', 'chown';
323         test 56, $@ =~ /^Insecure dependency/, $@;
324     }
325     else {
326         for (55..56) { print "ok $_ # Skipped: chown() is not available\n" }
327     }
328
329     if ($Config{d_link}) {
330         test 57, eval { link $TAINT, '' } eq '', 'link';
331         test 58, $@ =~ /^Insecure dependency/, $@;
332     }
333     else {
334         for (57..58) { print "ok $_ # Skipped: link() is not available\n" }
335     }
336
337     if ($Config{d_symlink}) {
338         test 59, eval { symlink $TAINT, '' } eq '', 'symlink';
339         test 60, $@ =~ /^Insecure dependency/, $@;
340     }
341     else {
342         for (59..60) { print "ok $_ # Skipped: symlink() is not available\n" }
343     }
344 }
345
346 # Operations which affect directories can't use tainted data.
347 {
348     test 61, eval { mkdir $TAINT0, $TAINT } eq '', 'mkdir';
349     test 62, $@ =~ /^Insecure dependency/, $@;
350
351     test 63, eval { rmdir $TAINT } eq '', 'rmdir';
352     test 64, $@ =~ /^Insecure dependency/, $@;
353
354     test 65, eval { chdir $TAINT } eq '', 'chdir';
355     test 66, $@ =~ /^Insecure dependency/, $@;
356
357     if ($Config{d_chroot}) {
358         test 67, eval { chroot $TAINT } eq '', 'chroot';
359         test 68, $@ =~ /^Insecure dependency/, $@;
360     }
361     else {
362         for (67..68) { print "ok $_ # Skipped: chroot() is not available\n" }
363     }
364 }
365
366 # Some operations using files can't use tainted data.
367 {
368     my $foo = "imaginary library" . $TAINT;
369     test 69, eval { require $foo } eq '', 'require';
370     test 70, $@ =~ /^Insecure dependency/, $@;
371
372     my $filename = "./taintB$$";        # NB: $filename isn't tainted!
373     END { unlink $filename if defined $filename }
374     $foo = $filename . $TAINT;
375     unlink $filename;   # in any case
376
377     test 71, eval { open FOO, $foo } eq '', 'open for read';
378     test 72, $@ eq '', $@;              # NB: This should be allowed
379
380     # Try first new style but allow also old style.
381     test 73, $!{ENOENT} ||
382         $! == 2 || # File not found
383         ($Is_Dos && $! == 22) ||
384         ($^O eq 'mint' && $! == 33);
385
386     test 74, eval { open FOO, "> $foo" } eq '', 'open for write';
387     test 75, $@ =~ /^Insecure dependency/, $@;
388 }
389
390 # Commands to the system can't use tainted data
391 {
392     my $foo = $TAINT;
393
394     if ($^O eq 'amigaos') {
395         for (76..79) { print "ok $_ # Skipped: open('|') is not available\n" }
396     }
397     else {
398         test 76, eval { open FOO, "| x$foo" } eq '', 'popen to';
399         test 77, $@ =~ /^Insecure dependency/, $@;
400
401         test 78, eval { open FOO, "x$foo |" } eq '', 'popen from';
402         test 79, $@ =~ /^Insecure dependency/, $@;
403     }
404
405     test 80, eval { exec $TAINT } eq '', 'exec';
406     test 81, $@ =~ /^Insecure dependency/, $@;
407
408     test 82, eval { system $TAINT } eq '', 'system';
409     test 83, $@ =~ /^Insecure dependency/, $@;
410
411     $foo = "*";
412     taint_these $foo;
413
414     test 84, eval { `$echo 1$foo` } eq '', 'backticks';
415     test 85, $@ =~ /^Insecure dependency/, $@;
416
417     if ($Is_VMS) { # wildcard expansion doesn't invoke shell, so is safe
418         test 86, join('', eval { glob $foo } ) ne '', 'globbing';
419         test 87, $@ eq '', $@;
420     }
421     else {
422         for (86..87) { print "ok $_ # Skipped: this is not VMS\n"; }
423     }
424 }
425
426 # Operations which affect processes can't use tainted data.
427 {
428     test 88, eval { kill 0, $TAINT } eq '', 'kill';
429     test 89, $@ =~ /^Insecure dependency/, $@;
430
431     if ($Config{d_setpgrp}) {
432         test 90, eval { setpgrp 0, $TAINT } eq '', 'setpgrp';
433         test 91, $@ =~ /^Insecure dependency/, $@;
434     }
435     else {
436         for (90..91) { print "ok $_ # Skipped: setpgrp() is not available\n" }
437     }
438
439     if ($Config{d_setprior}) {
440         test 92, eval { setpriority 0, $TAINT, $TAINT } eq '', 'setpriority';
441         test 93, $@ =~ /^Insecure dependency/, $@;
442     }
443     else {
444         for (92..93) { print "ok $_ # Skipped: setpriority() is not available\n" }
445     }
446 }
447
448 # Some miscellaneous operations can't use tainted data.
449 {
450     if ($Config{d_syscall}) {
451         test 94, eval { syscall $TAINT } eq '', 'syscall';
452         test 95, $@ =~ /^Insecure dependency/, $@;
453     }
454     else {
455         for (94..95) { print "ok $_ # Skipped: syscall() is not available\n" }
456     }
457
458     {
459         my $foo = "x" x 979;
460         taint_these $foo;
461         local *FOO;
462         my $temp = "./taintC$$";
463         END { unlink $temp }
464         test 96, open(FOO, "> $temp"), "Couldn't open $temp for write: $!";
465
466         test 97, eval { ioctl FOO, $TAINT, $foo } eq '', 'ioctl';
467         test 98, $@ =~ /^Insecure dependency/, $@;
468
469         if ($Config{d_fcntl}) {
470             test 99, eval { fcntl FOO, $TAINT, $foo } eq '', 'fcntl';
471             test 100, $@ =~ /^Insecure dependency/, $@;
472         }
473         else {
474             for (99..100) { print "ok $_ # Skipped: fcntl() is not available\n" }
475         }
476
477         close FOO;
478     }
479 }
480
481 # Some tests involving references
482 {
483     my $foo = 'abc' . $TAINT;
484     my $fooref = \$foo;
485     test 101, not tainted $fooref;
486     test 102, tainted $$fooref;
487     test 103, tainted $foo;
488 }
489
490 # Some tests involving assignment
491 {
492     my $foo = $TAINT0;
493     my $bar = $foo;
494     test 104, all_tainted $foo, $bar;
495     test 105, tainted($foo = $bar);
496     test 106, tainted($bar = $bar);
497     test 107, tainted($bar += $bar);
498     test 108, tainted($bar -= $bar);
499     test 109, tainted($bar *= $bar);
500     test 110, tainted($bar++);
501     test 111, tainted($bar /= $bar);
502     test 112, tainted($bar += 0);
503     test 113, tainted($bar -= 2);
504     test 114, tainted($bar *= -1);
505     test 115, tainted($bar /= 1);
506     test 116, tainted($bar--);
507     test 117, $bar == 0;
508 }
509
510 # Test assignment and return of lists
511 {
512     my @foo = ("A", "tainted" . $TAINT, "B");
513     test 118, not tainted $foo[0];
514     test 119,     tainted $foo[1];
515     test 120, not tainted $foo[2];
516     my @bar = @foo;
517     test 121, not tainted $bar[0];
518     test 122,     tainted $bar[1];
519     test 123, not tainted $bar[2];
520     my @baz = eval { "A", "tainted" . $TAINT, "B" };
521     test 124, not tainted $baz[0];
522     test 125,     tainted $baz[1];
523     test 126, not tainted $baz[2];
524     my @plugh = eval q[ "A", "tainted" . $TAINT, "B" ];
525     test 127, not tainted $plugh[0];
526     test 128,     tainted $plugh[1];
527     test 129, not tainted $plugh[2];
528     my $nautilus = sub { "A", "tainted" . $TAINT, "B" };
529     test 130, not tainted ((&$nautilus)[0]);
530     test 131,     tainted ((&$nautilus)[1]);
531     test 132, not tainted ((&$nautilus)[2]);
532     my @xyzzy = &$nautilus;
533     test 133, not tainted $xyzzy[0];
534     test 134,     tainted $xyzzy[1];
535     test 135, not tainted $xyzzy[2];
536     my $red_october = sub { return "A", "tainted" . $TAINT, "B" };
537     test 136, not tainted ((&$red_october)[0]);
538     test 137,     tainted ((&$red_october)[1]);
539     test 138, not tainted ((&$red_october)[2]);
540     my @corge = &$red_october;
541     test 139, not tainted $corge[0];
542     test 140,     tainted $corge[1];
543     test 141, not tainted $corge[2];
544 }
545
546 # Test for system/library calls returning string data of dubious origin.
547 {
548     # No reliable %Config check for getpw*
549     if (eval { setpwent(); getpwent(); 1 }) {
550         setpwent();
551         my @getpwent = getpwent();
552         die "getpwent: $!\n" unless (@getpwent);
553         test 142,(    not tainted $getpwent[0]
554                   and     tainted $getpwent[1]
555                   and not tainted $getpwent[2]
556                   and not tainted $getpwent[3]
557                   and not tainted $getpwent[4]
558                   and not tainted $getpwent[5]
559                   and     tainted $getpwent[6]          # ge?cos
560                   and not tainted $getpwent[7]
561                   and     tainted $getpwent[8]);        # shell
562         endpwent();
563     } else {
564         for (142) { print "ok $_ # Skipped: getpwent() is not available\n" }
565     }
566
567     if ($Config{d_readdir}) { # pretty hard to imagine not
568         local(*D);
569         opendir(D, "op") or die "opendir: $!\n";
570         my $readdir = readdir(D);
571         test 143, tainted $readdir;
572         closedir(OP);
573     } else {
574         for (143) { print "ok $_ # Skipped: readdir() is not available\n" }
575     }
576
577     if ($Config{d_readlink} && $Config{d_symlink}) {
578         my $symlink = "sl$$";
579         unlink($symlink);
580         symlink("/something/naughty", $symlink) or die "symlink: $!\n";
581         my $readlink = readlink($symlink);
582         test 144, tainted $readlink;
583         unlink($symlink);
584     } else {
585         for (144) { print "ok $_ # Skipped: readlink() or symlink() is not available\n"; }
586     }
587 }
588
589 # test bitwise ops (regression bug)
590 {
591     my $why = "y";
592     my $j = "x" | $why;
593     test 145, not tainted $j;
594     $why = $TAINT."y";
595     $j = "x" | $why;
596     test 146,     tainted $j;
597 }
598
599 # test target of substitution (regression bug)
600 {
601     my $why = $TAINT."y";
602     $why =~ s/y/z/;
603     test 147,     tainted $why;
604
605     my $z = "[z]";
606     $why =~ s/$z/zee/;
607     test 148,     tainted $why;
608
609     $why =~ s/e/'-'.$$/ge;
610     test 149,     tainted $why;
611 }
612
613 # test shmread
614 {
615     if ($Config{d_shm}) {
616         no strict 'subs';
617         my $sent = "foobar";
618         my $rcvd;
619         my $size = 2000;
620         my $id = shmget(IPC_PRIVATE, $size, S_IRWXU) ||
621             warn "# shmget failed: $!\n";
622         if (defined $id) {
623             if (shmwrite($id, $sent, 0, 60)) {
624                 if (shmread($id, $rcvd, 0, 60)) {
625                     substr($rcvd, index($rcvd, "\0")) = '';
626                 } else {
627                     warn "# shmread failed: $!\n";
628                 }
629             } else {
630                 warn "# shmwrite failed: $!\n";
631             }
632             shmctl($id, IPC_RMID, 0) || warn "# shmctl failed: $!\n";
633         } else {
634             warn "# shmget failed: $!\n";
635         }
636
637         if ($rcvd eq $sent) {
638             test 150, tainted $rcvd;
639         } else {
640             print "ok 150 # Skipped: SysV shared memory operation failed\n";
641         }
642     } else {
643         print "ok 150 # Skipped: SysV shared memory is not available\n";
644     }
645 }
646
647 # test msgrcv
648 {
649     if ($Config{d_msg}) {
650         no strict 'subs';
651         my $id = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU);
652
653         my $sent      = "message";
654         my $type_sent = 1234;
655         my $rcvd;
656         my $type_rcvd;
657
658         if (defined $id) {
659             if (msgsnd($id, pack("l! a*", $type_sent, $sent), 0)) {
660                 if (msgrcv($id, $rcvd, 60, 0, 0)) {
661                     ($type_rcvd, $rcvd) = unpack("l! a*", $rcvd);
662                 } else {
663                     warn "# msgrcv failed\n";
664                 }
665             } else {
666                 warn "# msgsnd failed\n";
667             }
668             msgctl($id, IPC_RMID, 0) || warn "# msgctl failed: $!\n";
669         } else {
670             warn "# msgget failed\n";
671         }
672
673         if ($rcvd eq $sent && $type_sent == $type_rcvd) {
674             test 151, tainted $rcvd;
675         } else {
676             print "ok 151 # Skipped: SysV message queue operation failed\n";
677         }
678     } else {
679         print "ok 151 # Skipped: SysV message queues are not available\n";
680     }
681 }
682