Apache-DnsZone
view release on metacpan or search on metacpan
171819202122232425262728293031323334353637
USE_APACI=1 \
EVERYTHING=1 \
APACHE_PREFIX=/usr/
local
/modperl
$ make
$ make test
$ make install
That should get your mod_perl running.
Recommended modules to install
before
installing DnsZone: Bundle::Apache,
Apache::Request, Apache::AuthCookie, Apache::AuthTicket, Net::DNS,'
CGI::FastTemplate, Email::Valid, Bundle::ABH.
You might be forced to download Apache::Request 0.3103 by hand and
To install DnsZone:
$ perl Makefile.PL
$ make
69707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
TransferLog logs/dnszone-access_log
PerlSetVar DnsZoneDBsrc
'dbi:mysql:dnszone'
PerlSetVar DnsZoneDBuser
'dnszone'
PerlSetVar DnsZoneDBpass
'*******'
PerlSetVar DnsZoneDebugLevel 1
PerlSetVar DnsZoneLangDir
'/usr/local/modperl/dnszone'
PerlSetVar DnsZoneTemplateDir
'/usr/local/modperl/dnszone/template'
PerlSetVar DnsZoneLoginLang
'en'
# or 'de' 'se' 'dk' 'fr' 'it'
# DnsZoneLoginLang is used if the browser doesn't send an 'Accept-Language' header and the language isn't in DnsZone already
PerlModule Apache::DnsZone::AuthCookie
PerlSetVar DnsZoneTicketTable
'tickets:ticket_hash:ts'
PerlSetVar DnsZoneTicketUserTable
'users:username:password'
PerlSetVar DnsZoneTicketPasswordStyle cleartext
PerlSetVar DnsZoneTicketSecretTable
'ticketsecrets:sec_data:sec_version'
PerlSetVar DnsZoneTicketExpires 60
PerlSetVar DnsZoneTicketLogoutURI /
PerlSetVar DnsZoneTicketLoginHandler /login
PerlSetVar DnsZoneTicketIdleTimeout 10
PerlSetVar DnsZonePath /
PerlSetVar DnsZoneLoginScript /loginform
<Location /admin>
SetHandler perl-script
PerlHandler Apache::DnsZone
AuthType Apache::DnsZone::AuthCookie
AuthName DnsZone
PerlAuthenHandler Apache::DnsZone::AuthCookie->authenticate
PerlAuthzHandler Apache::DnsZone::AuthCookie->authorize
</Location>
<Location /loginform>
SetHandler perl-script
Perlhandler Apache::DnsZone::AuthCookie->login_screen
AuthType Apache::DnsZone::AuthCookie
AuthName DnsZone
</Location>
<Location /login>
SetHandler perl-script
PerlHandler Apache::DnsZone::AuthCookie->login
AuthType Apache::DnsZone::AuthCookie
AuthName DnsZone
</Location>
</VirtualHost>
Copy the contents of htdocs/ to /path/to/your/apache/htdocs
$ cp -R htdocs/* /path/to/your/apache/htdocs
Now you need to
import
the tables that DnsZone needs into your database.
2345678910111213141516171819202122MANIFEST
INSTALL
conf/dnszone.conf
lib/Apache/DnsZone/DB/MySQL.pm
lib/Apache/DnsZone/DB/Postgresql.pm
lib/Apache/DnsZone/DB/Oracle.pm
lib/Apache/DnsZone/Config.pm
lib/Apache/DnsZone/DB.pm
lib/Apache/DnsZone/Resolver.pm
lib/Apache/DnsZone/Language.pm
lib/Apache/DnsZone/AuthCookie.pm
lib/Apache/DnsZone.pm
Makefile.PL
test.pl
sql/mysql.sql
sql/postgresql.sql
sql/oracle.sql
sql/upgrade/mysql-0.1-0.2.sql
bin/mysql/addzone.pl
bin/mysql/addreversezone.pl
bin/mysql/conf.pl
Makefile.PL view on Meta::CPAN
456789101112131415161718192021222324use
ExtUtils::MakeMaker;
use
Apache::src ();
require
5.005;
WriteMakefile(
'NAME'
=> __PACKAGE__,
'VERSION_FROM'
=>
'lib/Apache/DnsZone.pm'
,
'INC'
=> Apache::src->new->inc,
'PREREQ_PM'
=> {
'Apache::AuthCookie'
=> 0,
'Apache::AuthTicket'
=> 0,
'Apache::Request'
=> 0.3103,
'mod_perl'
=> 1.24,
'Net::DNS'
=> 0.12,
'DBI'
=> 1.13,
'Email::Valid'
=> 0,
'CGI::FastTemplate'
=> 1.09,
'MLDBM'
=> 0,
'GDBM_File'
=> 0,
'Net::IP'
=> 0
60616263646566676869707172737475767778798081[Fixed] Duplicate records || round robin! + database lookups
[Fixed]
$DEBUG
record in templates,
for
giving information about duplicate hostnames and bad hostnames/ips/whatever Call it
$EXPLANATION
?
[Fixed] Clean up
after
old header outputing stuff
[Fixed] Check wheter the
"edit"
submission is the changed at all
[Fixed]
import
scripts!
[Fixed] soa_locks? are soa locks enforced?
[Fixed] || Apache->request on all handlers
[Fixed]
redo
global vars shit! instead of
$DnsZone::whatever
, just have a global
my
$whatever
[Fixed] Ability to set a
default
language
for
login page? (DnsZoneLoginLang); Default login language!!
[Fixed] cookie stuff error codes in language files
uc
(cookiereturn)
[Fixed] Implement own Apache::AuthCookie derivate
with
templates! (
use
Apache::(AuthTicket|AuthCookieDBI) as examples)
[Fixed] TimeOut of cookie + 15 minute renewal of
each
cookie! If not done anything
for
the
last
15 minutes and request another
page
=> re-login; subclass of Apache::AuthCookie; Needs to take defaults from Apache::DnsZone::Config
[Fixed] Login template needs to be unfucked!
[Fixed] Maybe a layer above the menu
system
so that menus and stuff wont be on login page?
[Fixed] Template
system
outputter (so menu will only be shown on non-login page && list_domains (maybe even show all the domains you have in the url?))
[Fixed] logout?
[Fixed] is_updated_SOA? (Is SOA updated in edit submit request)
[Fixed] GET/POST where?
POST
=>
when
submitting forms to avoid 4K limit
[Fixed] is_updated_* ttl eq and not == ?
[Fixed] which pages need caching and which don't? All pages should have caching turned off so
no
pages will be in cache
if
user is not authenticated
[Fixed] Settings, Logout, Menu, List domain texts! Menu
with
list_domains and settings and logout (
if
appropriate)
[Fixed] SSL - why would there be any issues
with
using ssl?
conf/dnszone.conf view on Meta::CPAN
9101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
ErrorLog logs/dnszone-error_log
TransferLog logs/dnszone-access_log
PerlSetVar DnsZoneDBsrc
'dbi:mysql:dnszone'
PerlSetVar DnsZoneDBuser
'dnszone'
PerlSetVar DnsZoneDBpass
'*******'
PerlSetVar DnsZoneDebugLevel 1
PerlSetVar DnsZoneLangDir
'/usr/local/modperl/dnszone'
PerlSetVar DnsZoneTemplateDir
'/usr/local/modperl/dnszone/template'
PerlSetVar DnsZoneLoginLang
'en'
PerlSetVar DnsZoneLogoutHandler /logout
PerlModule Apache::DnsZone::AuthCookie
PerlSetVar DnsZoneTicketTable
'tickets:ticket_hash:ts'
PerlSetVar DnsZoneTicketUserTable
'users:username:password'
PerlSetVar DnsZoneTicketPasswordStyle cleartext
PerlSetVar DnsZoneTicketSecretTable
'ticketsecrets:sec_data:sec_version'
PerlSetVar DnsZoneTicketExpires 60
PerlSetVar DnsZoneTicketLogoutURI /
PerlSetVar DnsZoneTicketLoginHandler /login
PerlSetVar DnsZoneTicketIdleTimeout 10
PerlSetVar DnsZonePath /
PerlSetVar DnsZoneLoginScript /loginform
<Location /admin>
SetHandler perl-script
PerlHandler Apache::DnsZone
AuthType Apache::DnsZone::AuthCookie
AuthName DnsZone
PerlAuthenHandler Apache::DnsZone::AuthCookie->authenticate
PerlAuthzHandler Apache::DnsZone::AuthCookie->authorize
require
valid-user
</Location>
<Location /loginform>
SetHandler perl-script
Perlhandler Apache::DnsZone::AuthCookie->login_screen
AuthType Apache::DnsZone::AuthCookie
AuthName DnsZone
</Location>
<Location /login>
SetHandler perl-script
PerlHandler Apache::DnsZone::AuthCookie->login
AuthType Apache::DnsZone::AuthCookie
AuthName DnsZone
</Location>
<Location /logout>
SetHandler perl-script
PerlHandler Apache::DnsZone::AuthCookie->logout
AuthType Apache::DnsZone::AuthCookie
AuthName DnsZone
</Location>
</VirtualHost>
lang/br.lang view on Meta::CPAN
666768697071727374757677787980818283848586
'ERROR_REFRESH'
=>
'Valor do Tempo de Atualização Inválido'
,
'ERROR_RETRY'
=>
'Valor para o Tempo de Tentativa Inválido'
,
'ERROR_EXPIRE'
=>
'Valor do Tempo de Expiração Inválido'
,
'FILLOUT_FIELDS'
=>
'Por Favor Complete os Seguintes Campos:'
,
'EDIT_FIELDS'
=>
'Por Favor Altere os Campos:'
,
'DELETE_RECORD'
=>
'Você Irá Apagar os Seguintes Registros:'
,
'USERNAME'
=>
'Usuário'
,
'PASSWORD'
=>
'Senha'
,
'LOGIN_BUTTON'
=>
'Entrar'
,
'PAGE_LOGIN'
=>
'Página de Login'
,
'LOGIN_NOTE'
=>
'Nota: Configure seu Navegador para Aceitar Cooks para poder se logar. Sua Senha Será Solicitada depois de algum tempo.'
,
'IDLE_TIMEOUT'
=>
'Motivo da Desconexãoao: Tempo Esgotado'
,
'MALFORMED_TICKET'
=>
'Motivo da Desconexão: Ticket com Malformação'
,
'INVALID_HASH'
=>
'Motivo da Desconexão: Ticket Desconhecido'
,
'EXPIRED_TICKET'
=>
'Motivo da Desconexão: Ticket Expirou'
,
'MISSING_SECRET'
=>
'Motivo da Desconexão: Server secret não pode ser carregado'
,
'TAMPERED_HASH'
=>
'Motivo da Desconexão: Ticket dados alterados com'
,
'PASSWORD_CHANGE'
=>
'A senha só será alterada se você digitar algo nos campos abaixo.'
);
return
%text
;
lang/de.lang view on Meta::CPAN
666768697071727374757677787980818283848586
'ERROR_REFRESH'
=>
'Ungültiger Wert für Aktualisierungszeit'
,
'ERROR_RETRY'
=>
'Ungültiger Wert für Wiederholungszeit'
,
'ERROR_EXPIRE'
=>
'Ungültiger Wert für Ablaufzeit'
,
'FILLOUT_FIELDS'
=>
'Bitte füllen sie die folgenden Felder aus:'
,
'EDIT_FIELDS'
=>
'Bitte bearbeiten sie diese Felder:'
,
'DELETE_RECORD'
=>
'Sie sind dabei folgenden Eintrag zu löschen:'
,
'USERNAME'
=>
'Benutzername'
,
'PASSWORD'
=>
'Passwort'
,
'LOGIN_BUTTON'
=>
'Anmelden'
,
'PAGE_LOGIN'
=>
'Anmeldeseite'
,
'LOGIN_NOTE'
=>
'Anmerkung: Cookies müssen bei Ihrem Browser aktiviert sein, um sich anmelden zu können. Nach einiger Zeit werden Sie aufgefordert sicher erneut anzumelden.'
,
'IDLE_TIMEOUT'
=>
'Abmeldegrund: Zeitablauf nach Untätigkeit'
,
'MALFORMED_TICKET'
=>
'Abmeldegrund: Ticket beschädigt'
,
'INVALID_HASH'
=>
'Abmeldegrund: Unbekanntes Ticket'
,
'EXPIRED_TICKET'
=>
'Abmeldegrund: Ticket ist abgelaufen'
,
'MISSING_SECRET'
=>
'Abmeldegrund: Server Secret konnte nicht geladen werden'
,
'TAMPERED_HASH'
=>
'Abmeldegrund: Ticket Daten wurden manipuliert'
,
'PASSWORD_CHANGE'
=>
'Das Passwort wird nur verändert wenn Sie die untenstehenden Felder ausfüllen.'
);
return
%text
;
lib/Apache/DnsZone.pm view on Meta::CPAN
121314151617181920212223242526272829303132%EXPORT_TAGS
= ();
$VERSION
=
'0.2'
;
use
Apache ();
use
Apache::Request ();
use
Apache::DnsZone::DB;
use
Net::DNS;
use
HTML::Entities;
use
Email::Valid;
use
CGI::FastTemplate;
use
Data::Dumper;
my
%lang
= ();
my
$cfg
;
my
$res
;
lib/Apache/DnsZone.pm view on Meta::CPAN
879880881882883884885886887888889890891892893894895896897898899
$dbh
->
close
();
return
OK;
}
sub
logout {
my
$r
=
shift
|| Apache->request();
Debug(3,
qq{calling logout()}
);
init(
$r
);
output_redirect(
$r
, 1,
$cfg
->{
'cfg'
}->{DnsZoneLogoutHandler});
# $r->push_handlers(PerlHandler => sub {
# Apache::DnsZone::AuthCookie->logout(Apache->request);
# });
$dbh
->
close
();
return
REDIRECT;
}
sub
list_domains {
my
$r
=
shift
|| Apache->request();
Debug(3,
qq{calling list_domains()}
);
init(
$r
);
my
(
$uid
,
,
$lang_id
,
$lang
) =
$dbh
->get_user_info(
$r
->connection->user);
lib/Apache/DnsZone/AuthCookie.pm view on Meta::CPAN
123456789101112131415161718192021222324252627282930313233package
Apache::DnsZone::AuthCookie;
# $Id: AuthCookie.pm,v 1.8 2001/06/03 11:10:23 thomas Exp $
use
strict;
use
Apache::AuthTicket ();
use
Apache::AuthCookie ();
use
Apache::DnsZone;
use
Apache::DnsZone::DB;
use
CGI::FastTemplate ();
use
DBI;
(
$VERSION
) =
qq$Revision: 1.8 $
=~ /([\d\.]+)/;
@ISA
=
qw(Apache::AuthTicket)
;
sub
make_login_screen {
my
(
$self
,
$r
,
$action
,
$destination
) =
@_
;
my
$reason
=
$r
->prev->subprocess_env(
"AuthCookieReason"
);
my
$ticket_reason
=
undef
;
Apache::DnsZone::Debug(5,
qq{make_login_screen called}
);
if
(
$reason
eq
'bad_cookie'
) {
$ticket_reason
=
$r
->prev->subprocess_env(
"AuthTicketReason"
);
}
my
$cfg
= Apache::DnsZone::Config->new(
$r
);
my
$lang
=
$cfg
->{
'cfg'
}->{DnsZoneLoginLang};
# choose default login language
lib/Apache/DnsZone/AuthCookie.pm view on Meta::CPAN
6970717273747576777879808182838485868788
Apache::DnsZone::output_headers(
$r
, 1,
length
(${
$content_ref
}));
$r
->
(${
$content_ref
});
return
OK;
}
sub
dbi_connect {
my
(
$this
) =
@_
;
Apache::DnsZone::Debug(5,
qq{Apache::DnsZone::AuthCookie::dbi_connect called}
);
my
$r
=
$this
->request;
my
$cfg
= Apache::DnsZone::Config->new(
$r
);
my
$dbh
= Apache::DnsZone::DB->new(
$cfg
);
return
$dbh
->db();
}
1;
( run in 0.578 second using v1.01-cache-2.11-cpan-eab888a1d7d )