source: trunk/cgi-bin/MyIPDB.pm@ 609

Last change on this file since 609 was 582, checked in by Kris Deugau, 12 years ago

/trunk

Begin adding DNS integration via RPC. See #1.
IPDB.pm

  • Add a global in IPDB.pm to identify the URL for RPC DNS changes. A blank URL means this capability is disabled. (also MyIPDB.pm)
  • Accept extra parameters in addMaster() for DNS changes (default rDNS pattern, DNS location/scope/view) and while we're at it, add space to handle VRF as an informational field
  • Drop maskbits from INSERTs in addMaster()
  • Make the RPC call to add a reverse zone when adding a new master block. To assist with export caching, we split the zone into /16 or /24 chunks and add each one separately.

main.cgi

  • Retrieve DNS locations for adding a master block
  • Pass the HTTP user in to addMaster() for logging in the DNS backend

Modify templates for add master
Remove long-obsolete function in widgets.js, add function for:
Add rDNS pattern reference page

Note the RPC calls require at least dnsadmin:trunk@r447 to work properly.

  • Property svn:keywords set to Date Rev Author
File size: 2.1 KB
RevLine 
[142]1# ipdb/cgi-bin/MyIPDB.pm
2# Contains site-specific functions for IPDB
3# May override some functions from IPDB.pm, wraps others
4###
5# SVN revision info
6# $Date: 2013-01-04 22:19:57 +0000 (Fri, 04 Jan 2013) $
7# SVN revision $Rev: 582 $
8# Last update by $Author: kdeugau $
9###
[417]10# Copyright (C) 2004-2010 - Kris Deugau
[142]11
[417]12# don't remove! required for GNU/FHS-ish install from tarball
13##uselib##
14
[142]15use IPDB 2.0 qw(:ALL);
16
17
[432]18# DSN, user, and password for database. These **MUST** be set.
19my $dbname = 'ipdb';
20my $dbuser = 'ipdb';
21my $dbpass = 'ipdbpwd';
22# DB host is optional.
23my $dbhost = 'ipdb-db';
24
[517]25# Quick workaround for fixed web path. Set this to the absolute web path to
26# your IPDB install, or leave blank for installation at the webroot.
27$IPDB::webpath = '';
28
[416]29# Set some globals declared in IPDB.pm. Most of these only affect mailNotify().
30# Note that while you *can* leave these at defaults, it's probably a Really Bad Idea.
[437]31#$IPDB::org_name = "Bob's Big Bonaza";
[416]32#$IPDB::smtphost = '127.0.0.1';
33#$IPDB::domain = 'bob.com';
[417]34#$IPDB::defcustid = '5554242';
35# Globals for db2rwhois.pl
[420]36#$IPDB::rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd';
[417]37#$IPDB::org_street = '123 4th Street';
38#$IPDB::org_city = 'Anytown';
39#$IPDB::org_prov_state = 'ON';
40#$IPDB::org_pocode = 'H0H 0H0';
41#$IPDB::org_country = 'CA';
42#$IPDB::org_phone = '000-555-1234';
43# note: following may also just be a bare email address
44#$IPDB::org_techhandle = 'ISP-ARIN-HANDLE';
[434]45#$IPDB::org_email = 'noc@example.com';
[437]46#$IPDB::hostmaster = 'dns@example.com';
[416]47
[417]48# Logging destination. Defaults to local2. See your local syslog docs for valid facilities.
49# Note that the value here should have the LOG_ prefix removed, and convert to lower-case.
50# local0 through local7 and user make the most sense.
51#$IPDB::syslog_facility = 'daemon';
52
[582]53# RPC URL for pushing DNS changes out. Blank by default; disables RPC calls for DNS changes when blank.
54#$IPDB::rpc_url = 'http://dnsadmin.example.com/dns-rpc.cgi';
[432]55
56## connectDB_My()
57# Wrapper for IPDB::connectDB
58# Takes no arguments, returns whatever IPDB::connectDB returns.
59sub connectDB_My {
60 return connectDB($dbname, $dbuser, $dbpass, $dbhost);
61} # end connectDB_My()
62
[142]63# Keep Perl from complaining.
641;
Note: See TracBrowser for help on using the repository browser.