diff --git a/DEBIAN/control b/DEBIAN/control index 056fbbd..6c9a042 100644 --- a/DEBIAN/control +++ b/DEBIAN/control @@ -3,7 +3,7 @@ Version: 0.3.0-1 Section: base Priority: optional 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 Maintainer: Lars Kruse 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 debian distribution: * 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/ diff --git a/cbox-tree.d/usr/share/doc/cryptobox/README.Debian b/cbox-tree.d/usr/share/doc/cryptobox/README.Debian index 94e6669..97db60a 100644 --- a/cbox-tree.d/usr/share/doc/cryptobox/README.Debian +++ b/cbox-tree.d/usr/share/doc/cryptobox/README.Debian @@ -3,13 +3,14 @@ CryptoBox for Debian 1) additional dependencies you need the following packages, which are not (yet) part of the main debian distribution: * 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 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: (file /etc/apache???/conf.d/cryptobox) -ScriptAlias /cryptobox /var/www/cgi-bin/cryptobox.pl +AliasMatch ^/cryptobox(.+) /var/www/cryptobox$1 +ScriptAlias /cryptobox /var/www/cgi-bin/cryptobox.pl -- Lars Kruse Wed, 30 Nov 2005 01:05:45 +0100 diff --git a/cbox-tree.d/var/www/cgi-bin/cryptobox.pl b/cbox-tree.d/var/www/cgi-bin/cryptobox.pl index a39555e..ca128bd 100755 --- a/cbox-tree.d/var/www/cgi-bin/cryptobox.pl +++ b/cbox-tree.d/var/www/cgi-bin/cryptobox.pl @@ -20,7 +20,7 @@ use ConfigFile; my $CONFIG_FILE = '/etc/cryptobox/cryptobox.conf'; -my ($pagedata, $pagename); +my $pagedata; my ($LANGUAGE_DIR, $DEFAULT_LANGUAGE, $HTML_TEMPLATE_DIR, $DOC_DIR); my ($CB_SCRIPT, $LOG_FILE, $IS_DEVEL); @@ -244,7 +244,6 @@ sub get_admin_pw sub render { - $pagedata->setValue("PageName","$pagename"); my $pagefile = "$HTML_TEMPLATE_DIR/main.cs"; print "Content-Type: text/html\n\n"; @@ -320,10 +319,10 @@ sub validate_ip my @octets = split /\./, $ip; return 0 if ($#octets == 4); # check for values and non-digits - 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[2] < 0) || (@octets[2] >= 255) || (@octets[2] =~ /\D/)); - return 0 if ((@octets[3] <= 0) || (@octets[3] >= 255) || (@octets[3] =~ /\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[2] < 0) || ($octets[2] >= 255) || ($octets[2] =~ /\D/)); + return 0 if (($octets[3] <= 0) || ($octets[3] >= 255) || ($octets[3] =~ /\D/)); return 1; } @@ -663,7 +662,7 @@ if ( ! &check_ssl()) { # check state of the cryptobox $pagedata->setValue('Data.Status.Config', &check_config() ? 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(); $pagedata->setValue('Data.Status.IP', "$output"); diff --git a/cbox-tree.d/var/www/cryptobox b/cbox-tree.d/var/www/cryptobox deleted file mode 120000 index f2f2b71..0000000 --- a/cbox-tree.d/var/www/cryptobox +++ /dev/null @@ -1 +0,0 @@ -cgi-bin/cryptobox.pl \ No newline at end of file