- Timestamp:
- 01/04/12 23:25:56 (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r212 r216 120 120 # fmeh. this is a real web path, not a logical internal one. hm.. 121 121 # cssdir => 'templates/', 122 sessiondir => 'session/', 122 123 123 124 # Session params … … 223 224 $config{domain} = $1 if /^domain\s*=\s*([a-z0-9_.-]+)/i; 224 225 # session - note this is fed directly to CGI::Session 225 $config{timeout} = $1 if /^[tT][iI][mM][eE][oO][uU][tT]\s*=\s*(\d+[smhdwMy]?)/; 226 $config{timeout} = $1 if /^[tT][iI][mM][eE][oO][uU][tT]\s*=\s*(\d+[smhdwMy]?)/; 227 $config{sessiondir} = $1 if m{^sessiondir\s*=\s*([a-z0-9/_.-]+)}i; 226 228 # misc 227 229 $config{log_failures} = $1 if /^log_failures\s*=\s*([a-z01]+)/i; -
trunk/Makefile
r210 r216 47 47 templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \ 48 48 templates/soadata.tmpl templates/template.tmpl templates/updatesoa.tmpl templates/useradmin.tmpl \ 49 templates/user.tmpl templates/viadns.css templates/whoisq.tmpl \ 49 templates/user.tmpl templates/whoisq.tmpl \ 50 \ 51 dnsdb.conf 50 52 51 53 DIRS = \ … … 61 63 MODULES = DNSDB.pm 62 64 63 #CONFIGMODULES = MyDNSDB.pm 65 TEMPLATES = \ 66 templates/adddomain.tmpl templates/addgroup.tmpl templates/addrec.tmpl templates/adduser.tmpl \ 67 templates/axfr.tmpl templates/bulkchange.tmpl templates/bulkdomain.tmpl templates/dberr.tmpl \ 68 templates/deldom.tmpl templates/delgrp.tmpl templates/delrec.tmpl templates/deluser.tmpl \ 69 templates/dns.css templates/dnsq.tmpl templates/domlist.tmpl templates/edgroup.tmpl \ 70 templates/editsoa.tmpl templates/footer.tmpl templates/fpnla.tmpl templates/grouptree.css \ 71 templates/grouptree-ie.css templates/grpman.tmpl templates/grptree.tmpl templates/header.tmpl \ 72 templates/lettsearch.tmpl templates/login.tmpl templates/log.tmpl templates/menu.tmpl \ 73 templates/newdomain.tmpl templates/newgrp.tmpl templates/permlist_enabled.tmpl templates/permlist.tmpl \ 74 templates/pgcount.tmpl templates/reclist.tmpl templates/record.tmpl templates/sbox.tmpl \ 75 templates/soadata.tmpl templates/template.tmpl templates/updatesoa.tmpl templates/useradmin.tmpl \ 76 templates/user.tmpl templates/whoisq.tmpl 77 78 CONFIGFILES = dnsdb.conf 64 79 65 80 all: … … 67 82 68 83 install: 69 @for i in $( HTML) $(IMAGES); do \70 $(INSTALL_DATA) -D $$i $(DESTDIR)${ libdir}/dnsdb/$$i ; \84 @for i in $(IMAGES) $(TEMPLATES); do \ 85 $(INSTALL_DATA) -D $$i $(DESTDIR)${datadir}/dnsdb-$(VERSION)/$$i ; \ 71 86 done 72 # munge in necessary 'use lib ...' bits so scripts can find MyDNSDB.pm... 87 @# munge in necessary 'use lib ...' bits so scripts can find libs and config... 88 @# datadir is correct; no arch-specific files 73 89 @for i in $(SCRIPTS) $(MODULES); do \ 74 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${libdir}/dnsdb/$$i ; \ 75 perl -pi -e 's|##uselib##|use lib "${sysconfdir}/dnsdb/";|;' $(DESTDIR)${libdir}/dnsdb/$$i ; \ 90 $(INSTALL_SCRIPT) -D $$i $(DESTDIR)${datadir}/dnsdb-$(VERSION)/$$i ; \ 91 perl -pi -e 's|use lib '.'; ##uselib##|use lib "${datadir}/dnsdb-$(VERSION)/";|;' $(DESTDIR)${datadir}/dnsdb-$(VERSION)/$$i ; \ 92 perl -pi -e 's|use lib '.'; ##uselib##|use lib "${datadir}/dnsdb-$(VERSION)/";|;' $(DESTDIR)${datadir}/dnsdb-$(VERSION)/$$i ; \ 76 93 done 77 $(INSTALL) -d $(DESTDIR)${sysconfdir}/dnsdb/ 78 @for i in $(CONFIGMODULES) ; do \ 79 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/dnsdb/ ; \ 94 @$(INSTALL) -d $(DESTDIR)${sysconfdir}/dnsdb/ 95 @# install an example config file with all known settings 96 @for i in $(CONFIGFILES) ; do \ 97 if [ -e $(DESTDIR)${sysconfdir}/dnsdb/$$i ]; then \ 98 echo "refusing to overwrite existing config file, created as $$i.new" ; \ 99 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/dnsdb/$$i.new ; \ 100 else \ 101 $(INSTALL_DATA) $$i $(DESTDIR)${sysconfdir}/dnsdb/ ; \ 102 fi \ 80 103 done 81 104 # # and now munge MyDNSDB.pm so it can find the core library … … 96 119 gzip -v -f -9 $(PKGNAME)-$(VERSION).tar 97 120 rm -rf $(PKGNAME)-$(VERSION) 98 #gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz121 gpg --detach-sign $(PKGNAME)-$(VERSION).tar.gz -
trunk/dns-rpc.cgi
r200 r216 1 #!/usr/bin/perl 1 #!/usr/bin/perl -w -T 2 2 # $Id$ 3 3 # XMLRPC interface to manipulate most DNS DB entities … … 6 6 use strict; 7 7 use warnings; 8 9 # don't remove! required for GNU/FHS-ish install from tarball 10 use lib '.'; ##uselib## 11 8 12 use DNSDB; # note we're not importing subs; this lets us (ab)use the same sub names here for convenience 9 13 use Data::Dumper; -
trunk/dns.cgi
r213 r216 32 32 #die "argh! \@INC got tainted!" if is_tainted(@INC); 33 33 34 # custom modules 35 use lib '.'; 34 # don't remove! required for GNU/FHS-ish install from tarball 35 use lib '.'; ##uselib## 36 36 37 use DNSDB qw(:ALL); 37 38 … … 41 42 # Let's do these templates right... 42 43 my $templatedir = "templates"; 43 my $sessiondir = "session";44 44 45 45 # Set up the CGI object... … … 64 64 # persistent stuff needed on most/all pages 65 65 my $sid = ($webvar{sid} ? $webvar{sid} : undef); 66 my $session = new CGI::Session("driver:File", $sid, {Directory => $ sessiondir})66 my $session = new CGI::Session("driver:File", $sid, {Directory => $config{sessiondir}}) 67 67 or die CGI::Session->errstr(); 68 68 #$sid = $session->id() if !$sid;
Note:
See TracChangeset
for help on using the changeset viewer.