/usr/lib/news/bin/control/senduuname.pl is in inn2 2.6.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | ## $Id: senduuname.pl 8281 2009-01-10 11:52:16Z iulius $
##
## senduuname control message handler.
##
## Copyright 2001 by Marco d'Itri <md@linux.it>
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## are met:
##
## 1. Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
##
## 2. Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
use strict;
sub control_senduuname {
my ($par, $sender, $replyto, $site, $action, $log, $approved,
$article) = @_;
my ($where) = @$par;
my $head = $article->head;
my @headers = split(/\r?\n/, $head->stringify);
my @body = split(/\r?\n/, $article->stringify_body);
if ($action eq 'mail') {
my $mail = sendmail("senduuname $sender");
print $mail <<END;
$sender has requested information about your UUCP name.
If this is acceptable, type:
uuname | $INN::Config::mailcmd -s "senduuname reply from $INN::Config::pathhost" $replyto
The control message follows:
END
print $mail map { s/^~/~~/; "$_\n" } @headers;
print $mail "\n";
print $mail map { s/^~/~~/; "$_\n" } @body;
close $mail or logdie("Cannot send mail: $!");
} elsif ($action eq 'log') {
if ($log) {
logger($log, "senduuname $sender", $article);
} else {
logmsg("senduuname $sender");
}
} elsif ($action =~ /^(doit|doifarg)$/) {
if ($action eq 'doifarg' and $where ne $INN::Config::pathhost) {
logmsg("skipped senduuname $sender");
return;
}
my $mail = sendmail("senduuname reply from $INN::Config::pathhost", $replyto);
open(UUNAME, 'uuname|') or logdie("Cannot run uuname: $!");
print $mail $_ while <UUNAME>;
close UUNAME or logdie("Cannot run uuname: $!");
close $mail or logdie("Cannot send mail: $!");
logger($log, "senduuname $sender to $replyto", $article) if $log;
}
}
1;
|