From owner-doc-jp@jp.freebsd.org  Sun Aug 19 01:16:26 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id BAA51956;
	Sun, 19 Aug 2001 01:16:26 +0900 (JST)
	(envelope-from owner-doc-jp@jp.FreeBSD.org)
Received: from eos.ocn.ne.jp (eos.ocn.ne.jp [210.190.142.171])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id BAA51951
	for <doc-jp@jp.freebsd.org>; Sun, 19 Aug 2001 01:16:25 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Received: from mail.hrslab.yi.org (p0212-ip01funabasi.chiba.ocn.ne.jp [211.123.225.212])
	by eos.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id BAA12192
	for <doc-jp@jp.freebsd.org>; Sun, 19 Aug 2001 01:16:23 +0900 (JST)
Received: from localhost (alph.hrslab.yi.org [192.168.0.10])
	by mail.hrslab.yi.org (8.9.3/3.7W/DomainMaster) with ESMTP id BAA34583
	for <doc-jp@jp.freebsd.org>; Sun, 19 Aug 2001 01:05:39 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Date: Sun, 19 Aug 2001 00:48:50 +0900 (JST)
Message-Id: <20010819.004850.59650252.hrs@eos.ocn.ne.jp>
To: doc-jp@jp.freebsd.org
From: Hiroki Sato <hrs@eos.ocn.ne.jp>
In-Reply-To: <20010815.170025.39148669.hrs@eos.ocn.ne.jp>
References: <20010809014423.29E6.ASATOH@pc.mycom.co.jp>
	<20010812.225405.74755960.y-koga@jp.FreeBSD.org>
	<20010815.170025.39148669.hrs@eos.ocn.ne.jp>
X-Mailer: Mew version 1.95b101 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Sun_Aug_19_00:48:50_2001_272)--"
Content-Transfer-Encoding: 7bit
Reply-To: doc-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: doc-jp 8355
Subject: [doc-jp 8355] Re: FreeBSD-SA-01:52
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org
X-Originator: hrs@eos.ocn.ne.jp

----Next_Part(Sun_Aug_19_00:48:50_2001_272)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$B:4F#!wEl5~M}2JBg3X$G$9!#(B

 SA $BK]LuMQ$K$$$D$b;H$C$F$$$k(B
 $B<+F0=hM}%9%/%j%W%H$rE:IU$7$F$*$-$^$9!#(B

 # $B;H$$J}$O!"(Bannounce-jp $B$KN.$l$k(B
 # $B%X%C%@$r4^$`%a!<%kA4BN$rN.$79~$`$@$1$G$9!#(B

--
| $B:4F#(B $B9-@8!wEl5~M}2JBg3X(B <hrs@eos.ocn.ne.jp>
|                         <hrs@FreeBSD.org> (FreeBSD Project)

----Next_Part(Sun_Aug_19_00:48:50_2001_272)--
Content-Type: Text/Plain; charset=euc-jp
Content-Disposition: inline; filename="mail2sa.pl"
Content-Transfer-Encoding: 7bit

#!/usr/bin/perl -w
#
# This is a simple filter script for translating FreeBSD Security
# Advisories into Japanese. 
#
# FreeBSD Japanese Documentation Project
# (maintained by: Hiroki Sato <hrs@jp.FreeBSD.org>)
#
# usage: cat mail_org.txt | mail2sa.pl > mail_jp.txt
#
# $hrs: announce-jp/FreeBSD-SA/mail2sa.pl,v 1.7 2001/08/18 15:33:10 hrs Exp $
#

my $translator = 'ƣ  <hrs@jp.FreeBSD.org>';
my $rcsid = "\$hrs\$";

###
### header wordslist
###
my %transtable=
    ("topic" => "ȥԥå:\t",
     "category" => "ʬ:\t\t",
     "module" => "⥸塼:\t",
     "announced" => ":\t\t",
     "affects" => "ƶϰ:\t",
     "corrected" => ":\t\t",
     "updated" => ":\t\t",
     "revised" => ":\t\t",
     "credits" => "쥸å:\t",
     "vendor status" => "٥б:\t",
     "FreeBSD only" => "FreeBSD ˸ͭ:\t",

     "revision history" => "",
     "background" => "ط",
     "problem description" => "ξܺ",
     "impact" => "ƶϰ",
     "workaround" => "ˡ",
     "solution" => "",
     "References" => "ͻ",
     "Correction details" => "ξܺ",
     );

# you know, these are more ad hoc.
my %transtable2 =
    (
     'One of the following:'
     => 'Τ줫˽äƤ.',
     '([\w\d]+)\)\s*FreeBSD ([-.\dA-Z]+) systems:'
     => '$1) FreeBSD $2 ƥξ:',
     '([\w\d]+)\)\s*FreeBSD ([-.\dA-Za-z]+) systems prior to the correction date:'
     => '$1) ʹߤ FreeBSD $2 ƥξ:',
     'Verify the detached PGP signature using your PGP utility.'
     => 'PGP 桼ƥƥȤä PGP ̾ǧޤ.',
     );

my @lines;
my $empty_line = 0;
my %header;
my %info;

##
## parse message header
##
while(<>) {
    chomp;
    /^(From|Message-Id|Date|X-Sequence|Subject): (.*)/
        and do { $header{lc($1)}=$2; next; };
    /^$/ and do { $empty_line++; };
    
    last if($empty_line >= 2);
}

##
## cook body: rewrite headers and section titles
##            into the corresponding Japanese.
##
 BODY: while(<>) {
     /^-----BEGIN PGP SIGNED MESSAGE-----$/ and next BODY;
     /^-----BEGIN PGP SIGNATURE-----$/ and last BODY;
     
     if (/^(FreeBSD-SA-\d+:\d+)\s+Security Advisory$/) {
         $info{num} = $1;
         push @lines,$_;
         next BODY;
     }
     
     foreach $word (keys %transtable) {
         if (s!^$word:\s+(.*)!$transtable{$word}$1!i) {
             $info{$word}=$1;
             push @lines,$_;
             next BODY;
         } elsif (s/^([0IV]+)(\.\s+)($word)/$1$2$transtable{$word} - $3/i) {
             push @lines,$_;
             next BODY;
         }
     }
     foreach $word (keys %transtable2) {
         my @matched;
         if (@matched = m!^$word!) {
             my $subst = $transtable2{$word};
             for ($i=1; $i<@matched+1; $i++) {
                 $subst =~ s!\$$i!$matched[$i-1]!g;
             }
             s!^$word!$subst!;
             push @lines,$_;
             next BODY;
         }
     }
     push @lines,$_;
 }

print &head(\%header,\%info),@lines,&foot();
exit 0;

##
## compose header and footer
##
sub head ($$)
{
    my ($h,$i) = @_;
    my %h = %$h;
    my %i = %$i;

    my $date = $i{revised} || $i{announced} || "UNKNOWN";

    return <<EOT;

FreeBSD ƥ ܸ
=============================================================================
$i{num} (${date})
 * $i{topic}
=============================================================================

 Υ᡼, announce-jp ή줿

  Subject: $h{"subject"}
  From: $h{"from"}
  Date: $h{"date"}
  Message-Id: $h{"message-id"}
  X-Sequence: $h{"x-sequence"}

 ܸΤǤ. 

 ʸ PGP ̾Ƥޤ, ܸ PGP ̾Ƥޤ. 
 ѥåƤ⤵ƤʤȤǧ뤿 PGP ̾
 åԤʤˤ, ʸ򻲾ȤƤ. 

 ܸ, ߥ顼Ѥξܺ٤ˤĤƤ, ʸΡA. FreeBSD
 ƥ ܸǤˤĤơפ.


                                     [: ${translator}]
--()
EOT
}

sub foot ()
{
    return <<EOT;

A.   FreeBSD ƥ ܸǤˤĤ

ܸ FreeBSD ܸɥơץ (doc-jp) 
ͤΤ󶡤ΤǤ.  ܸǥƥ

 http://www.FreeBSD.org/ja/security/

ˤޤȤƤޤ.  

, Ԥ doc-jp , ƤˤĤƤʤݾڤ
ޤΤǤդ.  ܸˤĤƤΤո, ˾,
䤤碌 doc-jp\@jp.FreeBSD.org ޤǤꤤޤ.

δǾҲ𤵤Ƥ WWW  http://www.FreeBSD.org/ 
FTP  ftp://ftp.FreeBSD.org/ ˤ, ܤΥߥ顼Ȥ¸ߤޤ.
ͥåȥκ¤뤿, ޤϥߥ顼ȤѤ
θ褦ꤤޤ.

ܤΥߥ顼ȤѤˤ,
http://www.FreeBSD.org/  http://www.jp.FreeBSD.org/www.freebsd.org/ ,
ftp://ftp.FreeBSD.org/  ftp://ftp.jp.FreeBSD.org/ ,
줾֤Ƥ.

¾ϰޤ, ߥ顼Ȥ˴ؤܺ٤,

 http://www.FreeBSD.org/handbook/mirror.html (ʸ)
 http://www.FreeBSD.org/ja/handbook/mirror.html (ܸ)

ˤޤȤƤޤ.

$rcsid
EOT
}

----Next_Part(Sun_Aug_19_00:48:50_2001_272)----
