imporved some perl code structures
removed cgi-symlink (part I of directory layout change) debian packaging improved
This commit is contained in:
parent
def6578c9e
commit
c0e10ca13a
4 changed files with 11 additions and 12 deletions
|
@ -3,7 +3,7 @@ Version: 0.3.0-1
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: bash (>=2.0), sed (>=4.0), coreutils, grep (>=2.0), perl, httpd-cgi, hashalot, libconfigfile-perl, cryptsetup-luks, dmsetup
|
Depends: bash (>=2.0), sed (>=4.0), coreutils, grep (>=2.0), perl, httpd-cgi, hashalot, libconfigfile-perl, cryptsetup-luks, dmsetup, at
|
||||||
Suggests: stunnel, cron, iptables, samba
|
Suggests: stunnel, cron, iptables, samba
|
||||||
Maintainer: Lars Kruse <devel@sumpfralle.de>
|
Maintainer: Lars Kruse <devel@sumpfralle.de>
|
||||||
Description: Web interface for encrypting fileserver
|
Description: Web interface for encrypting fileserver
|
||||||
|
@ -15,5 +15,5 @@ Description: Web interface for encrypting fileserver
|
||||||
This package depends on the following packages, that are not part of the main
|
This package depends on the following packages, that are not part of the main
|
||||||
debian distribution:
|
debian distribution:
|
||||||
* cryptsetup_luks - http://luks.endorphin.org/masses
|
* cryptsetup_luks - http://luks.endorphin.org/masses
|
||||||
* clearsilver (perl bindings) - http://www.clearsilver.net/downloads/
|
* clearsilver for perl (>= 0.9.14) - http://www.clearsilver.net/downloads/
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,13 @@ CryptoBox for Debian
|
||||||
1) additional dependencies
|
1) additional dependencies
|
||||||
you need the following packages, which are not (yet) part of the main debian distribution:
|
you need the following packages, which are not (yet) part of the main debian distribution:
|
||||||
* cryptsetup_luks - http://luks.endorphin.org/masses
|
* cryptsetup_luks - http://luks.endorphin.org/masses
|
||||||
* clearsilver (perl bindings) - http://www.clearsilver.net/downloads/
|
* clearsilver for perl (>=0.9.14) - http://www.clearsilver.net/downloads/
|
||||||
|
|
||||||
2) cgi-bin
|
2) cgi-bin
|
||||||
If you do not use thttpd as your webserver, you should add the cgi-bin path to
|
If you do not use thttpd as your webserver, you should add the cgi-bin path to
|
||||||
your script directory. For apache this would be something like the following:
|
your script directory. For apache this would be something like the following:
|
||||||
(file /etc/apache???/conf.d/cryptobox)
|
(file /etc/apache???/conf.d/cryptobox)
|
||||||
|
AliasMatch ^/cryptobox(.+) /var/www/cryptobox$1
|
||||||
ScriptAlias /cryptobox /var/www/cgi-bin/cryptobox.pl
|
ScriptAlias /cryptobox /var/www/cgi-bin/cryptobox.pl
|
||||||
|
|
||||||
-- Lars Kruse <devel@sumpfralle.de> Wed, 30 Nov 2005 01:05:45 +0100
|
-- Lars Kruse <devel@sumpfralle.de> Wed, 30 Nov 2005 01:05:45 +0100
|
||||||
|
|
|
@ -20,7 +20,7 @@ use ConfigFile;
|
||||||
|
|
||||||
my $CONFIG_FILE = '/etc/cryptobox/cryptobox.conf';
|
my $CONFIG_FILE = '/etc/cryptobox/cryptobox.conf';
|
||||||
|
|
||||||
my ($pagedata, $pagename);
|
my $pagedata;
|
||||||
|
|
||||||
my ($LANGUAGE_DIR, $DEFAULT_LANGUAGE, $HTML_TEMPLATE_DIR, $DOC_DIR);
|
my ($LANGUAGE_DIR, $DEFAULT_LANGUAGE, $HTML_TEMPLATE_DIR, $DOC_DIR);
|
||||||
my ($CB_SCRIPT, $LOG_FILE, $IS_DEVEL);
|
my ($CB_SCRIPT, $LOG_FILE, $IS_DEVEL);
|
||||||
|
@ -244,7 +244,6 @@ sub get_admin_pw
|
||||||
|
|
||||||
sub render
|
sub render
|
||||||
{
|
{
|
||||||
$pagedata->setValue("PageName","$pagename");
|
|
||||||
my $pagefile = "$HTML_TEMPLATE_DIR/main.cs";
|
my $pagefile = "$HTML_TEMPLATE_DIR/main.cs";
|
||||||
print "Content-Type: text/html\n\n";
|
print "Content-Type: text/html\n\n";
|
||||||
|
|
||||||
|
@ -320,10 +319,10 @@ sub validate_ip
|
||||||
my @octets = split /\./, $ip;
|
my @octets = split /\./, $ip;
|
||||||
return 0 if ($#octets == 4);
|
return 0 if ($#octets == 4);
|
||||||
# check for values and non-digits
|
# check for values and non-digits
|
||||||
return 0 if ((@octets[0] <= 0) || (@octets[0] >= 255) || (@octets[0] =~ /\D/));
|
return 0 if (($octets[0] <= 0) || ($octets[0] >= 255) || ($octets[0] =~ /\D/));
|
||||||
return 0 if ((@octets[1] < 0) || (@octets[1] >= 255) || (@octets[1] =~ /\D/));
|
return 0 if (($octets[1] < 0) || ($octets[1] >= 255) || ($octets[1] =~ /\D/));
|
||||||
return 0 if ((@octets[2] < 0) || (@octets[2] >= 255) || (@octets[2] =~ /\D/));
|
return 0 if (($octets[2] < 0) || ($octets[2] >= 255) || ($octets[2] =~ /\D/));
|
||||||
return 0 if ((@octets[3] <= 0) || (@octets[3] >= 255) || (@octets[3] =~ /\D/));
|
return 0 if (($octets[3] <= 0) || ($octets[3] >= 255) || ($octets[3] =~ /\D/));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,7 +662,7 @@ if ( ! &check_ssl()) {
|
||||||
# check state of the cryptobox
|
# check state of the cryptobox
|
||||||
$pagedata->setValue('Data.Status.Config', &check_config() ? 1 : 0);
|
$pagedata->setValue('Data.Status.Config', &check_config() ? 1 : 0);
|
||||||
$pagedata->setValue('Data.Status.InitRunning', &check_init_running() ? 1 : 0);
|
$pagedata->setValue('Data.Status.InitRunning', &check_init_running() ? 1 : 0);
|
||||||
$pagedata->setValue('Data.Status.Mounted', &check_mounted() ? 1 : 0);
|
$pagedata->setValue('Data.Status.Mounted', &check_mounted() ? 1 : 0) if (&check_config());
|
||||||
my $output = &get_current_ip();
|
my $output = &get_current_ip();
|
||||||
$pagedata->setValue('Data.Status.IP', "$output");
|
$pagedata->setValue('Data.Status.IP', "$output");
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
cgi-bin/cryptobox.pl
|
|
Loading…
Reference in a new issue