~ubuntu-branches/ubuntu/raring/gnupg2/raring-proposed

« back to all changes in this revision

Viewing changes to keyserver/gpg2keys_mailto.in

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-08-23 20:48:11 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20090823204811-cajik24rci4xszia
Tags: 2.0.12-1
* New upstream release. (Closes: #499569, #463270, #446494, #314068, 
  #519375, #514587)
* debian/control: Change build dependency on gs to ghoscript, since
  ghoscript has been replaced.
* debian/compat: Use debhelper v7.
* debian/control: Update Standards-Version to 3.8.2.
* debian/control: Use ${misc:Depends}.
* configure.ac: Override pkgdatadir so that it points to
  /usr/share/gnupg2. (Closes: #528734)
* debian/rules: No longer need to specify pkgdatadir at make install
  time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    open(STDIN,$ARGV[0]) || die "Can't open input file $ARGV[0]\n";
53
53
}
54
54
 
55
 
($login,$name)=(getpwuid($<))[0,6];
56
 
 
57
 
$from="$name <$login>";
58
 
 
59
55
while(<STDIN>)
60
56
{
61
57
    last if($_ eq "\n");
85
81
        {
86
82
            $verbose--;
87
83
        }
 
84
        elsif($1=~/^mail-from=(.+)$/i)
 
85
        {
 
86
            $from=$1;
 
87
        }
 
88
        elsif($1=~/^no-mail-from$/i)
 
89
        {
 
90
            undef $from;
 
91
        }
 
92
 
88
93
    }
89
94
}
90
95
 
 
96
if(!defined($from))
 
97
{
 
98
    ($login,$name)=(getpwuid($<))[0,6];
 
99
    $from="$name <$login>";
 
100
}
 
101
 
91
102
$program="(unknown)" if(!defined($program));
92
103
 
93
104
if(!defined($address))
96
107
    exit(1);
97
108
}
98
109
 
99
 
# decode $address
100
 
 
101
 
($address,$args)=split(/\?/,$address);
102
 
 
103
 
if(defined($args))
104
 
{
105
 
    @pairs = split(/&/, $args);
106
 
    foreach $pair (@pairs)
107
 
    {
108
 
        ($hdr, $val) = split(/=/, $pair);
109
 
        $hdr =~ tr/+/ /;
110
 
        $hdr =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
111
 
        $val =~ tr/+/ /;
112
 
        $val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
113
 
# we only handle "from" right now
114
 
        if($hdr=~/^from$/i)
115
 
        {
116
 
            $from=$val;
117
 
            last;
118
 
        }
119
 
    }
120
 
}
121
 
 
122
110
while(<STDIN>)
123
111
{
124
112
    last if($_ eq "\n");