diff --git a/cbox-dev.sh b/cbox-dev.sh index 47f06ec..e91f735 100644 --- a/cbox-dev.sh +++ b/cbox-dev.sh @@ -178,7 +178,7 @@ case "$1" in ssh -F "$SSH_CONFIG_FILE" "$SSH_HOST" ;; help|--help ) - echo "Syntax: `basename $0` ( qemu | chroot | upload | diff | merge | help )" + echo "Syntax: `basename $0` ( qemu | chroot | upload | diff | merge | ssh | help )" echo ;; * ) diff --git a/cbox-tree.d/usr/lib/cryptobox/chroot-start.sh b/cbox-tree.d/usr/lib/cryptobox/chroot-start.sh index 9cf4841..2e277b5 100755 --- a/cbox-tree.d/usr/lib/cryptobox/chroot-start.sh +++ b/cbox-tree.d/usr/lib/cryptobox/chroot-start.sh @@ -41,5 +41,6 @@ if [ $# -gt 0 ] fi umount -n "$MNT_DST" -umount -n proc +# check for an active chroot environment +[ -z "$(ps -e | grep chroot-start.sh)" ] && umount -n proc rm -r "$TMP_DIR" diff --git a/cbox-tree.d/usr/share/cryptobox/templates/doc.cs b/cbox-tree.d/usr/share/cryptobox/templates/doc.cs index eddc90d..db7942a 100644 --- a/cbox-tree.d/usr/share/cryptobox/templates/doc.cs +++ b/cbox-tree.d/usr/share/cryptobox/templates/doc.cs @@ -1,4 +1,4 @@ -
+
diff --git a/cbox-tree.d/usr/share/cryptobox/templates/header.cs b/cbox-tree.d/usr/share/cryptobox/templates/header.cs index 84d45f0..f787a55 100644 --- a/cbox-tree.d/usr/share/cryptobox/templates/header.cs +++ b/cbox-tree.d/usr/share/cryptobox/templates/header.cs @@ -1,9 +1,9 @@ - + CryptoBox - + diff --git a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBox.html b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBox.html index 5618dbe..8da26f0 100644 --- a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBox.html +++ b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBox.html @@ -75,14 +75,14 @@

Überblick

-

Die CryptoBox ist eine [WikiPediaDe]Live-CD mit der sich jeder alte Rechner in Sekundenschnelle in einen verschlüsselnden Server umwandeln lässt. Damit kannst du sensible Daten speichern, ohne dass du etwas über [WikiPediaDe]Kryptografie wissen musst.

+

Die CryptoBox ist eine Live-CD mit der sich jeder alte Rechner in Sekundenschnelle in einen verschlüsselnden Server umwandeln lässt. Damit kannst du sensible Daten speichern, ohne dass du etwas über Kryptografie wissen musst.

Was kann die CryptoBox?

Komponenten

@@ -94,9 +98,9 @@

dfsbuild

-

Das Linux Grundsystem für die CryptoBox CD wird mit [DebianPackage]dfsbuild gebaut. Das ist ein Programm, welches eine [WWW] Debian Live-CD erzeugt.
+

Das Linux Grundsystem für die CryptoBox CD wird mit dfsbuild gebaut. Das ist ein Programm, welches eine Debian Live-CD erzeugt.
(Wir entwickeln die CryptoBox bisher auf Debian/Linux-Systemen. Prinzipiell dürfte es auch mit deiner Lieblingsdistro funktionieren, nur der anfängliche Einrichtungsaufwand wird dadurch größer.)

-

Für "dfsbuild" bietet sich [DebianPackage]apt-cacher an. Damit brauchst du nicht für jeden Bau des Grundsystems alle Debian-Pakete erneut herunter laden.

+

Für "dfsbuild" bietet sich apt-cacher an. Damit brauchst du nicht für jeden Bau des Grundsystems alle Debian-Pakete erneut herunter laden.

Installation:

Die dfsbuild-Dokumentation ist noch recht spärlich. Du kommst aber kaum in direkten Kontakt mit dfsbuild, da es durch 'cbox-build' aufgerufen wird. Die folgenden Links helfen dir vielleicht trotzdem weiter:

cbox-build

Die wichtige Kleinarbeit, damit aus dem dfsbuild-System eine CryptoBox wird, erledigt cbox-build.sh.
- Das Script und die bestehenden Konfigurationsdateien liegen im [SubVersion]cryptobox-Repository.

+ Das Script und die bestehenden Konfigurationsdateien liegen im cryptobox-Repository.

Mit diesem Script baust du deine eigene CryptoBox-CD. Hier ein verkürzter Überblick:

@@ -319,7 +323,7 @@
  • Du brauchst etwa 1GB Plattenplatz für den Bau einer Cryptobox. Das eigentliche CD-Image wird aber nur knapp 250MB groß.

  • -
  • Für dfsbuild bietet sich [DebianPackage]apt-cacher an. Damit müssen die Debian-Pakete nicht bei jedem neuen dfsbuild-Vorgang erneut heruntergeladen werden.

    +
  • Für dfsbuild bietet sich apt-cacher an. Damit müssen die Debian-Pakete nicht bei jedem neuen dfsbuild-Vorgang erneut heruntergeladen werden.

  • cbox-build muss für folgende Vorgänge mit root Rechten laufen: dfsbuild, config, chroot, revert

  • @@ -360,7 +364,7 @@ CONFIG_TUN=m -

    last edited 2005-09-05 16:19:53 by lars

    +

    last edited 2005-09-05 20:22:46 by lars

    diff --git a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevCustomConfigure.html b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevCustomConfigure.html new file mode 100644 index 0000000..f94bb79 --- /dev/null +++ b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevCustomConfigure.html @@ -0,0 +1,68 @@ + + +
      + +
    1. +Overview +
    2. + +
    3. +Locations +
    4. + +
    5. +Examples +
    6. + +
    +

    +
    +

    +

    back to CryptoBoxDev

    + +

    Overview

    + +

    You may change nearly every aspect of the CryptoBox by using the custom configuration hook directory.

    +

    Any script inside of this directory will be executed after the default configuration procedure (see CryptoBoxDevWorkFlow).

    +

    The order of execution is defined by the names of the scripts (alphabetically).

    + +

    Locations

    + +

    Some example customization scripts can be found in configure-examples.d/.

    +

    You may put your scripts into configure-local.d/. They will be sourced by cbox-build.sh.

    + +

    Examples

    + +

    The examples in configure-examples.d/ can be copied to configure-local.d/ and adjusted to your needs.

    +
    +
    set_default_ip
    +

    change the default IP address of the CryptoBox

    +
    +
    set_default_language
    +

    set the default language

    +
    +
    set_default_timeout
    +

    set the default idle time for automatic unmounting

    +
    +
    set_hostname
    +

    change the default hostname

    +
    +
    set_root_pw
    +

    change the password of root (only useful for a development CryptoBox)

    +
    +
    import_authorized_keys
    +

    upload a ssh key for passwordless access to a development CryptoBox

    +
    +
    set_scan_devices
    +

    where to look for usable harddisks

    +
    +
    + + + +

    last edited 2005-09-05 20:16:37 by lars

    + + + + + diff --git a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevPreparation.html b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevPreparation.html index 60073eb..e8382aa 100644 --- a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevPreparation.html +++ b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevPreparation.html @@ -26,27 +26,29 @@

    Software requirements

    -

    We use [WWW] Debian as our development environment. This was a natural choice, as the CryptoBox-LiveCD is also based on Debian. Other distributions should work too, of course - [Acronym]YMMV.

    +

    We use Debian as our development environment. This was a natural choice, as the CryptoBox-LiveCD is also based on Debian. Other distributions should work too, of course - YMMV.

    required:

    recommended:

    Get the source

    -

    Download the latest release from our [WWW] subversion-Repository: +

    Download the latest release from our subversion-Repository:

     svn checkout https://svn.systemausfall.org/svn/cryptobox/trunk 
    @@ -64,7 +66,7 @@ svn checkout https://svn.systemausfall.org/svn/cryptobox/trunk -

    last edited 2005-09-05 13:50:51 by lars

    +

    last edited 2005-09-05 18:48:32 by lars

    diff --git a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevValidation.html b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevValidation.html new file mode 100644 index 0000000..89bcb77 --- /dev/null +++ b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevValidation.html @@ -0,0 +1,61 @@ + + +
      + +
    1. +Overview +
    2. + +
    3. +Validate +
    4. + +
    5. +How to create a test +
    6. + +
    +

    +
    +

    + +

    Overview

    + +

    The validation feature allows to check the programming logic of the CryptoBox. A lot of test cases are defined to test as many functions of the CryptoBox as possible.

    +

    The requests are processed with curl.

    +

    The received web page is saved to allow a later design review or css debugging.

    +

    The current state of the CryptoBox is represented by ten single values (e.g.: box is configured, IP of the box, current language setting, ...), which are invisibly a part of each html page (as comments). The returned status of every request is compared to the predicted value of the test case.

    +

    Similar test cases are pooled into test groups (e.g.: initialization, configuration and mounting).

    + +

    Validate

    + +

    Run tools/validate.sh check_all to conduct all tests of all groups. See tools/validate.sh help for other actions.

    +

    The results will be saved at validation/report.

    +

    In addition to every single retrieved page, a html page called summary.html is created, which contains the state checks of all tests in a group.

    + +

    How to create a test

    + +

    All test cases can be found in validation/test-cases.

    +

    Every test consists of:

    +
    +
    input.curl
    +

    the configuration file for the curl request

    +
    +
    output
    +

    the predicted state of the CryptoBox after the call

    +
    +
    description
    +

    a short description of the test (will be used for the summary)

    +
    +
    +

    Use the existing test cases as a template for new tests.

    +

    Any logical branch of the web interface CGI should be validated by a test case.

    + + + +

    last edited 2005-09-05 19:48:55 by lars

    + + + + + diff --git a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevWorkFlow.html b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevWorkFlow.html index 5b12da3..98b8459 100644 --- a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevWorkFlow.html +++ b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxDevWorkFlow.html @@ -82,7 +82,7 @@

    Run ./cbox-build.sh dfsbuild to create the base system for the LiveCD.

    The result can be found in _builddir/cd1/image.

    -

    If you do not want to use the [DebianPackage]apt-cacher to save bandwith and time, then you should modify the mirror-setting in dfs.cbox.conf (see CryptoBoxDevCustomBuild for details).

    +

    If you do not want to use the apt-cacher to save bandwith and time, then you should modify the mirror-setting in dfs-cbox.conf (see CryptoBoxDevCustomBuild for details).

    Configure the base image

    @@ -112,12 +112,12 @@

    Chroot: quick & dirty tests

    If you modified the perl- or shell-scripts of the CryptoBox, then you can check for syntax errors by running them in a chroot environment. Be careful: you have access to all ressources of your computer, while you are working within a chroot environment - so you can easily repartition your real disk ...

    -

    To start a chroot environment, you can execute ./cbox-build.sh chroot.

    +

    To start a chroot environment, you can execute ./cbox-dev.sh chroot.

    For more intensive tests, you may use qemu (see below) or burn real LiveCDs - of course this would take much more time.

    Qemu: nearly complete emulation

    -

    The processor emulator [WWW] qemu allows you test the CryptoBox in a virtual environment, that is completely separated from your real computer's resources. It is the tool of choice, if you do nat have a real computer around for testing.

    +

    The processor emulator qemu allows you test the CryptoBox in a virtual environment, that is completely separated from your real computer's resources. It is the tool of choice, if you do nat have a real computer around for testing.

    Beware - there are some problems, when using qemu:

    • smbd does not start (segfault)

      @@ -125,27 +125,27 @@
    • ???

    -

    To start a qemu emulation of the iso image, you may type: ./cbox-build.sh qemu.

    +

    To start a qemu emulation of the iso image, you may type: ./cbox-dev.sh qemu.

    Debugging and merging

    This section is only useful for developers, who want to develop on a running CryptoBox system (emulated or real).

    -

    You may access the CryptoBox directly or you can use ssh to open a remote session (./cbox-build.sh ssh).

    +

    You may access the CryptoBox directly or you can use ssh to open a remote session (./cbox-dev.sh ssh).

    Development on a running system

    When you run an emulation or test a real LiveCD, you may encounter problems and bugs. To test your fixes for these problems, it is convenient, to change the running test system. Afterwards you can merge these changes to your local development copy.

    -

    Type ./cbox-build.sh diff to see the changes, you made on the running CryptoBox system.

    -

    Type ./cbox-build.sh merge to merge these changes to your local working copy.

    +

    Type ./cbox-dev.sh diff to see the changes, you made on the running CryptoBox system.

    +

    Type ./cbox-dev.sh merge to merge these changes to your local working copy.

    Uploading a new release

    Alternatively you may also upload a new version of your local working copy to the running CryptoBox system.

    -

    Type ./cbox-build.sh upload - beware: all recent changes you made to the running CryptoBox system, are lost.

    +

    Type ./cbox-dev.sh upload - beware: all recent changes you made to the running CryptoBox system, are lost.

    -

    last edited 2005-09-05 16:13:58 by lars

    +

    last edited 2005-09-05 19:45:51 by lars

    diff --git a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxEn.html b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxEn.html index c8e2d05..f7f95b5 100644 --- a/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxEn.html +++ b/cbox-tree.d/usr/share/doc/cryptobox/html/CryptoBoxEn.html @@ -32,7 +32,7 @@

    supported clients

@@ -40,7 +40,7 @@

internal fileserver

@@ -56,7 +56,7 @@

encryption

-

[WikiPedia]*nix; *bsd; Windows; Mac OS

+

*nix; *bsd; Windows; Mac OS

-

[WWW] samba (Networkshares)

+

samba (Networkshares)

-

[WikiPedia]AES via device-mapper

+

AES via device-mapper

@@ -64,7 +64,7 @@

Development

-

Browse the source code in the [SubVersion]CryptoBox-websvn

+

Browse the source code in the CryptoBox-websvn

TODO

diff --git a/cbox-tree.d/var/www/cryptobox-img/moin-inter.png b/cbox-tree.d/var/www/cryptobox-img/moin-inter.png deleted file mode 100644 index 9a62324..0000000 Binary files a/cbox-tree.d/var/www/cryptobox-img/moin-inter.png and /dev/null differ diff --git a/cbox-tree.d/var/www/cryptobox-img/moin-www.png b/cbox-tree.d/var/www/cryptobox-img/moin-www.png deleted file mode 100644 index 2534714..0000000 Binary files a/cbox-tree.d/var/www/cryptobox-img/moin-www.png and /dev/null differ diff --git a/cbox-tree.d/var/www/cryptobox.css b/cbox-tree.d/var/www/cryptobox.css index e2b7f96..0659278 100644 --- a/cbox-tree.d/var/www/cryptobox.css +++ b/cbox-tree.d/var/www/cryptobox.css @@ -17,7 +17,7 @@ body { margin-right: auto; } -#main h1, h2 { +#main h1, h2, h3 { font-family: sans-serif, arial; font-weight: normal; letter-spacing: 0.05em; @@ -27,14 +27,18 @@ body { text-align: left; } -#main h1{ +#main h1 { font-size: 2em; } -#main h2{ +#main h2 { font-size: 1.5em; } +#main h3 { + font-size: 1.2em; +} + #head { width: 600px; height: 120px; @@ -71,7 +75,6 @@ body { #content p { font-size: 0.9em; - text-indent: 1em; padding: 0 1em; text-align: justify; } @@ -288,7 +291,28 @@ button:hover { /* ------------=-=-=- documentation -=-=-=------------- */ -// #doc { } +#doc ol,ul li { + text-align: left; + margin-left: 20px; + } + +#doc dl dt { + text-align: left; + margin-left: 20px; + font-style: italic; + } + +#doc h1 { + padding-top: 25px; +} + +#doc h2 { + padding-top: 20px; +} + +#doc h3 { + padding-top: 10px; + } /* ------------=-=-=- special things -=-=-=------------- */ diff --git a/tools/userdocexport.sh b/tools/userdocexport.sh index ec53fb5..679cb99 100755 --- a/tools/userdocexport.sh +++ b/tools/userdocexport.sh @@ -5,7 +5,7 @@ set -u ROOT_DIR="$(dirname $(dirname $0))" # retrieve these pages from the wiki -PAGES="CryptoBox CryptoBoxDev CryptoBoxKonzept CryptoBoxEn CryptoBoxDevPreparation CryptoBoxDevCustomBuild CryptoBoxDevWorkFlow" +PAGES="CryptoBox CryptoBoxDev CryptoBoxKonzept CryptoBoxEn CryptoBoxDevPreparation CryptoBoxDevCustomBuild CryptoBoxDevWorkFlow CryptoBoxDevValidation CryptoBoxDevCustomConfigure" # base URL WIKI_HOST="https://systemausfall.org" @@ -37,11 +37,11 @@ for PAGE in $PAGES; do # remove all lines before and after "body" sed -i '1,/_END_OF_HEADER_/d; /_START_OF_FOOTER_/,$d' "$TMP_FILE" - #echo " adding header and footer ..." - #[ -e "${TMP_FILE}.0" ] && rm "${TMP_FILE}.0" - #mv "$TMP_FILE" "${TMP_FILE}.0" - #cat "$HEADER_FILE" "${TMP_FILE}.0" "$FOOTER_FILE" >"$TMP_FILE" - #rm "${TMP_FILE}.0" + echo " removing link images (moin specific) ..." + # remove inter-wiki images + sed -i 's#<[^<]*moin-inter.png[^>]*>##g' "$TMP_FILE" + # remove moin-www images + sed -i 's#<[^<]*moin-www.png[^>]*> ##g' "$TMP_FILE" echo " downloading requisites ..." wget --quiet --ignore-tags=a --no-clobber --page-requisites --convert-links --no-parent --no-directories --base="$WIKI_HOST$WIKI_URL" --directory-prefix="$TMP_DIR" --html-extension --force-html --input-file="$TMP_FILE" || { echo "Downloading requisites for ($PAGE_SRC) failed!"; exit 1; } diff --git a/validation/validate.sh b/tools/validate.sh similarity index 100% rename from validation/validate.sh rename to tools/validate.sh diff --git a/validation/cgi-bin/validate.sh b/validation/cgi-bin/validate.sh deleted file mode 100755 index d6134c9..0000000 --- a/validation/cgi-bin/validate.sh +++ /dev/null @@ -1,139 +0,0 @@ -#!/bin/sh - -set -eu - -# parse config file -. /etc/cryptobox/cryptobox.conf - - -function get_cgi_param() -# parse the query string for a parameter -{ - # thttpd does not set query string if it is empty - set | grep -q "^QUERY_STRING=" || return 0 - # filter the value - echo "$QUERY_STRING" | sed 's/&/\n/g' | grep "^$1=" | cut -d '=' -f 2- -} - - -function header() -{ - echo "Content-Type: text/html" - echo - echo ' - - - - CryptoBox - - - - - - ' - - echo "

Main page

" - - # nav bar - echo '
' - list_groups4generate - echo '
' - echo '
' - list_groups4display - echo '
' - - echo '


' - - if [ -n "$GROUP" ] - then echo '
' - list_cases "$GROUP" - echo '
' - fi - - echo '
' -} - - -function footer() -{ - echo '
' - echo '' -} - - -function list_groups4generate() -{ - echo '

Generate report: ' - local list=$($VALIDATE_SCRIPT list) - if [ -z "$list" ] - then echo 'none' - else for a in $list - do echo "$a " - done - fi - echo '

' -} - - -function list_groups4display() -{ - echo '

View generated report: ' - local list=$(find "$REPORT_DIR" -type d -mindepth 1 -maxdepth 1 | sort | while read a - do echo $(basename "$a"); done) - if [ -z "$list" ] - then echo 'none available' - else for a in $list - do echo "$a " - done - fi - echo '

' -} - - -function list_cases() -# parameter: group -{ - echo '

' - if [ -d "$REPORT_DIR/$1" ] - then find "$REPORT_DIR/$1" -type f -name \*.html | while read a; do basename "${a%.html}"; done | sort | while read a - do echo "$a
" - done - fi - echo '

' -} - - -function display_case() -# parameter: group case -{ - local FILE="$REPORT_DIR/$1/${2}.html" - if [ -e "$FILE" ] - then cat "$FILE" | sed '1,//,$d' - else echo "

File ($FILE) not found!

" - fi -} - - -########### main ############## - -ACTION=$(get_cgi_param action) -GROUP=$(get_cgi_param group) -CASE=$(get_cgi_param case) - -header - -if [ ! -e "$DEV_FEATURES_SCRIPT" ] - then echo '

This action is only availbale for a development CryptoBox-CD.

' -elif [ "$ACTION" = "generate" -a -n "$GROUP" ] - then $VALIDATE_SCRIPT check "$GROUP" /dev/null & - echo '

Validation will take some minutes ...

' -elif [ "$ACTION" = "display" ] - then if [ -n "$GROUP" -a -n "$CASE" ] - then display_case "$GROUP" "$CASE" - elif [ -n "$GROUP" ] - then display_case "$GROUP" "summary" - fi -else [ -n "$ACTION" ] && echo "

Unknown action ($ACTION)!

" -fi - -footer