This file is indexed.

/usr/lib/mon-contrib/alert.d/bugzilla.alert is in mon-contrib 1.0+dfsg-2.

This file is owned by root:root, with mode 0o755.

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
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/perl -w # -*-CPerl-*-
#
# $Id: bugzilla.alert,v 1.1.1.1 2005/02/18 17:52:13 trockij Exp $
#
# bugzilla.alert - Mon alert to log a bug in Bugzilla database
#
# USAGE
#
#   bugzilla.alert [--priority=priority] [--severity=severity] 
#                  [--assignee=assignee-email] [--cc=cc-email] 
#                  [--reported-url=reported-url] 
#                  [--http-userid=userid --http-password=password]
#                  bugzilla-url userid password product-name component-name 
#                    reporter 
#
#   bugzilla.alert will take the first line of STDIN and use it for the 
#   summary; the remaining lines of STDIN will be used for the long
#   description.
#
# AUTHOR
# 
#   Michael S. Fischer, <michael@auctionwatch.com>
# 
#   Copyright (C) 2000 AuctionWatch.com.
#  
#   This program is free software; you can redistribute it and/or
#   modify it under the terms of the GNU General Public License
#   as published by the Free Software Foundation; either version 2
#   of the License, or (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# NOTES
# 
#   URL for posting: bugzilla-url/post_bug.cgi
#
#   CGI Parameters:
#       Name                 Default Value
#       ==================================================================
#       reporter             "monitor"
#       product              product-name (required)
#       component            component-name (required)
#       assigned_to          assignee (optional, defaults to "opsalert")
#       cc                   cc (optional)
#       bug_file_loc         url (optional)
#       short_desc           first line of STDIN
#       comment              1-N lines of STDIN 
#       form_name            "enter_bug"
#       Bugzilla_login       userid (required)
#       Bugzilla_password    password (required)

use strict;
use Getopt::Long;
use LWP::UserAgent;
use HTTP::Request::Common qw (POST);

my ($rurl, $pri, $severity, $ccmail, $amail, $comment, $httpuser, $httppass);

# Handle command-line args
GetOptions("priority=s" => \$pri,
	   "severity=s" => \$severity,
	   "cc=s" => \$ccmail,
	   "assignee=s" => \$amail,
	   "reported-url=s" => \$rurl,
	   "http-userid=s" => \$httpuser,
	   "http-password=s" => \$httppass);

@ARGV == 6 || usage();

usage() if $httpuser && ! $httppass;

my $burl = shift;
my $buser = shift;
my $bpass = shift;
my $prod = shift;
my $comp = shift;
my $rmail = shift;
my $short_desc = <STDIN>; # Read first line
$comment .= $_ while <STDIN>; # Read rest

# Set up LWP user agent
my $ua = new LWP::UserAgent;
$ua->agent('bugzilla.alert' . $ua->agent);

# Set up HTTP request
my $req = POST $burl . "/post_bug.cgi",
  ["reporter" => $rmail,
   "product" => $prod,
   "component" => $comp,
   "assigned_to" => $amail,
   "cc" => $ccmail,
   "bug_file_loc" => $rurl,
   "short_desc" => $short_desc,
   "comment" => $comment,
   "form_name" => "enter_bug",
   "Bugzilla_login" => $buser,
   "Bugzilla_password" => $bpass];

$req->authorization_basic($httpuser, $httppass) if $httpuser;

# Post it!
my $resp = $ua->request($req);

if ($resp->is_success()) {
  exit 0;
}
else {
  die $resp->error_as_HTML();
}


sub usage { 
  print <<EOF;
 USAGE:  bugzilla.alert [--priority=priority] [--severity=severity] 
                  [--assignee=assignee-email] [--cc=cc-email] 
                  [--reported-url=reported-url] 
                  [--http-userid=userid --http-password=password]
                  bugzilla-url bugzilla-userid bugzilla-password 
                  product-name component-name reporter
                     
EOF
  exit 1;
}