"
+
+
+
+ ##################### input checker ##########################
+
+ def __checkEnvironment(self):
+ """here we should place all interesting checks to inform the user of problems
+
+ examples are: non-https, readonly-config, ...
+ """
+ ## TODO: maybe add an option "mount"?
+ if self.cbox.prefs.requiresPartition() and not self.cbox.prefs.getActivePartition():
+ self.dataset["Data.EnvironmentWarning"] = "ReadOnlyConfig"
+ # TODO: turn this on soon (add "not") - for now it is annoying
+ if self.__checkHTTPS():
+ self.dataset["Data.EnvironmentWarning"] = "NoSSL"
+
+
+ def __checkHTTPS(self):
+ ## check the request scheme
+ if cherrypy.request.scheme == "https": return True
+ ## check an environment setting - this is quite common behind proxies
+ try:
+ if os.environ["HTTPS"]: return True
+ except KeyError:
+ pass
+ ## check http header TODO (check pound for the name)
+ try:
+ if cherrypy.request.headers["TODO"]: return True
+ except KeyError:
+ pass
+ ## the connection seems to be unencrypted
+ return False
+
+
+ def __setWebLang(self, value):
+ guess = value
+ availLangs = self.cbox.getAvailableLanguages()
+ ## no language specified: check browser language
+ if not guess:
+ guess = self.__getPreferredBrowserLanguage(availLangs)
+ ## no preferred language or invalid language?
+ if not guess \
+ or not guess in availLangs \
+ or re.search(u'\W', guess):
+ ## warn only for invalid languages
+ if not guess is None:
+ self.cbox.log.info("invalid language choosen: %s" % guess)
+ guess = self.prefs["WebSettings"]["Language"]
+ ## maybe the language is still not valid
+ if not guess in availLangs:
+ self.log.warn("the configured language is invalid: %s" % guess)
+ guess = "en"
+ ## maybe there is no english dataset???
+ if not guess in availLangs:
+ self.log.warn("couldn't find the english dataset")
+ guess = availLangs[0]
+ self.dataset["Settings.Language"] = guess
+ ## we only have to save it, if it was specified correctly and explicitly
+ if value == guess:
+ self.dataset["Settings.LinkAttrs.weblang"] = guess
+
+
+ def __getPreferredBrowserLanguage(self, availLangs):
+ """guess the preferred language of the user (as sent by the browser)
+ take the first language, that is part of 'availLangs'
+ """
+ try:
+ pref_lang_header = cherrypy.request.headers["Accept-Language"]
+ except KeyError:
+ ## no language header was specified
+ return None
+ ## this could be a typical 'Accept-Language' header:
+ ## de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
+ regex = re.compile(u"\w+(-\w+)?(;q=[\d\.]+)?$")
+ pref_langs = [e.split(";",1)[0]
+ for e in pref_lang_header.split(",")
+ if regex.match(e)]
+ ## is one of these preferred languages available?
+ for lang in pref_langs:
+ if lang in availLangs: return lang
+ ## we try to be nice: also look for "de" if "de-de" was specified ...
+ for lang in pref_langs:
+ ## use only the first part of the language
+ short_lang = lang.split("-",1)[0]
+ if short_lang in availLangs: return short_lang
+ ## we give up
+ return None
+
+
+ def __setDevice(self, device):
+ if device and re.match(u'[\w /\-]+$', device) and self.cbox.getContainer(device):
+ self.log.debug("select device: %s" % device)
+ return True
+ else:
+ self.log.warn("invalid device: %s" % device)
+ self.dataset["Data.Warning"] = "InvalidDevice"
+ return False
+
+
+ def __checkVolumeName(self, name):
+ if name and re.match(u'[\w \-]+$', name):
+ return True
+ else:
+ return False
+
+
+ def __getLanguageValue(self, value):
+ hdf = self.__getLanguageData(self.dataset["Settings.Language"])
+ return hdf.getValue(value, "")
+
+
+ def __getLanguageData(self, web_lang="en"):
+ default_lang = "en"
+ conf_lang = self.prefs["WebSettings"]["Language"]
+ hdf = neo_util.HDF()
+ langDir = os.path.abspath(self.prefs["Locations"]["LangDir"])
+ langFiles = []
+ ## first: read default language (en)
+ if (default_lang != conf_lang) and (default_lang != web_lang):
+ langFiles.append(os.path.join(langDir, default_lang + ".hdf"))
+ ## second: read language as defined in the config file
+ if (conf_lang != web_lang):
+ langFiles.append(os.path.join(langDir, conf_lang + ".hdf"))
+ ## third: read language as configured via web interface
+ langFiles.append(os.path.join(langDir, web_lang + ".hdf"))
+ for langFile in langFiles:
+ if os.access(langFile, os.R_OK):
+ hdf.readFile(langFile)
+ else:
+ log.warn("Couldn't read language file: %s" % langFile)
+ return hdf
+
+
+ def __render(self, renderInfo, plugin=None):
+ '''renders from clearsilver templates and returns the resulting html
+ '''
+ ## is renderInfo a string (filename of the template) or a dictionary?
+ if type(renderInfo) == types.DictType:
+ template = renderInfo["template"]
+ if renderInfo.has_key("generator"):
+ generator = renderInfo["generator"]
+ else:
+ generator = False
+ else:
+ (template, generator) = (renderInfo, None)
+
+ ## load the language data
+ hdf = neo_util.HDF()
+ hdf.copy("Lang", self.__getLanguageData(self.dataset["Settings.Language"]))
+
+ ## first: assume, that the template file is in the global template directory
+ self.dataset["Settings.TemplateFile"] = os.path.abspath(os.path.join(self.prefs["Locations"]["TemplateDir"], template + ".cs"))
+
+ if plugin:
+ ## check, if the plugin provides the template file -> overriding
+ plugin_cs_file = plugin.getTemplateFileName(template)
+ if plugin_cs_file:
+ self.dataset["Settings.TemplateFile"] = plugin_cs_file
+
+ ## add the current state of the plugins to the hdf dataset
+ self.dataset["Data.Status.Plugins.%s" % plugin.getName()] = plugin.getStatus()
+ ## load the language data
+ pl_lang = plugin.getLanguageData(self.dataset["Settings.Language"])
+ if pl_lang:
+ hdf.copy("Lang.Plugins.%s" % plugin.getName(), pl_lang)
+ ## load the dataset of the plugin
+ plugin.loadDataSet(hdf)
+
+ self.log.info("rendering site: " + template)
+
+ cs_path = os.path.abspath(os.path.join(self.prefs["Locations"]["TemplateDir"], "main.cs"))
+ if not os.access(cs_path, os.R_OK):
+ log.error("Couldn't read clearsilver file: %s" % cs_path)
+ yield "Couldn't read clearsilver file: %s" % cs_path
+ return
+
+ self.log.debug(self.dataset)
+ for key in self.dataset.keys():
+ hdf.setValue(key,str(self.dataset[key]))
+ cs = neo_cs.CS(hdf)
+ cs.parseFile(cs_path)
+
+ ## is there a generator containing additional information?
+ if generator is None:
+ ## all content in one flush
+ yield cs.render()
+ else:
+ content_generate = generator()
+ dummy_line = """"""
+ ## now we do it linewise - checking for the content marker
+ for line in cs.render().splitlines():
+ if line.find(dummy_line) != -1:
+ yield line.replace(dummy_line, content_generate.next())
+ else:
+ yield line + "\n"
+
+
diff --git a/bin/WebInterfaceTestClass.py b/bin/WebInterfaceTestClass.py
new file mode 100644
index 0000000..c210a0f
--- /dev/null
+++ b/bin/WebInterfaceTestClass.py
@@ -0,0 +1,77 @@
+"""
+super class of all web interface unittests for the cryptobox
+
+just inherit this class and add some test functions
+"""
+
+import unittest
+import twill
+import cherrypy
+import WebInterfaceSites
+
+## we do the following, for easy surfing
+## e.g. use: cbx.go(your_url)
+## commands api: http://twill.idyll.org/commands.html
+CBXHOST="localhost"
+CBXPORT=8081
+CBX_URL="http://%s:%d/" % (CBXHOST, CBXPORT)
+LOG_FILE="/tmp/twill.log"
+
+class WebInterfaceTestClass(unittest.TestCase):
+ '''this class checks the webserver, using "twill"
+
+ the tests in this class are from the browsers point of view, so not
+ really unittests.
+ fetch twill from: http://twill.idyll.org
+ one way to manually run twill code is through the python
+ interpreter commandline e.g.:
+
+ import twill
+ twill.shell.main()
+ go http://localhost:8080
+ find "my very special html content"
+ help
+ '''
+
+ def setUp(self):
+ '''configures the cherrypy server that it works nice with twill
+ '''
+ cherrypy.config.update({
+ 'server.logToScreen' : False,
+ 'autoreload.on': False,
+ 'server.threadPool': 1,
+ 'server.environment': 'production',
+ })
+ cherrypy.root = WebInterfaceSites.WebInterfaceSites()
+ cherrypy.server.start(initOnly=True, serverClass=None)
+
+ from cherrypy._cpwsgi import wsgiApp
+ twill.add_wsgi_intercept(CBXHOST, CBXPORT, lambda: wsgiApp)
+
+ # grab the output of twill commands
+ self.output = open(LOG_FILE,"a")
+ twill.set_output(self.output)
+ self.cmd = twill.commands
+ self.URL = CBX_URL
+ self.cbox = cherrypy.root.cbox
+ self.globals, self.locals = twill.namespaces.get_twill_glocals()
+
+
+ def tearDown(self):
+ '''clean up the room when leaving'''
+ # remove intercept.
+ twill.remove_wsgi_intercept(CBXHOST, CBXPORT)
+ # shut down the cherrypy server.
+ cherrypy.server.stop()
+ self.output.close()
+
+
+ def __get_soup():
+ browser = twill.commands.get_browser()
+ soup = BeautifulSoup(browser.get_html())
+ return soup
+
+
+ def register_auth(self, url, user="admin", password="admin"):
+ self.cmd.add_auth("CryptoBox", url, user, password)
+
diff --git a/bin/coding_guidelines.txt b/bin/coding_guidelines.txt
new file mode 100644
index 0000000..a6fb47c
--- /dev/null
+++ b/bin/coding_guidelines.txt
@@ -0,0 +1,18 @@
+Maybe we can add some notes here to get a consistent coding experience :)
+
+-------------------------------------------------------------------------------
+
+comments:
+ - should be usable for pydoc
+ - ''' or """ at the beginning of every class/method
+ - ## for longterm comments, that are useful for understanding
+ - #blabla for codelines, that are out for experimenting and might be used later again
+
+error handling:
+ - unspecific error handling is evil (try: "grep -r except: .")
+
+unit testing:
+ - first write a unittest and then write the relating code until the unittest stops failing :)
+ - 'unittests.ClassName.py' should contain all tests for 'ClassName.py'
+ - commits with broken unit tests are evil (fix or disable the code (not the test ;) ))
+
diff --git a/bin/cryptobox.conf b/bin/cryptobox.conf
new file mode 100644
index 0000000..02ef334
--- /dev/null
+++ b/bin/cryptobox.conf
@@ -0,0 +1,83 @@
+[Main]
+
+# comma separated list of possible prefixes for accesible devices
+# beware: .e.g "/dev/hd" grants access to _all_ harddisks
+AllowedDevices = /dev/loop, /dev/ubdb
+
+# use sepepate config partition? (1=yes / 0=no)
+UseConfigPartition = 1
+
+# the default name prefix of not unnamed containers
+DefaultVolumePrefix = "Disk "
+
+# which cipher should cryptsetup-luks use?
+#TODO: uml does not support this module - DefaultCipher = aes-cbc-essiv:sha256
+DefaultCipher = aes-plain
+
+# label of the configuration partition (you should never change this)
+ConfigVolumeLabel = cbox_config
+
+
+[Locations]
+# where should we mount volumes?
+# this directory must be writeable by the cryptobox user (see above)
+MountParentDir = /var/cache/cryptobox/mnt
+
+# settings directory: contains name database and plugin configuration
+SettingsDir = /var/cache/cryptobox/settings
+
+# where are the clearsilver templates?
+#TemplateDir = /usr/share/cryptobox/templates
+TemplateDir = ../templates
+
+# path to language files
+#LangDir = /usr/share/cryptobox/lang
+LangDir = ../lang
+
+# path to documentation files
+#DocDir = /usr/share/doc/cryptobox/html
+DocDir = ../doc/html
+
+# path to the plugin directory
+#PluginDir = /usr/share/cryptobox/plugins
+PluginDir = ../plugins
+
+
+
+[Log]
+# possible values are "debug", "info", "warn" and "error" or numbers from
+# 0 (debug) to 7 (error)
+Level = debug
+
+# where to write the log messages to?
+# possible values are: file
+# syslog support will be added later
+Destination = file
+
+# depending on the choosen destination (see above) you may select
+# details. Possible values for the different destinations are:
+# file: $FILENAME
+# syslog: $LOG_FACILITY
+#Details = /var/log/cryptobox.log
+Details = ./cryptobox.log
+
+
+[WebSettings]
+# URL of default stylesheet
+Stylesheet = /cryptobox-misc/cryptobox.css
+
+# default language
+Language = de
+
+
+[Programs]
+cryptsetup = /sbin/cryptsetup
+mkfs-data = /sbin/mkfs.ext3
+blkid = /sbin/blkid
+blockdev = /sbin/blockdev
+mount = /bin/mount
+umount = /bin/umount
+super = /usr/bin/super
+# this is the "program" name as defined in /etc/super.tab
+CryptoBoxRootActions = CryptoBoxRootActions
+
diff --git a/bin/cryptoboxd b/bin/cryptoboxd
new file mode 100755
index 0000000..85258bd
--- /dev/null
+++ b/bin/cryptoboxd
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+#TODO: CBXPATH=/usr/lib/cryptobox
+CBXPATH=$(pwd)
+CBXSERVER=CryptoBoxWebserver.py
+PIDFILE=/var/run/cryptobox.pid
+DAEMON=/usr/bin/python2.4
+DAEMON_OPTS=${CBXPATH}/CryptoBoxWebserver.py
+NAME=cryptoboxd
+DESC="CryptoBox Daemon (webinterface)"
+#TODO: RUNAS=cryptobox
+RUNAS=$USERNAME
+
+#test -x $DAEMON -a -f /etc/exports || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --background --chdir "$CBXPATH" --chuid "$RUNAS" --start --quiet --oknodo --user "$RUNAS" --make-pidfile --pidfile "$PIDFILE" --exec "$DAEMON" \
+ -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+
+ stop)
+ echo -n "Stopping $DESC: "
+ #FIXME: this is the same as "killall python2.4"
+ # using a pid file instead prevents problems, but does not kill children???
+ start-stop-daemon --stop --oknodo --exec "$DAEMON"
+ echo "$NAME."
+ ;;
+ *)
+ echo "Usage: $(basename $0) {start|stop}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/bin/cryptoboxwebserver.conf b/bin/cryptoboxwebserver.conf
new file mode 100644
index 0000000..b8e1e6a
--- /dev/null
+++ b/bin/cryptoboxwebserver.conf
@@ -0,0 +1,17 @@
+[global]
+server.socketPort = 8080
+#server.environment = "production"
+server.environment = "development"
+server.logToScreen = True
+server.log_tracebacks = True
+server.threadPool = 1
+server.reverseDNS = False
+server.logFile = "cryptoboxwebserver.log"
+
+[/favicon.ico]
+static_filter.on = True
+# TODO: use live-cd/live-cd-tree.d/var/www/favicon.ico
+static_filter.file = "/usr/share/doc/python-cherrypy/cherrypy/favicon.ico"
+
+[/test_stream]
+stream_response = True
diff --git a/bin/do_unittests.sh b/bin/do_unittests.sh
new file mode 100755
index 0000000..6af0d02
--- /dev/null
+++ b/bin/do_unittests.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# run this script _before_ you do a commit and fix errors before uploading
+#
+
+# check if /dev/loop1 is available - otherwise some tests will fail!
+if /sbin/losetup /dev/loop1 &>/dev/null
+ then true
+ else echo "misconfiguration detected: sorry - you need /dev/loop1 for the tests" >&2
+ echo "just do the following:" >&2
+ echo " dd if=/dev/zero of=test.img bs=1M count=1 seek=100" >&2
+ echo " sudo /sbin/losetup /dev/loop1 test.img" >&2
+ echo "then you can run the tests again ..." >&2
+ echo >&2
+ exit 1
+ fi
+
+# do the tests
+for a in unittests.*.py
+ do testoob -v "$a"
+ done
+
diff --git a/bin/example-super.tab b/bin/example-super.tab
new file mode 100644
index 0000000..03d21c0
--- /dev/null
+++ b/bin/example-super.tab
@@ -0,0 +1,2 @@
+# adapt the following line to your local setup and add it to /etc/super.tab
+CryptoBoxRootActions /your/local/path/to/CryptoBoxRootActions.py yourUserName
diff --git a/bin/test.complete.CryptoBox.py b/bin/test.complete.CryptoBox.py
new file mode 100755
index 0000000..db5300d
--- /dev/null
+++ b/bin/test.complete.CryptoBox.py
@@ -0,0 +1,116 @@
+#!/usr/bin/env python2.4
+
+"""
+BEWARE: this script may overwrite the data of one of your loop devices. You
+should restrict the AllowedDevices directive in cryptobox.conf to exclude
+your precious black devices from being used by this script.
+
+the following script runs a number of tests for different parts
+"""
+
+from CryptoBox import CryptoBoxProps
+from CryptoBoxContainer import CryptoBoxContainer
+import sys
+
+
+def main():
+ cb = CryptoBoxProps()
+
+ print "Confguration:"
+ print "\tConfig file:\t\t%s" % (cb.prefs.prefs.filename, )
+ print "\tAllowed devices:\t%s" % (cb.prefs["Main"]["AllowedDevices"], )
+
+ """for e in cb.getContainerList(filterType=CryptoBoxContainer.Types["luks"]):"""
+ for e in cb.getContainerList():
+ print "\t\t%d\t\t%s - %s - %d" % (cb.getContainerList().index(e), e.getDevice(), e.getName(), e.getType())
+
+ if not cb.getContainerList() or len(cb.getContainerList()) < 1:
+ print "no loop devices found for testing"
+ sys.exit(1)
+
+ if len(cb.getContainerList()) > 1:
+ print "I found more than one available loop device - I will stop now to avoid risking data loss."
+ print "Please change the 'AllowedDevices' setting in 'cryptobox.conf' to reduce the number of allowed devices to only one."
+ sys.exit(1)
+
+ testElement = cb.getContainerList()[0]
+ print "\nRunning some tests now ..."
+ if not plain_tests(testElement):
+ print "some previous tests failed - we should stop now"
+ sys.exit(1)
+ luks_tests(testElement)
+
+
+" ***************** some functions ******************** "
+
+def luks_tests(e):
+ # umount if necessary
+ try:
+ e.umount()
+ except "MountError":
+ pass
+
+ e.create(e.Types["luks"], "alt")
+ print "\tluks create:\tok"
+
+ e.changePassword("alt","neu")
+ print "\tluks changepw:\tok"
+
+ e.setName("lalla")
+ print "\tluks setName:\tok"
+
+ try:
+ e.mount("neu")
+ except "MountError":
+ pass
+ if e.isMounted(): print "\tluks mount:\tok"
+ else: print "\tluks mount:\tfailed"
+
+ print "\tCapacity (size, free, used) [MB]:\t%s" % (e.getCapacity(), )
+
+ try:
+ e.umount()
+ except "MountError":
+ pass
+ if e.isMounted(): print "\tluks umount:\tfailed"
+ else: print "\tluks umount:\tok"
+
+ if e.isMounted(): return False
+ else: return True
+
+
+def plain_tests(e):
+ # umount if necessary
+ try:
+ e.umount()
+ except "MountError":
+ pass
+
+ e.create(e.Types["plain"])
+ print "\tplain create:\tok"
+
+ e.setName("plain-lili")
+ print "\tplain setName:\tok"
+
+ try:
+ e.mount()
+ except "MountError":
+ pass
+ if e.isMounted(): print "\tplain mount:\tok"
+ else: print "\tplain mount:\tfailed"
+
+ print "\tCapacity (size, free, used) [MB]:\t%s" % (e.getCapacity(), )
+
+ try:
+ e.umount()
+ except "MountError":
+ pass
+ if e.isMounted(): print "\tplain umount:\tfailed"
+ else: print "\tplain umount:\tok"
+
+ if e.isMounted(): return False
+ else: return True
+
+# ************ main ****************
+
+main()
diff --git a/bin/uml-setup.sh b/bin/uml-setup.sh
new file mode 100755
index 0000000..8826f3d
--- /dev/null
+++ b/bin/uml-setup.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+ROOT_IMG=/home/lars/devel-stuff/devel-chroots/cryptobox.img
+TEST_IMG=test.img
+TEST_SIZE=256
+MEM_SIZE=128M
+
+# Preparations:
+# echo "tun" >>/etc/modules
+# follow the instructions in /usr/share/doc/uml-utilities/README.Debian
+# add your user to the group 'uml-net'
+#
+
+/sbin/ifconfig tap0 &>/dev/null || { echo "tap0 is not configured - read /usr/share/doc/uml-utilities/README.Debian for hints"; exit 1; }
+
+
+if [ ! -e "$TEST_IMG" ]
+ then echo "Creating testing image file ..."
+ dd if=/dev/zero of="$TEST_IMG" bs=1M count=$TEST_SIZE
+ fi
+
+linux ubd0="$ROOT_IMG" ubd1="$TEST_IMG" con=xterm hostfs=../ fakehd eth0=daemon mem=$MEM_SIZE
+
diff --git a/bin/unittests.CryptoBox.py b/bin/unittests.CryptoBox.py
new file mode 100755
index 0000000..baaad3c
--- /dev/null
+++ b/bin/unittests.CryptoBox.py
@@ -0,0 +1,138 @@
+#!/usr/bin/env python2.4
+
+import unittest
+import sys
+from CryptoBox import *
+from CryptoBoxExceptions import *
+import CryptoBoxSettings
+
+class CryptoBoxPropsDeviceTests(unittest.TestCase):
+ import CryptoBox
+ cb = CryptoBox.CryptoBoxProps()
+
+ def testAllowedDevices(self):
+ '''isDeviceAllowed should accept permitted devices'''
+ self.assertTrue(self.cb.isDeviceAllowed("/dev/loop"))
+ self.assertTrue(self.cb.isDeviceAllowed("/dev/loop1"))
+ self.assertTrue(self.cb.isDeviceAllowed("/dev/loop/urgd"))
+ self.assertTrue(self.cb.isDeviceAllowed("/dev/usb/../loop1"))
+
+ def testDeniedDevices(self):
+ '''isDeviceAllowed should fail with not explicitly allowed devices'''
+ self.assertFalse(self.cb.isDeviceAllowed("/dev/hda"))
+ self.assertFalse(self.cb.isDeviceAllowed("/dev/loopa/../hda"))
+ self.assertFalse(self.cb.isDeviceAllowed("/"))
+
+
+class CryptoBoxPropsConfigTests(unittest.TestCase):
+ '''test here if everything with the config turns right'''
+ import os
+ import CryptoBox
+
+ files = {
+ "configFileOK" : "cbox-test_ok.conf",
+ "configFileBroken" : "cbox-test_broken.conf",
+ "nameDBFile" : "cryptobox_names.db",
+ "pluginConf" : "cryptobox_plugins.conf",
+ "userDB" : "cryptobox_users.db",
+ "logFile" : "cryptobox.log",
+ "tmpdir" : "cryptobox-mnt" }
+ tmpdirname = ""
+ filenames = {}
+ configContentOK = """
+[Main]
+AllowedDevices = /dev/loop
+DefaultVolumePrefix = "Data "
+DefaultCipher = aes-cbc-essiv:sha256
+[Locations]
+SettingsDir = %s
+MountParentDir = %s
+TemplateDir = ../templates
+LangDir = ../lang
+DocDir = ../doc/html
+PluginDir = ../plugins
+[Log]
+Level = debug
+Destination = file
+Details = %s/cryptobox.log
+[WebSettings]
+Stylesheet = /cryptobox-misc/cryptobox.css
+[Programs]
+blkid = /sbin/blkid
+cryptsetup = /sbin/cryptsetup
+super = /usr/bin/super
+CryptoBoxRootActions = CryptoBoxRootActions
+"""
+
+
+ def setUp(self):
+ '''generate all files in tmp and remember the names'''
+ import tempfile
+ os = self.os
+ self.tmpdirname = tempfile.mkdtemp(prefix="cbox-")
+ for file in self.files.keys():
+ self.filenames[file] = os.path.join(self.tmpdirname, self.files[file])
+ self.writeConfig()
+
+
+ def tearDown(self):
+ '''remove the created tmpfiles'''
+ os = self.os
+ # remove temp files
+ for file in self.filenames.values():
+ compl_name = os.path.join(self.tmpdirname, file)
+ if os.path.exists(compl_name):
+ os.remove(compl_name)
+ # remove temp dir
+ os.rmdir(self.tmpdirname)
+
+
+ def testConfigInit(self):
+ '''Check various branches of config file loading'''
+ import os
+ self.assertRaises(CBConfigUnavailableError, self.CryptoBox.CryptoBoxProps,"/invalid/path/to/config/file")
+ self.assertRaises(CBConfigUnavailableError, self.CryptoBox.CryptoBoxProps,"/etc/shadow")
+ """ check one of the following things:
+ 1) are we successfully using an existing config file?
+ 2) do we break, if no config file is there?
+ depending on the existence of a config file, only one of these conditions
+ can be checked - hints for more comprehensive tests are appreciated :) """
+ for a in CryptoBoxSettings.CryptoBoxSettings.CONF_LOCATIONS:
+ if os.path.exists(a):
+ self.CryptoBox.CryptoBoxProps()
+ break # this skips the 'else' clause
+ else: self.assertRaises(CBConfigUnavailableError, self.CryptoBox.CryptoBoxProps)
+ self.assertRaises(CBConfigUnavailableError, self.CryptoBox.CryptoBoxProps,[])
+
+
+ def testBrokenConfigs(self):
+ """Check various broken configurations"""
+ self.writeConfig("SettingsDir", "SettingsDir=/foo/bar", filename=self.filenames["configFileBroken"])
+ self.assertRaises(CBConfigError, self.CryptoBox.CryptoBoxProps,self.filenames["configFileBroken"])
+ self.writeConfig("Level", "Level = ho", filename=self.filenames["configFileBroken"])
+ self.assertRaises(CBConfigError, self.CryptoBox.CryptoBoxProps,self.filenames["configFileBroken"])
+ self.writeConfig("Details", "#out", filename=self.filenames["configFileBroken"])
+ self.assertRaises(CBConfigError, self.CryptoBox.CryptoBoxProps,self.filenames["configFileBroken"])
+ self.writeConfig("super", "super=/bin/invalid/no", filename=self.filenames["configFileBroken"])
+ self.assertRaises(CBConfigError, self.CryptoBox.CryptoBoxProps,self.filenames["configFileBroken"])
+ self.writeConfig("CryptoBoxRootActions", "#not here", filename=self.filenames["configFileBroken"])
+ self.assertRaises(CBConfigError, self.CryptoBox.CryptoBoxProps,self.filenames["configFileBroken"])
+ self.writeConfig("CryptoBoxRootActions", "CryptoBoxRootActions = /bin/false", filename=self.filenames["configFileBroken"])
+ self.assertRaises(CBEnvironmentError, self.CryptoBox.CryptoBoxProps,self.filenames["configFileBroken"])
+
+
+ def writeConfig(self, replace=None, newline=None, filename=None):
+ """write a config file and (optional) replace a line in it"""
+ import re
+ if not filename: filename = self.filenames["configFileOK"]
+ content = self.configContentOK % (self.tmpdirname, self.tmpdirname, self.tmpdirname)
+ if replace:
+ pattern = re.compile('^' + replace + '\\s*=.*$', flags=re.M)
+ content = re.sub(pattern, newline, content)
+ cf = open(filename, "w")
+ cf.write(content)
+ cf.close()
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/bin/unittests.CryptoBoxTools.py b/bin/unittests.CryptoBoxTools.py
new file mode 100755
index 0000000..10daf4e
--- /dev/null
+++ b/bin/unittests.CryptoBoxTools.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python2.4
+
+import unittest
+import CryptoBoxTools
+import os
+
+
+class CryptoBoxToolsTests(unittest.TestCase):
+
+ def testGetAbsoluteDeviceName(self):
+ func = CryptoBoxTools.getAbsoluteDeviceName
+ self.assertTrue(func("hda") == "/dev/hda")
+ self.assertTrue(func("loop0") == "/dev/loop0")
+ self.assertTrue(func(os.path.devnull) == os.path.devnull)
+
+
+ def testFindMajorMinorOfDevice(self):
+ func = CryptoBoxTools.findMajorMinorOfDevice
+ self.assertTrue(func("/dev/hda") == (3,0))
+ self.assertTrue(func("/dev/hda1") == (3,1))
+ self.assertTrue(func(os.path.devnull) == (1,3))
+ self.assertTrue(func("/dev/nothere") is None)
+
+
+ def testFindMajorMinorDeviceName(self):
+ func = CryptoBoxTools.findMajorMinorDeviceName
+ dir = os.path.join(os.path.sep, "dev")
+ self.assertTrue(os.path.join(dir,"hda") in func(dir,3,0))
+ self.assertTrue(os.path.devnull in func(dir,1,3))
+ self.assertFalse(os.path.devnull in func(dir,2,3))
+
+
+ def testIsPartOfBlockDevice(self):
+ func = CryptoBoxTools.isPartOfBlockDevice
+ self.assertTrue(func("/dev/hda", "/dev/hda1"))
+ self.assertFalse(func("/dev/hda", "/dev/hda"))
+ self.assertFalse(func("/dev/hda1", "/dev/hda"))
+ self.assertFalse(func("/dev/hda1", "/dev/hda1"))
+ self.assertFalse(func("/dev/hda", "/dev/hdb1"))
+ self.assertFalse(func(None, "/dev/hdb1"))
+ self.assertFalse(func("/dev/hda", None))
+ self.assertFalse(func(None, ""))
+ self.assertFalse(func("loop0", "loop1"))
+
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/bin/unittests.Plugins.py b/bin/unittests.Plugins.py
new file mode 100755
index 0000000..929c9de
--- /dev/null
+++ b/bin/unittests.Plugins.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python2.4
+
+import unittest
+import Plugins
+
+class CheckForUndefinedTestCases(unittest.TestCase):
+ """here we will add failing test functions for every non-existing testcase"""
+
+
+def create_testcases():
+
+ plugins = Plugins.PluginManager(None, "../plugins").getPlugins()
+ glob_dict = globals()
+ loc_dict = locals()
+ for pl in plugins:
+ test_class = pl.getTestClass()
+ if test_class:
+ ## add the testclass to the global dictionary
+ glob_dict["unittest" + pl.getName()] = test_class
+ else:
+ subname = "test_existence_%s" % pl.getName()
+ def test_existence(self):
+ """check if the plugin (%s) contains tests""" % pl.getName()
+ self.fail("no tests defined for plugin: %s" % pl.getName())
+ ## add this function to the class above
+ setattr(CheckForUndefinedTestCases, subname, test_existence)
+ #FIXME: the failure output always contains the same name for all plugins
+
+
+create_testcases()
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/bin/unittests.WebSites.py b/bin/unittests.WebSites.py
new file mode 100755
index 0000000..89e514d
--- /dev/null
+++ b/bin/unittests.WebSites.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python2.4
+
+import unittest
+
+## this makes assertRaises shorter
+from twill.errors import *
+from mechanize import BrowserStateError, LinkNotFoundError
+
+## import the module of the common super class of all web interface test classes
+import WebInterfaceTestClass
+
+
+
+class WebServer(WebInterfaceTestClass.WebInterfaceTestClass):
+
+ def test_is_server_running(self):
+ '''the server should run under given name and port'''
+ self.cmd.go(self.URL)
+ ## other URLs must not be checked, as we do not know, if they are valid
+
+
+class BuiltinPages(WebInterfaceTestClass.WebInterfaceTestClass):
+
+
+ def test_goto_index(self):
+ '''display all devices'''
+ self.cmd.go(self.URL + "?weblang=en")
+ self.cmd.find("The CryptoBox")
+ self.cmd.go(self.URL + "?weblang=de")
+ self.cmd.find("Die CryptoBox")
+ self.cmd.go(self.URL + "?weblang=si")
+ self.cmd.find("Privatnost v vsako vas")
+ self.cmd.go(self.URL + "?weblang=fr")
+ self.cmd.find("La CryptoBox")
+
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/debian/README.Debian b/debian/README.Debian
index 8a503fc..f06e815 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,6 +1,5 @@
CryptoBox for Debian - installation notes
-be aware of two things:
+be aware of one thing:
1) you need cryptsetup with luks support (for now only in unstable)
-2) the debian perl-clearsilver package is broken (at least until April 02006)
diff --git a/debian/control b/debian/control
index b2dba57..26058dc 100644
--- a/debian/control
+++ b/debian/control
@@ -7,8 +7,7 @@ Standards-Version: 3.6.2
Package: cryptobox
Architecture: any
-Depends: bash (>=2.0), sed (>=4.0), coreutils, grep (>=2.0), perl, httpd-cgi, hashalot, libconfigfile-perl, cryptsetup (>=20050111), dmsetup, pmount, initscripts, e2fsprogs (>= 1.27), adduser
-Recommends: perl-clearsilver
+Depends: bash (>=2.0), sed (>=4.0), coreutils, grep (>=2.0), httpd-cgi, hashalot, cryptsetup (>=20050111), dmsetup, initscripts, e2fsprogs (>= 1.27), adduser, python (>=2.4), python-clearsilver
Suggests: cron, samba
Description: Web interface for an encrypting fileserver
This bundle of scripts and cgis allow you to manage an encrypted harddisk
diff --git a/debian/rules b/debian/rules
index 33284e8..5d6d90b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -74,19 +74,14 @@ binary-arch: build install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
dh_installinit
# dh_installcron
-# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
- dh_perl
-# dh_python
+ dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
diff --git a/design/background_frame_corner.svg b/design/background_frame_corner.svg
new file mode 100644
index 0000000..deb4ae3
--- /dev/null
+++ b/design/background_frame_corner.svg
@@ -0,0 +1,265 @@
+
+
+
diff --git a/design/icon_background_active.svg b/design/icon_background_active.svg
new file mode 100644
index 0000000..c6ee31a
--- /dev/null
+++ b/design/icon_background_active.svg
@@ -0,0 +1,92 @@
+
+
+
diff --git a/design/icons/applications-system_tango.svg b/design/icons/applications-system_tango.svg
new file mode 100644
index 0000000..35e2ffa
--- /dev/null
+++ b/design/icons/applications-system_tango.svg
@@ -0,0 +1,245 @@
+
+
+
diff --git a/design/icons/computer_tango.svg b/design/icons/computer_tango.svg
new file mode 100644
index 0000000..d6e0f6b
--- /dev/null
+++ b/design/icons/computer_tango.svg
@@ -0,0 +1,738 @@
+
+
+
diff --git a/design/icons/dialog-error_tango.svg b/design/icons/dialog-error_tango.svg
new file mode 100644
index 0000000..602fa79
--- /dev/null
+++ b/design/icons/dialog-error_tango.svg
@@ -0,0 +1,316 @@
+
+
+
diff --git a/design/icons/dialog-information_tango.svg b/design/icons/dialog-information_tango.svg
new file mode 100644
index 0000000..1e957cc
--- /dev/null
+++ b/design/icons/dialog-information_tango.svg
@@ -0,0 +1,1145 @@
+
+
+
diff --git a/design/icons/dialog-warning_tango.svg b/design/icons/dialog-warning_tango.svg
new file mode 100644
index 0000000..3870db2
--- /dev/null
+++ b/design/icons/dialog-warning_tango.svg
@@ -0,0 +1,290 @@
+
+
+
diff --git a/design/icons/drive-cdrom_tango.svg b/design/icons/drive-cdrom_tango.svg
new file mode 100644
index 0000000..6588a65
--- /dev/null
+++ b/design/icons/drive-cdrom_tango.svg
@@ -0,0 +1,444 @@
+
+
+
diff --git a/design/icons/drive-harddisk_tango.svg b/design/icons/drive-harddisk_tango.svg
new file mode 100644
index 0000000..406c4ac
--- /dev/null
+++ b/design/icons/drive-harddisk_tango.svg
@@ -0,0 +1,469 @@
+
+
+
diff --git a/design/icons/drive-removable-media_tango.svg b/design/icons/drive-removable-media_tango.svg
new file mode 100644
index 0000000..e448605
--- /dev/null
+++ b/design/icons/drive-removable-media_tango.svg
@@ -0,0 +1,390 @@
+
+
+
diff --git a/design/icons/globe-lips.svg b/design/icons/globe-lips.svg
new file mode 100644
index 0000000..8b700f9
--- /dev/null
+++ b/design/icons/globe-lips.svg
@@ -0,0 +1,512 @@
+
+
+
diff --git a/design/icons/gnome-dev-removable-usb_nuvola.svg b/design/icons/gnome-dev-removable-usb_nuvola.svg
new file mode 100644
index 0000000..a2c624a
--- /dev/null
+++ b/design/icons/gnome-dev-removable-usb_nuvola.svg
@@ -0,0 +1,1004 @@
+
+
+
+
diff --git a/design/icons/gnome-globe_nuvola.svg b/design/icons/gnome-globe_nuvola.svg
new file mode 100644
index 0000000..3a5a620
--- /dev/null
+++ b/design/icons/gnome-globe_nuvola.svg
@@ -0,0 +1,1195 @@
+
+
+
+
diff --git a/design/icons/gtk-zoom-in_nuvola.svg b/design/icons/gtk-zoom-in_nuvola.svg
new file mode 100644
index 0000000..1737355
--- /dev/null
+++ b/design/icons/gtk-zoom-in_nuvola.svg
@@ -0,0 +1,433 @@
+
+
+
\ No newline at end of file
diff --git a/design/icons/help_contents.svg b/design/icons/help_contents.svg
new file mode 100644
index 0000000..c3beee8
--- /dev/null
+++ b/design/icons/help_contents.svg
@@ -0,0 +1,701 @@
+
+
+
diff --git a/design/icons/inaccessible_tango_emblem-unreadable.svg b/design/icons/inaccessible_tango_emblem-unreadable.svg
new file mode 100644
index 0000000..82a4a4f
--- /dev/null
+++ b/design/icons/inaccessible_tango_emblem-unreadable.svg
@@ -0,0 +1,357 @@
+
+
+
diff --git a/design/icons/language.png b/design/icons/language.png
new file mode 100644
index 0000000..3334b5d
Binary files /dev/null and b/design/icons/language.png differ
diff --git a/design/icons/locked_tango-emblem-readonly.svg b/design/icons/locked_tango-emblem-readonly.svg
new file mode 100644
index 0000000..10cdd97
--- /dev/null
+++ b/design/icons/locked_tango-emblem-readonly.svg
@@ -0,0 +1,298 @@
+
+
+
diff --git a/design/icons/multimedia-dell-dj-pocket_tango.svg b/design/icons/multimedia-dell-dj-pocket_tango.svg
new file mode 100644
index 0000000..0e25751
--- /dev/null
+++ b/design/icons/multimedia-dell-dj-pocket_tango.svg
@@ -0,0 +1,4405 @@
+
+
+
diff --git a/design/icons/multimedia-player-ipod-mini-blue_tango.svg b/design/icons/multimedia-player-ipod-mini-blue_tango.svg
new file mode 100644
index 0000000..0c35cf8
--- /dev/null
+++ b/design/icons/multimedia-player-ipod-mini-blue_tango.svg
@@ -0,0 +1,4126 @@
+
+
+
diff --git a/design/icons/multimedia-player-motorola-rokr_tango.svg b/design/icons/multimedia-player-motorola-rokr_tango.svg
new file mode 100644
index 0000000..207e27f
--- /dev/null
+++ b/design/icons/multimedia-player-motorola-rokr_tango.svg
@@ -0,0 +1,1025 @@
+
+
+
diff --git a/design/icons/network-transmit-receive_design.svg b/design/icons/network-transmit-receive_design.svg
new file mode 100644
index 0000000..dd48cc4
--- /dev/null
+++ b/design/icons/network-transmit-receive_design.svg
@@ -0,0 +1,1041 @@
+
+
+
diff --git a/design/icons/pile_of_devices.png b/design/icons/pile_of_devices.png
new file mode 100644
index 0000000..3591de9
Binary files /dev/null and b/design/icons/pile_of_devices.png differ
diff --git a/design/icons/pile_of_devices.svg b/design/icons/pile_of_devices.svg
new file mode 100644
index 0000000..e00ddcc
--- /dev/null
+++ b/design/icons/pile_of_devices.svg
@@ -0,0 +1,22002 @@
+
+
+
diff --git a/design/icons/preferences-desktop-locale_tango.svg b/design/icons/preferences-desktop-locale_tango.svg
new file mode 100644
index 0000000..e5e87cd
--- /dev/null
+++ b/design/icons/preferences-desktop-locale_tango.svg
@@ -0,0 +1,828 @@
+
+
+
diff --git a/design/icons/preferences-system_tango.svg b/design/icons/preferences-system_tango.svg
new file mode 100644
index 0000000..a6183e8
--- /dev/null
+++ b/design/icons/preferences-system_tango.svg
@@ -0,0 +1,396 @@
+
+
+
diff --git a/design/icons/redhat-config-users_wasp.svg b/design/icons/redhat-config-users_wasp.svg
new file mode 100644
index 0000000..4668db8
--- /dev/null
+++ b/design/icons/redhat-config-users_wasp.svg
@@ -0,0 +1,1904 @@
+
+
+
+
diff --git a/design/icons/seahorse-preferences_gnome.svg b/design/icons/seahorse-preferences_gnome.svg
new file mode 100644
index 0000000..583aa18
--- /dev/null
+++ b/design/icons/seahorse-preferences_gnome.svg
@@ -0,0 +1,1250 @@
+
+
+
diff --git a/design/icons/spherecrystal_help.svg b/design/icons/spherecrystal_help.svg
new file mode 100644
index 0000000..dfa203c
--- /dev/null
+++ b/design/icons/spherecrystal_help.svg
@@ -0,0 +1,60 @@
+
+
+
+
diff --git a/design/icons/system-log-out_tango.svg b/design/icons/system-log-out_tango.svg
new file mode 100644
index 0000000..c04625a
--- /dev/null
+++ b/design/icons/system-log-out_tango.svg
@@ -0,0 +1,362 @@
+
+
+
diff --git a/design/icons/unlocked_clavdia.svg b/design/icons/unlocked_clavdia.svg
new file mode 100644
index 0000000..ce5175e
--- /dev/null
+++ b/design/icons/unlocked_clavdia.svg
@@ -0,0 +1,515 @@
+
+
+
diff --git a/design/icons/unlocked_lars.svg b/design/icons/unlocked_lars.svg
new file mode 100644
index 0000000..963467d
--- /dev/null
+++ b/design/icons/unlocked_lars.svg
@@ -0,0 +1,1198 @@
+
+
+
diff --git a/doc/html/fr b/doc/html/fr
new file mode 120000
index 0000000..2c4c454
--- /dev/null
+++ b/doc/html/fr
@@ -0,0 +1 @@
+en
\ No newline at end of file
diff --git a/doc/html/si b/doc/html/si
new file mode 120000
index 0000000..2c4c454
--- /dev/null
+++ b/doc/html/si
@@ -0,0 +1 @@
+en
\ No newline at end of file
diff --git a/known_problems b/known_problems
new file mode 100644
index 0000000..0d87995
--- /dev/null
+++ b/known_problems
@@ -0,0 +1,4 @@
+Bug-Report: twill/other-modules/ClientForm.py: uncomment line 846 ("XHTMLCompatibleFormParser" instead of default parser) - this solves an eternal loop-problem caused by line 958 ("fp.feed(ch)")
+
+Bug-Report: testoob - loading of a TestSuite (as advertised by the commandline help) does not work (due to unittest.py/loadTestsFromModule)
+
diff --git a/lang/README b/lang/README
index 8edf0b0..e117d71 100644
--- a/lang/README
+++ b/lang/README
@@ -3,26 +3,35 @@ $Id$
You may want to translate the CryptoBox into another language?
Most welcome!
-Existing translation can be found in the .hdf files. There are three
-easy steps, that won't take longer than one hour to go through:
+Existing translations can be found in the .hdf files in the
+language directory (online available as
+https://systemausfall.org/svn/cryptobox/trunk/lang/).
-1.) Download one .hdf in your preferred language (e.g. en.hdf if you're a native english speaker).
+There are three easy steps, that won't take longer than one hour
+to go through, if you want to translate the cryptobox into a
+language of your choice:
-2.) Start to change the text behind the equal sign line for line.
+1.) Download one .hdf in your preferred language (e.g. "en.hdf"
+if you're a native english speaker).
+
+2.) Start to change the text following the equal signs line by line.
3.) Send us your changed .hdf file. That's it - thank you!
Hints:
-We are available via mail (cryptobox@systemausfall.org) for any questions. Don't worry to ask us if
-something is vague. We prefer "utf" encoded hdf-files. If you don't
-know what udf means - just don't care, send us your file and
-everything else will be fine. You don't have to translate the whole
-file, some minor parts are enough to send back. The community will do
-the rest. ;)
+We are available via mail (cryptobox@systemausfall.org) for any
+questions. Don't worry to ask us if something is vague.
+
+We prefer "utf" encoded hdf-files. If you don't know what utf
+means - just don't care, send us your file and everything else
+will be fine.
+
+You don't have to translate the whole file - some minor parts are
+enough to send back. The community will do the rest. ;)
Again, thanks for your help! We do the Cryptobox things in our
-freetime for fun and to provide an open source solution for this
+free time for fun and to provide an open source solution for this
special purpose. By helping us, you're taking part in this
development.
diff --git a/lang/TODO b/lang/TODO
index 8afaa30..0207e79 100644
--- a/lang/TODO
+++ b/lang/TODO
@@ -9,6 +9,8 @@ help!
- SuccessMessage.InitRunning contains only the first sentence
- SuccessMessage.ReBoot: add a hint for automatic redirection (3rd sentence)
- EmptyCryptoPassword: change 'Text' accordingly to English string.
+- Button.System: is in eglish
+- ErrorMessage.NoDocumentation: is in english
Below are some smaller changes in English sentences. Someone may change it accordingly.
- MountFailed: add 'Pleasy try again' to the end of the string.
diff --git a/lang/de.hdf b/lang/de.hdf
index 4bfd1ee..a1c1960 100644
--- a/lang/de.hdf
+++ b/lang/de.hdf
@@ -1,215 +1,230 @@
-Lang {
+Name = Deutsch
- Name = deutsch
+Status = $Id$
- Status = $Id$
+Title {
+ Top = Die CryptoBox
+ Slogan = ... und 1984 war gestern!
+ Init = Initialisierung der CryptoBox
+ Mount = Aktivierung des Containers
+ Umount = Deaktivierung des Containers
+ Config = Konfiguration der CryptoBox
+ System = System
+ Status = Status der CryptoBox
+ Volume = Eigenschaften von
+}
- Title {
- Top = Die CryptoBox
- Slogan = ... und 1984 war gestern!
- Init = Initialisierung der CryptoBox
- Mount = Aktivierung der Crypto-Daten
- Umount = Deaktivierung der Crypto-Daten
- Config = Konfiguration der CryptoBox
- Log = Protokoll der CryptoBox
- System = System
- Status = Status der CryptoBox
+
+Text {
+ EnterCurrentCryptoPassword = Das Crypto-Passwort eingeben
+ EnterNewCryptoPassword = Das neue Crypto-Passwort eingeben
+ EnterSameCryptoPassword = Das Crypto-Passwort wiederholen
+ EnterCurrentAdminPassword = Das aktuelle Admin-Passwort eingeben:
+ EnterNewAdminPassword = Das neue Admin-Passwort eingeben:
+ EnterSameAdminPassword = Das neue Admin-Passwort wiederholen:
+ InitWarning = Bei der Initialisierung werden ALLE DATEN auf der Festplatte GELÖSCHT!
+ ConfirmInitHint = Um zu bestätigen, dass du weisst, was du tust, tippe hier bitte exakt Folgendes ein:
+ ConfirmInit = Ja, loesche alle Daten!
+ PartitionInfo = Derzeitige Partitionierung der Festplatte:
+ IPAddress = Netzwerk-Adresse (IP) der CryptoBox:
+ TimeOut = Zeitabschaltung des Crypto-Dateisystems (in Minuten):
+ SelectLanguage = Spracheinstellung:
+ RedirectNote = Klicke hier, falls dein Browser die automatische Weiterleitung nicht unterstützt.
+ ProjectHomePage = Projekt-Seite
+ ProjectNote = Die CryptoBox ist ein Projekt von
+ DoUmount = Deaktivierung des verschlüsselten Dateisystems
+ DoMount = Aktivierung des verschlüsselten Dateisystems
+ Configuration = Einstellungen
+ CryptoIsActive = Die Crypto-Daten sind verfügbar.
+ CryptoIsDown = Die Crypto-Daten sind vor jedem Zugriff geschützt.
+ ChoosePartition = Welchen Daten-Container möchtest du auswählen?
+ ChosenPartition = Der aktuelle Daten-Container ist
+ ActivePartitions = Die folgenden Daten-Container sind derzeit aktiv
+ PassivePartitions = Die folgenden Daten-Container sind derzeit inaktiv
+ ContainerName = Der Name des Daten-Containers
+ ContainerEncryption = Aktiviere Verschlüsselung
+}
+
+
+Button {
+ DoInit = Initialisierung
+ SaveConfig = Speichere Konfiguration
+ Update = Aktualisieren
+ Mount = Container aktivieren
+ Umount = Container deaktivieren
+ Config = Einstellungen
+ PowerOff = ausschalten
+ ReBoot = neu starten
+ Documentation = Hilfe
+ Status = Status
+ System = System
+ ContainerNameSet = Setze den neuen Namen
+ InitContainer = Reinitialisiere den Container
+}
+
+
+WarningMessage {
+ InitNotConfirmed {
+ Title = Bestätigung schlug fehl
+ Text = Der Bestätigungssatz muss exakt eingegeben werden!
}
-
- Text {
- EnterCurrentCryptoPassword = Das Crypto-Passwort eingeben:
- EnterNewCryptoPassword = Das neue Crypto-Passwort eingeben:
- EnterSameCryptoPassword = Das Crypto-Passwort wiederholen:
- EnterCurrentAdminPassword = Das aktuelle Admin-Passwort eingeben:
- EnterNewAdminPassword = Das neue Admin-Passwort eingeben:
- EnterSameAdminPassword = Das neue Admin-Passwort wiederholen:
- InitWarning = Bei der Initialisierung werden ALLE DATEN auf der Festplatte GELÖSCHT!
- ConfirmInitHint = Um zu bestätigen, dass du weisst, was du tust, tippe hier bitte exakt Folgendes ein:
- ConfirmInit = Ja, loesche alle Daten!
- PartitionInfo = Derzeitige Partitionierung der Festplatte:
- IPAddress = Netzwerk-Adresse (IP) der CryptoBox:
- TimeOut = Zeitabschaltung des Crypto-Dateisystems (in Minuten):
- EmptyLog = Das Logbuch der CryptoBox ist leer.
- SelectLanguage = Spracheinstellung:
- RedirectNote = Klicke hier, falls dein Browser die automatische Weiterleitung nicht unterstützt.
- ProjectHomePage = Projekt-Seite
- ProjectNote = Die CryptoBox ist ein Projekt von
- DoUmount = Deaktivierung des verschlüsselten Dateisystems
- DoMount = Aktivierung des verschlüsselten Dateisystems
- Configuration = Einstellungen
- CryptoIsActive = Die Crypto-Daten sind verfügbar.
- CryptoIsDown = Die Crypto-Daten sind vor jedem Zugriff geschützt.
+ EmptyCryptoPassword {
+ Title = Ungültiges Crypto-Passwort
+ Text = Du musst ein Crypto-Passwort eingeben!
}
-
- Button {
- DoInit = Initialisierung
- SaveConfig = Speichere Konfiguration
- Update = Aktualisieren
- Mount = Crypto-Daten aktivieren
- Umount = Crypto-Daten deaktivieren
- Config = Einstellungen
- PowerOff = ausschalten
- ReBoot = neu starten
- Protocol = Protokoll anzeigen
- Documentation = Hilfe
- Status = Status
+ DifferentCryptoPasswords {
+ Title = Ungleiche Crypto-Passworte
+ Text = Die beiden Passworte müssen identisch sein, um Eingabefehler zu verhindern.
}
-
- WarningMessage {
- InitNotConfirmed {
- Title = Bestätigung schlug fehl
- Text = Der Bestätigungssatz muss exakt eingegeben werden!
- }
-
- EmptyCryptoPassword {
- Title = Ungültiges Crypto-Passwort
- Text = Du musst ein Crypto-Passwort eingeben!
- }
-
- DifferentCryptoPasswords {
- Title = Ungleiche Crypto-Passworte
- Text = Die beiden Passworte müssen identisch sein, um Eingabefehler zu verhindern.
- }
-
- DifferentAdminPasswords {
- Title = Ungleiche Administrations-Passworte
- Text = Die beiden Passworte müssen identisch sein, um Eingabefehler zu verhindern.
- }
-
- WrongAdminPassword {
- Title = Falsches Administrations-Passwort
- Text = Das eingegebene Administrations-Passwort ist falsch. Versuche es noch einmal.
- }
-
- MountFailed {
- Title = Aktivierung schlug fehl
- Text = Das verschlüsselte Dateisystem konnte nicht aktiviert werden. Wahrscheinlich war das Passwort falsch. Versuche es noch einmal.
- }
-
- UmountFailed {
- Title = Deaktivierung schlug fehl
- Text = Das verschlüsselte Dateisystem konnte nicht abgeschaltet werden. Wahrscheinlich sind noch Dateien geöffnet. Schließe alle potentiell unsauberen Programme (beispielsweise die weitverbreitete Textverarbeitung). Notfalls einfach die CryptoBox ausschalten!
- }
-
- NotInitialized {
- Title = Keine Konfiguration gefunden
- Text = Die CryptoBox wurde noch nicht eingerichtet.
- }
-
- InitNotFinished {
- Title = Initalisierung noch nicht abgeschlossen
- Text = Die Initialisierung wird in wenigen Minuten beendet sein. Erst danach ist diese Aktion möglich.
- }
-
- IsMounted {
- Title = Bereits aktiv
- Text = Das verschlüsselte Dateisystem ist bereits aktiv.
- }
-
- NotMounted {
- Title = Nicht aktiv
- Text = Das verschlüsselte Dateisystem ist derzeit nicht aktiv.
- }
-
- AlreadyConfigured {
- Title = Konfiguration gefunden
- Text = Die CryptoBox wurde bereits eingerichtet. Bei einer erneuten Initialisierung werden alle Daten gelöscht!
- }
-
- InvalidLanguage {
- Title = Ungültige Sprache
- Text = Die ausgewählte Sprache ist nicht verfügbar!
- }
-
- InvalidIP {
- Title = Ungültige IP
- Text = Die ausgewählte Netzwerkadresse ist nicht gültig!
- }
-
- InvalidTimeOut {
- Title = Ungültige Zeitabschaltung
- Text = Der ausgewählte Wert der Zeitabschaltung ist nicht gültig!
- }
-
- ConfigTimeOutFailed {
- Title = Fehler beim Ändern der Zeitabschaltung
- Text = Der Wert der Zeitabschaltung konnte nicht geändert werden!
- }
-
- ConfigLanguageFailed {
- Title = Fehler beim Ändern der Spracheinstellung
- Text = Die Spracheinstellung konnte nicht geändert werden!
- }
-
- ConfigIPFailed {
- Title = Fehler beim Ändern der Netzwerkadresse
- Text = Die Netzwerkadresse konnte nicht geändert werden!
- }
-
- IPAddressChanged {
- Title = Änderung der Netzwerk-Adresse
- Text = Die Netzwerk-Adresse der CryptoBox wurde verändert. In wenigen Sekunden werden sie zu der neuen Adresse umgeleitet.
- }
+ DifferentAdminPasswords {
+ Title = Ungleiche Administrations-Passworte
+ Text = Die beiden Passworte müssen identisch sein, um Eingabefehler zu verhindern.
}
-
- SuccessMessage {
- InitRunning {
- Title = Initialisierung läuft
- Text = Die Initialisierung der CryptoBox wird im Hintergrund abgeschlossen. Du kannst die CryptoBox nun konfigurieren und das verschlüsselte Dateisystem in ein paar Minuten aktivieren.
- }
-
- ConfigSaved {
- Title = Konfiguration gespeichert
- Text = Die neuen Einstellungen der CryptoBox wurden übernommem.
- }
-
- MountDone {
- Title = Crypto-Daten aktiviert
- Text = Das verschlüsselte Dateisystem ist nun verfügbar.
- }
-
- UmountDone {
- Title = Crypto-Daten deaktiviert
- Text = Das verschlüsselte Dateisystem ist nun vor jedem Zugriff geschützt.
- }
-
- PowerOff {
- Title = Abschaltung
- Text = Die CryptoBox wird gerade heruntergefahren. In wenigen Sekunden kannst du sie ausschalten (falls dies nicht automatisch geschieht).
- }
-
- ReBoot {
- Title = Neustart
- Text = Die CryptoBox wird gerade neu gestartet. In wenigen Sekunden ist sie wieder verfügbar. Bitte warte solange - du wirst automatisch weitergeleitet.
- }
+ WrongAdminPassword {
+ Title = Falsches Administrations-Passwort
+ Text = Das eingegebene Administrations-Passwort ist falsch. Versuche es noch einmal.
}
+ MountFailed {
+ Title = Aktivierung schlug fehl
+ Text = Das verschlüsselte Dateisystem konnte nicht aktiviert werden. Wahrscheinlich war das Passwort falsch. Versuche es noch einmal.
+ }
- ErrorMessage {
+ UmountFailed {
+ Title = Deaktivierung schlug fehl
+ Text = Das verschlüsselte Dateisystem konnte nicht abgeschaltet werden. Wahrscheinlich sind noch Dateien geöffnet. Schließe alle potentiell unsauberen Programme (beispielsweise die weitverbreitete Textverarbeitung). Notfalls einfach die CryptoBox ausschalten!
+ }
- UnknownAction {
- Title = Unbekannte Aktion
- Text = Du hast eine undefinierte Aktion angefordert.
- }
+ NotInitialized {
+ Title = Keine Konfiguration gefunden
+ Text = Die CryptoBox wurde noch nicht eingerichtet.
+ }
- NoSSL {
- Title = Unverschlüsselte Verbindung
- Text = Die CryptoBox akzeptiert nur verschlüsselte Verbindungen (https). So bleibt das Passwort vor neugierigen Augen geschützt. In wenigen Sekunden wird eine verschlüsselte Verbindung hergestellt.
- }
+ InitNotFinished {
+ Title = Initalisierung noch nicht abgeschlossen
+ Text = Die Initialisierung wird in wenigen Minuten beendet sein. Erst danach ist diese Aktion möglich.
+ }
- InitFailed {
- Title = Initialisierung fehlgeschlagen
- Text = Sende bitte den Inhalt des Protokolls (siehe oben) an die Entwickler der CryptoBox (cryptobox@systemausfall.org).
- }
+ IsMounted {
+ Title = Bereits aktiv
+ Text = Das verschlüsselte Dateisystem ist bereits aktiv.
+ }
- NoHardDisk {
- Title = Keine Festplatte
- Text = Es wurde kein Datenträger gefunden, der zur Speicherung der verschlüsselten Daten geeignet ist. Prüfe bitte, ob beim Anschalten des Computers eine Festplatte vom BIOS erkannt wurde.
- }
+ NotMounted {
+ Title = Nicht aktiv
+ Text = Das verschlüsselte Dateisystem ist derzeit nicht aktiv.
+ }
+
+ AlreadyConfigured {
+ Title = Konfiguration gefunden
+ Text = Die CryptoBox wurde bereits eingerichtet. Bei einer erneuten Initialisierung werden alle Daten gelöscht!
+ }
+
+ InvalidLanguage {
+ Title = Ungültige Sprache
+ Text = Die ausgewählte Sprache ist nicht verfügbar!
+ }
+
+ ConfigLanguageFailed {
+ Title = Fehler beim Ändern der Spracheinstellung
+ Text = Die Spracheinstellung konnte nicht geändert werden!
+ }
+
+ NoDiskAvailableForMount {
+ Title = Kein Daten-Container verfügbar
+ Text = Es ist kein inaktiver Daten-Container verfügbar. Vielleicht sind bereits alle Container aktiv?
+ }
+
+ NoDiskAvailableForUmount {
+ Title = Kein Daten-Container verfügbar
+ Text = Kein Daten-Container ist aktiv. Vielleicht wurden alle Container deaktiviert.
+ }
+
+ InvalidDevice {
+ Title = Ungültiger Container
+ Text = Der angegebene Daten-Container ist nicht zulässig.
+ }
+
+ InvalidVolumeName {
+ Title = Umbenennung fehlgeschlagen
+ Text = Der gewählte neue Name des Containers ist ungültig. Versuche es erneut.
+ }
+
+ SetVolumeNameFailed {
+ Title = Umbenennung fehlgeschlagen
+ Text = Die Umbenennung des Containers schlug fehl. Details findest du in der Log-Datei.
+ }
+
+ VolumeMayNotBeMounted {
+ Title = Der Container ist derzeit aktiv
+ Text = Die gewünschte Aktion kann nicht durchgeführt werden, solange der Container aktiv ist.
+ }
+}
+
+
+SuccessMessage {
+ InitRunning {
+ Title = Initialisierung läuft
+ Text = Die Initialisierung der CryptoBox wird im Hintergrund abgeschlossen. Du kannst die CryptoBox nun konfigurieren und das verschlüsselte Dateisystem in ein paar Minuten aktivieren.
+ }
+
+ ConfigSaved {
+ Title = Konfiguration gespeichert
+ Text = Die neuen Einstellungen der CryptoBox wurden übernommem.
+ }
+
+ MountDone {
+ Title = Crypto-Daten aktiviert
+ Text = Das verschlüsselte Dateisystem ist nun verfügbar.
+ }
+
+ UmountDone {
+ Title = Crypto-Daten deaktiviert
+ Text = Das verschlüsselte Dateisystem ist nun vor jedem Zugriff geschützt.
+ }
+
+ PowerOff {
+ Title = Abschaltung
+ Text = Die CryptoBox wird gerade heruntergefahren. In wenigen Sekunden kannst du sie ausschalten (falls dies nicht automatisch geschieht).
+ }
+
+ ReBoot {
+ Title = Neustart
+ Text = Die CryptoBox wird gerade neu gestartet. In wenigen Sekunden ist sie wieder verfügbar. Bitte warte solange - du wirst automatisch weitergeleitet.
+ }
+}
+
+
+ErrorMessage {
+
+ UnknownAction {
+ Title = Unbekannte Aktion
+ Text = Du hast eine undefinierte Aktion angefordert.
+ }
+
+ NoSSL {
+ Title = Unverschlüsselte Verbindung
+ Text = Die CryptoBox akzeptiert nur verschlüsselte Verbindungen (https). So bleibt das Passwort vor neugierigen Augen geschützt. In wenigen Sekunden wird eine verschlüsselte Verbindung hergestellt.
+ }
+
+ InitFailed {
+ Title = Initialisierung fehlgeschlagen
+ Text = Sende bitte den Inhalt des Protokolls (siehe oben) an die Entwickler der CryptoBox (cryptobox@systemausfall.org).
+ }
+
+ NoHardDisk {
+ Title = Keine Festplatte
+ Text = Es wurde kein Datenträger gefunden, der zur Speicherung der verschlüsselten Daten geeignet ist. Prüfe bitte, ob beim Anschalten des Computers eine Festplatte vom BIOS erkannt wurde.
+ }
+
+ NoDocumentation {
+ Title = Keine Hilfeseiten
+ Text = Es sind keine Hilfeseiten verfügbar!
}
}
+
diff --git a/lang/en.hdf b/lang/en.hdf
index 8cd6ccf..b06631b 100644
--- a/lang/en.hdf
+++ b/lang/en.hdf
@@ -1,255 +1,187 @@
-Lang {
+Name = English
- Name = english
-
- Status = $Id$
-
- Title {
- Top = The CryptoBox
- Slogan = Privacy for the rest of us.
- Init = CryptoBox initialization
- Mount = Activation of encrypted data
- Umount = Deactivation of encrypted data
- Config = CryptoBox configuration
- Log = CryptoBox logfiles
- System = System
- Status = Status
- Volume = Properties of
- }
-
-
- Text {
- EnterCurrentCryptoPassword = Enter the crypto password:
- EnterNewCryptoPassword = Enter the new crypto password:
- EnterSameCryptoPassword = Repeat the new crypto password:
- EnterCurrentAdminPassword = Enter the current administration password:
- EnterNewAdminPassword = Enter the new administration password:
- EnterSameAdminPassword = Repeat the new administration password:
- InitWarning = During the process of initialization ALL DATA on the disk WILL BE DELETED!
- ConfirmInitHint = To confirm that you know what you are doing, please enter exactly the following sequence:
- ConfirmInit = Yes, delete all data!
- PartitionInfo = Current partioning of the disk:
- IPAddress = Network address (IP) of the CryptoBox:
- TimeOut = Timeout for deactivation of the encrypted filesystem (in minutes):
- EmptyLog = The logfiles of the CryptoBox are empty.
- SelectLanguage = Language preferences:
- RedirectNote = Click here if your browser does not support automatic redirection.
- ProjectHomePage = Website of project
- ProjectNote = The CryptoBox is a project of
- DoUmount = Deactivation of the encrypted filesystem
- DoMount = Activation of the encrypted filesystem
- Configuration = Configuration
- CryptoIsActive = The encrypted data is accessible.
- CryptoIsDown = The encrypted data is protected from any access.
- ChoosePartition = Which container do you want to enable?
- ChosenPartition = The chosen container is
- ActivePartitions = The following containers are enabled
- PassivePartitions = The following containers are disabled
- ContainerName = Container's name:
- ContainerEncryption = Enable encryption
- }
-
-
- Button {
- DoInit = Initialization
- SaveConfig = Save configuration
- Update = Refresh
- Mount = Activate filesystem
- Umount = Deactivate filesystem
- Config = Configuration
- PowerOff = Shutdown
- ReBoot = Reboot
- Protocol = Show logfiles
- Documentation = Help
- Status = Status
- System = System
- ContainerNameSet = Change name
- InitContainer = Initialize container
- }
-
-
- WarningMessage {
- InitNotConfirmed {
- Title = Confirmation failed
- Text = The sentence has to be entered exactly as shown!
- }
-
- EmptyCryptoPassword {
- Title = Invalid crypto password
- Text = You have to enter a crypto password!
- }
-
- DifferentCryptoPasswords {
- Title = Crypto passwords do not match
- Text = Both entered passwords have to be identical to ensure this is the desired password.
- }
-
- DifferentAdminPasswords {
- Title = Administration passwords do not match
- Text = Both entered passwords have to be identical to ensure this is the desired password.
- }
-
- WrongAdminPassword {
- Title = Wrong Administration password
- Text = The entered administration password is wrong. Please try again.
- }
-
- MountFailed {
- Title = Activation failed
- Text = The encrypted filesystem could not be activated. Probably the given password was wrong. Please try again.
- }
-
- UmountFailed {
- Title = Deactivation failed
- Text = The encrypted filesystem could not be deactivated. Probably some files are still in use. Close all unclean programs (for example that widely used word processor). In case of emergency just shut down the CryptoBox!
- }
-
- NotInitialized {
- Title = No configuration found
- Text = The CryptoBox has not yet been configured.
- }
-
- InitNotFinished {
- Title = Initialization not yet completed
- Text = Initialization will be completed in a few minutes. After completed initialization this action will become available.
- }
-
- IsMounted {
- Title = Already active
- Text = The encrypted filesystem has already been activated.
- }
-
- NotMounted {
- Title = Inactive
- Text = The encrypted filesystem is currently not active.
- }
-
- AlreadyConfigured {
- Title = Configuration found
- Text = The CryptoBox has already been configured. If you initialize again, all data will be deleted!
- }
-
- InvalidLanguage {
- Title = Invalid language
- Text = The selected language is not available!
- }
-
- InvalidIP {
- Title = Invalid IP address
- Text = The selected network address is not valid!
- }
-
- InvalidTimeOut {
- Title = Invalid timeout
- Text = The selected timeout is not valid!
- }
-
- ConfigTimeOutFailed {
- Title = Error during change of timeout
- Text = The timeout value could not be changed!
- }
-
- ConfigLanguageFailed {
- Title = Error during change of language preferences
- Text = The language preferences could not be changed!
- }
-
- ConfigIPFailed {
- Title = Error during change of network address
- Text = The network address could not be changed!
- }
-
- IPAddressChanged {
- Title = Change of network address
- Text = The network address has been changed. In a few seconds you will get redirected to the new address.
- }
-
- NoDiskAvailableForMount {
- Title = No partition available
- Text = There is no unused container available. Maybe all containers are already mounted?
- }
-
- NoDiskAvailableForUmount {
- Title = No partition available
- Text = There is no active container available for turning off. Maybe there is no active container?
- }
-
- InvalidDevice {
- Title = Invalid device
- Text = The device you have chosen is invalid!
- }
-
- InvalidVolumeName {
- Title = Changing of container's name failed
- Text = The supplied new name of the container was invalid. Please try again!
- }
-
- SetVolumeNameFailed {
- Title = Changing of container's name failed
- Text = Could not change the name of the container. Take a look at the log files for details.
- }
-
- VolumeMayNotBeMounted {
- Title = The container is mounted
- Text = This action is not available while the container is active. Please turn it off first.
- }
- }
-
-
- SuccessMessage {
- InitRunning {
- Title = Initialization running
- Text = The initialization will be completed in background. You may configure it now and activate the encrypted filesystem in a few minutes.
- }
-
- ConfigSaved {
- Title = Configuration saved
- Text = The new settings have been accepted.
- }
-
- MountDone {
- Title = Encrypted filesystem activated
- Text = The encrypted filesystem is now available.
- }
-
- UmountDone {
- Title = Encrypted filesystem deactivated
- Text = The encrypted filesystem is now secured from all forms of access.
- }
-
- PowerOff {
- Title = Shutdown
- Text = The CryptoBox is currently going to halt. In a few seconds you can power it off (in case this does not happen automatically).
- }
-
- ReBoot {
- Title = Reboot
- Text = The CryptoBox is currently rebooting. In a few seconds it will be available again. Please wait - you will get redirected, when the reboot has finished.
- }
- }
-
-
- ErrorMessage {
-
- UnknownAction {
- Title = Unknown action
- Text = You have requested an undefined action.
- }
-
- NoSSL {
- Title = Unencrypted connection
- Text = The CryptoBox only accepts encrypted connections (https), so the password is safe from curious eyes. The encrypted connection will be established in a few seconds.
- }
-
- InitFailed {
- Title = Initialization failed
- Text = Please send the logfiles (see above) to the developers of the CryptoBox (cryptobox@systemausfall.org).
- }
-
- NoHardDisk {
- Title = No hard disk
- Text = No disk suitable for an encrypted filesystem found. Please ensure the BIOS detected the disk during power-on of the computer.
- }
- }
+Status = $Id$
+Title {
+ Top = The CryptoBox
+ Slogan = Privacy for the rest of us.
+ Init = CryptoBox initialization
+ Config = CryptoBox configuration
+ System = System
+ Status = Status
+ Volume = Volume
+ AccessDenied = Access denied
}
+
+
+Text {
+ AccessDenied = Sorry - you are not allowed to do this!
+ EnterCurrentPassword = Enter the password
+ EnterNewPassword = Enter new password
+ EnterSamePassword = Repeat new password
+ TimeOut = Timeout for deactivation of the encrypted filesystem (in minutes):
+ SelectLanguage = Language preferences:
+ RedirectNote = Click here if your browser does not support automatic redirection.
+ ProjectHomePage = Website of project
+ ProjectNote = The CryptoBox is a project of
+ Configuration = Configuration
+ CryptoIsActive = The encrypted data is accessible.
+ CryptoIsDown = The encrypted data is protected from any access.
+ ChoosePartition = Which container do you want to enable?
+ ChosenPartition = The chosen container is
+ ActivePartitions = The following containers are enabled
+ PassivePartitions = The following containers are disabled
+ ContainerName = Container's name
+ ContainerEncryption = Enable encryption
+}
+
+
+Button {
+ DoInit = Initialization
+ SaveConfig = Save configuration
+ Update = Refresh
+ Config = Configuration
+ Documentation = Help
+ Status = Status
+ System = System
+ InitContainer = Initialize container
+ SelectLanguage = Select language
+ HelpForForm = Get help
+}
+
+
+WarningMessage {
+
+ EmptyPassword {
+ Title = Missing password
+ Text = You have to enter a password!
+ }
+
+ EmptyNewPassword {
+ Title = Missing new password
+ Text = You have to enter a new password!
+ }
+
+ DifferentPasswords {
+ Title = Different passwords
+ Text = The passwords you entered did not match.
+ }
+
+ NotInitialized {
+ Title = No configuration found
+ Text = The CryptoBox has not yet been configured.
+ }
+
+ InitNotFinished {
+ Title = Initialization not yet completed
+ Text = Initialization will be completed in a few minutes. After completed initialization this action will become available.
+ }
+
+ AlreadyConfigured {
+ Title = Configuration found
+ Text = The CryptoBox has already been configured. If you initialize again, all data will be deleted!
+ }
+
+ InvalidLanguage {
+ Title = Invalid language
+ Text = The selected language is not available!
+ }
+
+
+ ConfigLanguageFailed {
+ Title = Error during change of language preferences
+ Text = The language preferences could not be changed!
+ }
+
+
+ NoDiskAvailableForMount {
+ Title = No partition available
+ Text = There is no unused container available. Maybe all containers are already mounted?
+ }
+
+ NoDiskAvailableForUmount {
+ Title = No partition available
+ Text = There is no active container available for turning off. Maybe there is no active container?
+ }
+
+ InvalidDevice {
+ Title = Invalid device
+ Text = The device you have chosen is invalid!
+ }
+
+
+ InvalidType {
+ Title = Unknown type
+ Text = The type of this volume is unknown.
+ }
+
+ VolumeMayNotBeMounted {
+ Title = The container is mounted
+ Text = This action is not available while the container is active. Please turn it off first.
+ }
+}
+
+
+SuccessMessage {
+ InitRunning {
+ Title = Initialization running
+ Text = The initialization will be completed in background. You may configure it now and activate the encrypted filesystem in a few minutes.
+ }
+
+ ConfigSaved {
+ Title = Configuration saved
+ Text = The new settings have been accepted.
+ }
+
+ PowerOff {
+ Title = Shutdown
+ Text = The CryptoBox is currently going to halt. In a few seconds you can power it off (in case this does not happen automatically).
+ }
+
+ ReBoot {
+ Title = Reboot
+ Text = The CryptoBox is currently rebooting. In a few seconds it will be available again. Please wait - you will get redirected, when the reboot has finished.
+ }
+}
+
+
+EnvironmentWarning {
+
+ ReadOnlyConfig {
+ Text = Read-only setup detected - probably you should create a configuration partition.
+ Link.Text = Initialize partition
+ Link.Rel = partition
+ }
+
+ NoSSL {
+ Text = The connection is not encrypted - passwords can be easily intercepted.
+ Link.Text = Use encrypted connection
+ Link.Prot = https
+ }
+ }
+}
+
+
+ErrorMessage {
+
+ UnknownAction {
+ Title = Unknown action
+ Text = You have requested an undefined action.
+ }
+
+ InitFailed {
+ Title = Initialization failed
+ Text = Please send the logfiles (see above) to the developers of the CryptoBox (cryptobox@systemausfall.org).
+ }
+
+ NoHardDisk {
+ Title = No hard disk
+ Text = No disk suitable for an encrypted filesystem found. Please ensure the BIOS detected the disk during power-on of the computer.
+ }
+
+ NoDocumentation {
+ Title = No documentation
+ Text = There is no documentation available!
+ }
+}
+
diff --git a/lang/fr.hdf b/lang/fr.hdf
index 462f796..e6241ee 100644
--- a/lang/fr.hdf
+++ b/lang/fr.hdf
@@ -1,256 +1,254 @@
-Lang {
+Name = Francais
- Name = francais
+Status = $Id$
- Status = $Id$
+Title {
+ Top = La CryptoBox
+ Slogan = La vie privée pour nous autres.
+ Init = Initialisation CryptoBox
+ Mount = Activation des données cryptées
+ Umount = Déactivation des données cryptées
+ Config = CryptoBox configuration
+ Log = fichiers log CryptoBox
+ System = Système
+ Status = Statut
+ Volume = Propriétés de
+}
- Title {
- Top = La CryptoBox
- Slogan = La vie privée pour nous autres.
- Init = Initialisation CryptoBox
- Mount = Activation des données cryptées
- Umount = Déactivation des données cryptées
- Config = CryptoBox configuration
- Log = fichiers log CryptoBox
- System = Système
- Status = Statut
- Volume = Propriétés de
+
+Text {
+ EnterCurrentCryptoPassword = Entrez le mot de passe crypto :
+ EnterNewCryptoPassword = Entrez le nouveau mot de passe crypto :
+ EnterSameCryptoPassword = Répétez le nouveau mot de passe crypto :
+ EnterCurrentAdminPassword = Entrez le mot de passe administrateur actuel:
+ EnterNewAdminPassword = Entrez le nouveau mot de passe administrateur :
+ EnterSameAdminPassword = Répétez le nouveau mot de passe administrateur :
+ InitWarning = Pendant le procès d'initialisation TOUTES LES DONNÉES sur le disque vont être SUPPRIMÉES !
+ ConfirmInitHint = Pour confirmer que vous sachiez exactement ce que vous faites, veuillez taper exactement la phrase suivante :
+ ConfirmInit = Oui, supprimer toutes les données !
+ PartitionInfo = Partitionnement actuel du disque :
+ IPAddress = Adresse réseau (IP) de la CryptoBox :
+ TimeOut = Timeout pour la désactivation du système de fichiers crypté (en minutes):
+ EmptyLog = Les fichiers log de la CryptoBox sont vides.
+ SelectLanguage = Préférences de langue :
+ RedirectNote = Cliquez ici si votre navigateur ne supporte pas la redirection automatique.
+ ProjectHomePage = Site web du projet
+ ProjectNote = La CryptoBox est un projet de
+ DoUmount = Déactivation du système de fichiers crypté
+ DoMount = Activation du système de fichiers crypté
+ Configuration = Configuration
+ CryptoIsActive = Les données cryptées sont accessibles.
+ CryptoIsDown = Les données cryptées sont protégés de tout accès.
+ ChoosePartition = Quel conteneur voulez-vous activer ?
+ ChosenPartition = Le conteneur que vous avez choisi est
+ ActivePartitions = Les conteneurs suivants sont activés
+ PassivePartitions = Les conteneurs suivants sont désactivés
+ ContainerName = Nom du conteneur :
+ ContainerEncryption = Aciver le cryptage
+}
+
+
+Button {
+ DoInit = Initialisation
+ SaveConfig = Sauvegarder la configuration
+ Update = Recharger
+ Mount = Activer système de fichiers
+ Umount = Déactiver système de fichiers
+ Config = Configuration
+ PowerOff = Arrêt
+ ReBoot = Redémarrage
+ Protocol = Montrer fichiers log
+ Documentation = Aide
+ Status = Status
+ System = Système
+ ContainerNameSet = Changer nom
+ InitContainer = Initialiser conteneur
+}
+
+
+WarningMessage {
+ InitNotConfirmed {
+ Title = Echec de la confirmation
+ Text = La phrase n'a pas été tapé exactement !
}
-
- Text {
- EnterCurrentCryptoPassword = Entrez le mot de passe crypto :
- EnterNewCryptoPassword = Entrez le nouveau mot de passe crypto :
- EnterSameCryptoPassword = Répétez le nouveau mot de passe crypto :
- EnterCurrentAdminPassword = Entrez le mot de passe administrateur actuel:
- EnterNewAdminPassword = Entrez le nouveau mot de passe administrateur :
- EnterSameAdminPassword = Répétez le nouveau mot de passe administrateur :
- InitWarning = Pendant le procès d'initialisation TOUTES LES DONNÉES sur le disque vont être SUPPRIMÉES !
- ConfirmInitHint = Pour confirmer que vous sachiez exactement ce que vous faites, veuillez taper exactement la phrase suivante :
- ConfirmInit = Oui, supprimer toutes les données !
- PartitionInfo = Partitionnement actuel du disque :
- IPAddress = Adresse réseau (IP) de la CryptoBox :
- TimeOut = Timeout pour la désactivation du système de fichiers crypté (en minutes):
- EmptyLog = Les fichiers log de la CryptoBox sont vides.
- SelectLanguage = Préférences de langue :
- RedirectNote = Cliquez ici si votre navigateur ne supporte pas la redirection automatique.
- ProjectHomePage = Site web du projet
- ProjectNote = La CryptoBox est un projet de
- DoUmount = Déactivation du système de fichiers crypté
- DoMount = Activation du système de fichiers crypté
- Configuration = Configuration
- CryptoIsActive = Les données cryptées sont accessibles.
- CryptoIsDown = Les données cryptées sont protégés de tout accès.
- ChoosePartition = Quel conteneur voulez-vous activer ?
- ChosenPartition = Le conteneur que vous avez choisi est
- ActivePartitions = Les conteneurs suivants sont activés
- PassivePartitions = Les conteneurs suivants sont désactivés
- ContainerName = Nom du conteneur :
- ContainerEncryption = Aciver le cryptage
+ EmptyCryptoPassword {
+ Title = Mot de passe crypto invalide
+ Text = Vous devez entrer un mot de passe crypto !
}
-
- Button {
- DoInit = Initialisation
- SaveConfig = Sauvegarder la configuration
- Update = Recharger
- Mount = Activer système de fichiers
- Umount = Déactiver système de fichiers
- Config = Configuration
- PowerOff = Arrêt
- ReBoot = Redémarrage
- Protocol = Montrer fichiers log
- Documentation = Aide
- Status = Status
- System = Système
- ContainerNameSet = Changer nom
- InitContainer = Initialiser conteneur
+ DifferentCryptoPasswords {
+ Title = Les mots de passe crypto ne correspondent pas
+ Text = Les deux mots de passe rentrés doivent être identiques afin de vérifier que ce mot de passe soit celui qui est désiré.
}
-
- WarningMessage {
- InitNotConfirmed {
- Title = Echec de la confirmation
- Text = La phrase n'a pas été tapé exactement !
- }
-
- EmptyCryptoPassword {
- Title = Mot de passe crypto invalide
- Text = Vous devez entrer un mot de passe crypto !
- }
-
- DifferentCryptoPasswords {
- Title = Les mots de passe crypto ne correspondent pas
- Text = Les deux mots de passe rentrés doivent être identiques afin de vérifier que ce mot de passe soit celui qui est désiré.
- }
-
- DifferentAdminPasswords {
- Title = Les mots de passe administrateur ne correspondent pas
- Text = Les deux mots de passe rentrés doivent être identiques afin de vérifier que ce mot de passe soit celui qui est désiré.
- }
-
- WrongAdminPassword {
- Title = Mot de passe administrateur erroné
- Text = Le mot de passe administrateur que vous avez rentré est erroné. Veuillez réessayer.
- }
-
- MountFailed {
- Title = Echec de l'activation
- Text = Le sytème de fichiers crypté n'a pu être activé. Probablement le mot de passe que vous avez fourni était erroné. Veuillez réessayer.
- }
-
- UmountFailed {
- Title = Echec de la désactivation
- Text = Le système de fichiers crypté n'a pu être désactivé. Probablement certains fichiers sont en cours d'utilisation. Fermez tous les programmes. En cas d'urgence, éteignez la CryptoBox !
- }
-
- NotInitialized {
- Title = Aucune configuration trouvée
- Text = La CryptoBox n'a pas encore été configurée.
- }
-
- InitNotFinished {
- Title = L'initialisation n'est pas encore complétée
- Text = L'initialisation va être complétée en quelques minutes. Après comlpétion de l'initialisation cette action va être disponible.
- }
-
- IsMounted {
- Title = Déjà actif
- Text = Le système de fichiers crypté a déjà été activé.
- }
-
- NotMounted {
- Title = Inactif
- Text = Le système de fichiers crypté n'est pas actif actuellement.
- }
-
- AlreadyConfigured {
- Title = Configuration trouvé
- Text = La CryptoBox a déjà été configurée. Si vous réinitialisez une nouvelle fois, toutes les données seront perdues !
- }
-
- InvalidLanguage {
- Title = Langue invalide
- Text = La langue choisie n'est pas disponible !
- }
-
- InvalidIP {
- Title = Addresse IP invalide
- Text = L'adresse réseau sélectionnée n'est pas valide !
- }
-
- InvalidTimeOut {
- Title = Timeout invalide
- Text = Le timeout sélectionné n'est pas valide !
- }
-
- ConfigTimeOutFailed {
- Title = Erreur pendant le changement du timeout
- Text = La valeur du timeout n'a pas pu être changé !
- }
-
- ConfigLanguageFailed {
- Title = Erreur pendant le changement des préférences de langue
- Text = Les préférences de langue n'ont pu être changées !
- }
-
- ConfigIPFailed {
- Title = Erreur pendant le changement de l'adresse réseau
- Text = L'adresse réseau n'a pas pu être changée !
- }
-
- IPAddressChanged {
- Title = Changement de l'adresse réseau
- Text = L'adresse réseau a été changée. dans quelques secondes vous allez être redirigés vers la nouvelle adresse.
- }
-
- NoDiskAvailableForMount {
- Title = Aucune partition disponible
- Text = Il n'y a pas de conteneur inutilisé disponible. Peut-être tous les conteneur sont déjà montés ?
- }
-
- NoDiskAvailableForUmount {
- Title = Aucune partition disponible
- Text = Il n'y a pas de conteneur actif qui peut être éteint. Peut-être n y a-t-il pas de conteneur actif ?
- }
-
- InvalidDevice {
- Title = Device invalide
- Text = Le device que vous avez choisi est invalide !
- }
-
- InvalidVolumeName {
- Title = Echec du changement du nom du conteneur
- Text = Le nouveau nom du conteneur était invalide. Veuillez réessayer !
- }
-
- SetVolumeNameFailed {
- Title = Echec lors du changmenent du nom du conteneur
- Text = Le nom du conteneur n'a pas pu être changé. Veuillez regarder les fichiers log pour plus de détails.
- }
-
- VolumeMayNotBeMounted {
- Title = Le conteneur est monté
- Text = Cette action n'est pas disponible pendant que le conteneur est actif. Désactivez-le d'abord.
- }
+ DifferentAdminPasswords {
+ Title = Les mots de passe administrateur ne correspondent pas
+ Text = Les deux mots de passe rentrés doivent être identiques afin de vérifier que ce mot de passe soit celui qui est désiré.
}
-
- SuccessMessage {
- InitRunning {
- Title = Initialisation en cours
- Text = L'initialisation va être complétée en tant que tâche de fond. Vous pouvez configurer maintenant et le système de fichiers crypté dans quelques minutes.
- }
-
- ConfigSaved {
- Title = Configuration sauvegardée
- Text = Les nouveaux paramètres ont été acceptés.
- }
-
- MountDone {
- Title = Système de fichiers crypté activé
- Text = Le système de fichiers crypté est maintenant disponible.
- }
-
- UmountDone {
- Title = Système de fichiers crypté déactivé
- Text = Le système de fichiers crypté est maintenant sécurisé de toute forme d'accès.
- }
-
- PowerOff {
- Title = Arrêt
- Text = La CryptoBox va maintenant s'éteindre. Dans quelques secondes vous pouvez l'éteindre (au cas où ceci ne se passe pas automatiquement).
- }
-
- ReBoot {
- Title = Redémarrage
- Text = La CryptoBox est en train de redémarrer. Dans quelques secondes elle va à nouveau être disponible. Veuillez attendre - vous allez être redirigés quand le redémarrage est accomplie.
- }
+ WrongAdminPassword {
+ Title = Mot de passe administrateur erroné
+ Text = Le mot de passe administrateur que vous avez rentré est erroné. Veuillez réessayer.
}
-
- ErrorMessage {
-
- UnknownAction {
- Title = Action inconnue
- Text = Vous avez demandé une action indéfinie.
- }
-
- NoSSL {
- Title = Connexion non cryptée
- Text = La CryptoBox accepte seulement des connexions cryptées (https), afin que le mot de passe ne soit pas visible pour des yeux curieux. La connexion cryptée va être établie dans quelques secondes.
- }
-
- InitFailed {
- Title = Initialisation échouée
- Text = Veuillez envoyer les fichiers log (voir ci-dessus) aux développeurs de la CryptoBox (cryptobox@systemausfall.org).
- }
-
- NoHardDisk {
- Title = Aucun disque dur
- Text = Aucun disque utilisable pour un système de fichier crypté a été trouvé. Veuillez vérifier que le BIOS a détecté le disque pendant le démarrage de l'ordinateur.
- }
+ MountFailed {
+ Title = Echec de l'activation
+ Text = Le sytème de fichiers crypté n'a pu être activé. Probablement le mot de passe que vous avez fourni était erroné. Veuillez réessayer.
}
+ UmountFailed {
+ Title = Echec de la désactivation
+ Text = Le système de fichiers crypté n'a pu être désactivé. Probablement certains fichiers sont en cours d'utilisation. Fermez tous les programmes. En cas d'urgence, éteignez la CryptoBox !
+ }
+
+ NotInitialized {
+ Title = Aucune configuration trouvée
+ Text = La CryptoBox n'a pas encore été configurée.
+ }
+
+ InitNotFinished {
+ Title = L'initialisation n'est pas encore complétée
+ Text = L'initialisation va être complétée en quelques minutes. Après comlpétion de l'initialisation cette action va être disponible.
+ }
+
+ IsMounted {
+ Title = Déjà actif
+ Text = Le système de fichiers crypté a déjà été activé.
+ }
+
+ NotMounted {
+ Title = Inactif
+ Text = Le système de fichiers crypté n'est pas actif actuellement.
+ }
+
+ AlreadyConfigured {
+ Title = Configuration trouvé
+ Text = La CryptoBox a déjà été configurée. Si vous réinitialisez une nouvelle fois, toutes les données seront perdues !
+ }
+
+ InvalidLanguage {
+ Title = Langue invalide
+ Text = La langue choisie n'est pas disponible !
+ }
+
+ InvalidIP {
+ Title = Addresse IP invalide
+ Text = L'adresse réseau sélectionnée n'est pas valide !
+ }
+
+ InvalidTimeOut {
+ Title = Timeout invalide
+ Text = Le timeout sélectionné n'est pas valide !
+ }
+
+ ConfigTimeOutFailed {
+ Title = Erreur pendant le changement du timeout
+ Text = La valeur du timeout n'a pas pu être changé !
+ }
+
+ ConfigLanguageFailed {
+ Title = Erreur pendant le changement des préférences de langue
+ Text = Les préférences de langue n'ont pu être changées !
+ }
+
+ ConfigIPFailed {
+ Title = Erreur pendant le changement de l'adresse réseau
+ Text = L'adresse réseau n'a pas pu être changée !
+ }
+
+ IPAddressChanged {
+ Title = Changement de l'adresse réseau
+ Text = L'adresse réseau a été changée. dans quelques secondes vous allez être redirigés vers la nouvelle adresse.
+ }
+
+ NoDiskAvailableForMount {
+ Title = Aucune partition disponible
+ Text = Il n'y a pas de conteneur inutilisé disponible. Peut-être tous les conteneur sont déjà montés ?
+ }
+
+ NoDiskAvailableForUmount {
+ Title = Aucune partition disponible
+ Text = Il n'y a pas de conteneur actif qui peut être éteint. Peut-être n y a-t-il pas de conteneur actif ?
+ }
+
+ InvalidDevice {
+ Title = Device invalide
+ Text = Le device que vous avez choisi est invalide !
+ }
+
+ InvalidVolumeName {
+ Title = Echec du changement du nom du conteneur
+ Text = Le nouveau nom du conteneur était invalide. Veuillez réessayer !
+ }
+
+ SetVolumeNameFailed {
+ Title = Echec lors du changmenent du nom du conteneur
+ Text = Le nom du conteneur n'a pas pu être changé. Veuillez regarder les fichiers log pour plus de détails.
+ }
+
+ VolumeMayNotBeMounted {
+ Title = Le conteneur est monté
+ Text = Cette action n'est pas disponible pendant que le conteneur est actif. Désactivez-le d'abord.
+ }
+}
+
+
+SuccessMessage {
+ InitRunning {
+ Title = Initialisation en cours
+ Text = L'initialisation va être complétée en tant que tâche de fond. Vous pouvez configurer maintenant et le système de fichiers crypté dans quelques minutes.
+ }
+
+ ConfigSaved {
+ Title = Configuration sauvegardée
+ Text = Les nouveaux paramètres ont été acceptés.
+ }
+
+ MountDone {
+ Title = Système de fichiers crypté activé
+ Text = Le système de fichiers crypté est maintenant disponible.
+ }
+
+ UmountDone {
+ Title = Système de fichiers crypté déactivé
+ Text = Le système de fichiers crypté est maintenant sécurisé de toute forme d'accès.
+ }
+
+ PowerOff {
+ Title = Arrêt
+ Text = La CryptoBox va maintenant s'éteindre. Dans quelques secondes vous pouvez l'éteindre (au cas où ceci ne se passe pas automatiquement).
+ }
+
+ ReBoot {
+ Title = Redémarrage
+ Text = La CryptoBox est en train de redémarrer. Dans quelques secondes elle va à nouveau être disponible. Veuillez attendre - vous allez être redirigés quand le redémarrage est accomplie.
+ }
+}
+
+
+ErrorMessage {
+
+ UnknownAction {
+ Title = Action inconnue
+ Text = Vous avez demandé une action indéfinie.
+ }
+
+ NoSSL {
+ Title = Connexion non cryptée
+ Text = La CryptoBox accepte seulement des connexions cryptées (https), afin que le mot de passe ne soit pas visible pour des yeux curieux. La connexion cryptée va être établie dans quelques secondes.
+ }
+
+ InitFailed {
+ Title = Initialisation échouée
+ Text = Veuillez envoyer les fichiers log (voir ci-dessus) aux développeurs de la CryptoBox (cryptobox@systemausfall.org).
+ }
+
+ NoHardDisk {
+ Title = Aucun disque dur
+ Text = Aucun disque utilisable pour un système de fichier crypté a été trouvé. Veuillez vérifier que le BIOS a détecté le disque pendant le démarrage de l'ordinateur.
+ }
+}
+
}
diff --git a/lang/language_specification.txt b/lang/language_specification.txt
new file mode 100644
index 0000000..7cfaf44
--- /dev/null
+++ b/lang/language_specification.txt
@@ -0,0 +1,24 @@
+Some important notes regarding the language files:
+
+1) language file informations
+
+The toplevel attribute "Name" is mandatory and should represent the local name of
+the language (e.g.: English, German, French, ...).
+
+
+2) warning/success messages
+
+Attributes:
+ Title - title of the message
+ Text - text of the message
+ Link.Text - textual representation of a link
+ Link.Abs - absolute URL e.g. http://cryptobox.org/trac
+ Link.Prot - http|https
+ Link.Rel - relative url (based on the cgi root)
+
+ All values are optional, but you should follow these rules:
+ - at least one of "Title" and "Text" should be defined
+ - if there are "Link" attributes, then you should also define "Link.Text"
+ - "Link.Abs" can not be combined with "Link.Prot" or "Link.Rel"
+ - "Link.Rel" and "Link.Prot" may be used together
+
diff --git a/lang/si.hdf b/lang/si.hdf
index 2ec7a35..802cd8e 100644
--- a/lang/si.hdf
+++ b/lang/si.hdf
@@ -1,215 +1,193 @@
-Lang {
+Name = Slovenščina
- Name = slovenščina
-
- Status = $Id$
-
- Title {
- Top = The CryptoBox
- Slogan = Privatnost v vsako vas!
- Init = CryptoBox zagon
- Mount = Aktivacija kriptiranih podatkov
- Umount = Deaktivacija kriptiranih podatkov
- Config = CryptoBox konfiguracija
- Log = CryptoBox dnevnik
- ShutDown = Ugasni
- Status = Stanje
- }
-
-
- Text {
- EnterCurrentCryptoPassword = Vpišite geslo:
- EnterNewCryptoPassword = Vpišite novo geslo:
- EnterSameCryptoPassword = Ponovite novo geslo:
- EnterCurrentAdminPassword = Vnesite trenutno obstoječe geslo administratorja/ke:
- EnterNewAdminPassword = Vnesite novo geslo administratorja/ke:
- EnterSameAdminPassword = Ponovite novo geslo administratorja/ke:
- InitWarning = Med incializacijo bodo VSI PODATKI z vašega trdega diska IZBRISANI!
- ConfirmInitHint = Vsled potrditve vaših dejanj vpišite naslednje besedilo:
- ConfirmInit = Da, zbirši vse podatke!
- PartitionInfo = trenutna porazdelitev trdega diska:
- IPAddress = IP CryptoBoxa:
- TimeOut = Čas preklica deaktivacije kriptiranega datotečnega sistema:(v minutah)
- EmptyLog = Dnevnik CryptoBoxa je prazen.
- SelectLanguage = Jezikovne nastavitve:
- RedirectNote = Kliknite če vaš iskalnik ne podpira avtomatične preusmeritve.
- ProjectHomePage = Spletna stran projekta
- ProjectNote = CryptoBox je projekt
- DoUmount = Deaktivacija kriptiranega datotečnega sistema
- DoMount = Aktivacija kriptiranega datotečnega sistema
- Configuration = Konfiguracija
- CryptoIsActive = Kriptirani podatki so dostopni.
- CryptoIsDown = Kriptirani podatki soso zaèiteni pred kakr nimkoli dostopom.
- }
-
-
- Button {
- DoInit = Zagon CryptoBoxa
- SaveConfig = Shrani konfiguracijo
- Update = Osveži
- Mount = Aktivacija kriptiranega datotečnega sistema
- Umount = Deaktivacija kriptiranega datotečnega sistema
- Config = Konfiguracija
- PowerOff = Ugasni
- ReBoot = Ponovni zagon
- Protocol = Dnevnik
- Documentation = Priročnik
- Status = Stanje
- }
-
-
- WarningMessage {
- InitNotConfirmed {
- Title = Potrditev ni uspela
- Text = Besedilo mora biti vpisano natanko kot je prikazano!
- }
-
- EmptyCryptoPassword {
- Title = Nepravilno geslo
- Text = Geslo ne sme biti prazno!
- }
-
- DifferentCryptoPasswords {
- Title = Gesli se ne ujemata!
- Text = Obe vnešeni gesli morata biti identični, v zagotovilo, da je vpisano željeno geslo.
- }
-
- DifferentAdminPasswords {
- Title = Administracijski gesli se ne ujemata
- Text = Obe vnešeni gesli morata biti identični, v zagotovilo da je vpisano željeno geslo.
- }
-
- WrongAdminPassword {
- Title = Napačno administracijsko geslo!
- Text = Vnešeno administracijsko geslo je nepravilno. Prosimo poskusite znova!
- }
-
- MountFailed {
- Title = Aktivacija ni uspela
- Text = Kriptiran datotečni sistem se ni aktiviral.Po vsej verjetnosti je bilo geslo napačno.
- }
-
- UmountFailed {
- Title = Deaktivacija ni uspela
- Text = Kriptiran datotečni sistem se ni aktiviral.Datoteke so morda v uporabi. Zaprite vse programe. (naprimer ta nadvse razširjen urejevalnik besedil). V primeru nuje ugasnite CryptoBox!
- }
-
- NotInitialized {
- Title = Konfiguracija ni najdena
- Text = CryptoBox še ni bil konfiguriran.
- }
-
- InitNotFinished {
- Title = Zagon še ni dovršen
- Text = Zagon bo dovršen v nekaj minutah. Po končanem zagonu bo ta možnost omogočena.
- }
-
- IsMounted {
- Title = Že aktivno
- Text = Kriptiran datotečni sistem je že aktiviran.
- }
-
- NotMounted {
- Title = Onemogočeno
- Text = Kriptiran datotečni sistem trenutno ni aktiven.
- }
-
- AlreadyConfigured {
- Title = Konfiguracija uspela
- Text = CryptoBox je đe bil konfiguriran. Če ponovno zaženete bodo vsi podatki izbrisani!
- }
-
- InvalidLanguage {
- Title = Nepravilna izbira jezika
- Text = Izbrani jezik ni na voljo!
- }
-
- InvalidIP {
- Title = Napačen IP naslov
- Text = Izbran omrežni naslov ni veljaven!
- }
-
- InvalidTimeOut {
- Title = Nepravilen čas preklica
- Text = Izbran čas preklica ni veljaven!
- }
-
- ConfigTimeOutFailed {
- Title = Napaka med spremembo časa preklica
- Text = Časa preklica ne morete spremeniti!
- }
-
- ConfigLanguageFailed {
- Title = Napaka med spremembo jezikovnih nastavitev
- Text = Spreminjanje jezikovnih nastavitev ni mogoče.
- }
-
- ConfigIPFailed {
- Title = Napaka med spreminjanjem omrežnega naslova.
- Text = Spreminjanje omrežnega naslova ni mogoče.
- }
-
- IPAddressChanged {
- Title = Sprememba omrežnega naslova
- Text = Omrežni naslov je spremenjen. V nekaj sekundah boste preusmerjeni na nov naslov.
- }
- }
-
-
- SuccessMessage {
- InitRunning {
- Title = Zagon poteka
- Text = Zagon bo dokončan v ozadju.
- }
-
- ConfigSaved {
- Title = Konfiguracija spravljena
- Text = Nove nastavitve so sprejete.
- }
-
- MountDone {
- Title = Kriptiran datotečni sistem aktiviran
- Text = Kriptiran datotečni sistem je na voljo.
- }
-
- UmountDone {
- Title = Kriptiran datotečni sistem deaktiviran.
- Text = Kriptiran datotečni sistem je varovan pred vstopom.
- }
-
- PowerOff {
- Title = Ugasni
- Text = CryptoBox se zaustavlja. V nekaj sekundah ga lahko izklopite.(v kolikor se to ne zgodi avtomatično).
- }
-
- ReBoot {
- Title = Ponovni zagon
- Text = CryptoBox se zaganja. V nekaj sekundah bo zopet na voljo.
- }
- }
-
-
- ErrorMessage {
-
- UnknownAction {
- Title = Neznan zahtevek
- Text = Podali ste nedefiniran zahtevek.
- }
-
- NoSSL {
- Title = Nekriptirana povezava
- Text = CryptoBox sprejme le kriptirane povezave (https), da je geslo zaščiteno pred radovednimi očmi. V nekaj sekundah bo kriptirana povezava vzpostavljena.
- }
-
- InitFailed {
- Title = Zagon ni uspel
- Text = Prosim pošljite dnevnik (poglejte zgoraj) razvijalcem CryptoBoxa (cryptobox@systemausfall.org).
- }
-
- NoHardDisk {
- Title = Ni trdega diska
- Text = Primeren trdi disk za shranjenje kriptiranega datotečnega sistema ni zaznan. Poskrbite da bo med zagonom BIOS zaznal trdi disk.
- }
- }
+Status = $Id$
+Title {
+ Top = The CryptoBox
+ Slogan = Privatnost v vsako vas!
+ Init = CryptoBox zagon
+ Mount = Aktivacija kriptiranih podatkov
+ Umount = Deaktivacija kriptiranih podatkov
+ Config = CryptoBox konfiguracija
+ Log = CryptoBox dnevnik
+ ShutDown = Ugasni
+ Status = Stanje
}
+
+
+Text {
+ EnterCurrentCryptoPassword = Vpišite geslo:
+ EnterNewCryptoPassword = Vpišite novo geslo:
+ EnterSameCryptoPassword = Ponovite novo geslo:
+ EnterCurrentAdminPassword = Vnesite trenutno obstoječe geslo administratorja/ke:
+ EnterNewAdminPassword = Vnesite novo geslo administratorja/ke:
+ EnterSameAdminPassword = Ponovite novo geslo administratorja/ke:
+ InitWarning = Med incializacijo bodo VSI PODATKI z vašega trdega diska IZBRISANI!
+ ConfirmInitHint = Vsled potrditve vaših dejanj vpišite naslednje besedilo:
+ ConfirmInit = Da, zbirši vse podatke!
+ PartitionInfo = trenutna porazdelitev trdega diska:
+ IPAddress = IP CryptoBoxa:
+ TimeOut = Čas preklica deaktivacije kriptiranega datotečnega sistema:(v minutah)
+ EmptyLog = Dnevnik CryptoBoxa je prazen.
+ SelectLanguage = Jezikovne nastavitve:
+ RedirectNote = Kliknite če vaš iskalnik ne podpira avtomatične preusmeritve.
+ ProjectHomePage = Spletna stran projekta
+ ProjectNote = CryptoBox je projekt
+ DoUmount = Deaktivacija kriptiranega datotečnega sistema
+ DoMount = Aktivacija kriptiranega datotečnega sistema
+ Configuration = Konfiguracija
+ CryptoIsActive = Kriptirani podatki so dostopni.
+ CryptoIsDown = Kriptirani podatki soso zaèiteni pred kakr nimkoli dostopom.
+}
+
+
+Button {
+ DoInit = Zagon CryptoBoxa
+ SaveConfig = Shrani konfiguracijo
+ Update = Osveži
+ Mount = Aktivacija kriptiranega datotečnega sistema
+ Umount = Deaktivacija kriptiranega datotečnega sistema
+ Config = Konfiguracija
+ PowerOff = Ugasni
+ ReBoot = Ponovni zagon
+ Protocol = Dnevnik
+ Documentation = Priročnik
+ Status = Stanje
+ System = System
+}
+
+
+WarningMessage {
+ InitNotConfirmed {
+ Title = Potrditev ni uspela
+ Text = Besedilo mora biti vpisano natanko kot je prikazano!
+ }
+
+ EmptyCryptoPassword {
+ Title = Nepravilno geslo
+ Text = Geslo ne sme biti prazno!
+ }
+
+ DifferentCryptoPasswords {
+ Title = Gesli se ne ujemata!
+ Text = Obe vnešeni gesli morata biti identični, v zagotovilo, da je vpisano željeno geslo.
+ }
+
+ DifferentAdminPasswords {
+ Title = Administracijski gesli se ne ujemata
+ Text = Obe vnešeni gesli morata biti identični, v zagotovilo da je vpisano željeno geslo.
+ }
+
+ WrongAdminPassword {
+ Title = Napačno administracijsko geslo!
+ Text = Vnešeno administracijsko geslo je nepravilno. Prosimo poskusite znova!
+ }
+
+ MountFailed {
+ Title = Aktivacija ni uspela
+ Text = Kriptiran datotečni sistem se ni aktiviral.Po vsej verjetnosti je bilo geslo napačno.
+ }
+
+ UmountFailed {
+ Title = Deaktivacija ni uspela
+ Text = Kriptiran datotečni sistem se ni aktiviral.Datoteke so morda v uporabi. Zaprite vse programe. (naprimer ta nadvse razširjen urejevalnik besedil). V primeru nuje ugasnite CryptoBox!
+ }
+
+ NotInitialized {
+ Title = Konfiguracija ni najdena
+ Text = CryptoBox še ni bil konfiguriran.
+ }
+
+ InitNotFinished {
+ Title = Zagon še ni dovršen
+ Text = Zagon bo dovršen v nekaj minutah. Po končanem zagonu bo ta možnost omogočena.
+ }
+
+ IsMounted {
+ Title = Že aktivno
+ Text = Kriptiran datotečni sistem je že aktiviran.
+ }
+
+ NotMounted {
+ Title = Onemogočeno
+ Text = Kriptiran datotečni sistem trenutno ni aktiven.
+ }
+
+ AlreadyConfigured {
+ Title = Konfiguracija uspela
+ Text = CryptoBox je đe bil konfiguriran. Če ponovno zaženete bodo vsi podatki izbrisani!
+ }
+
+ InvalidLanguage {
+ Title = Nepravilna izbira jezika
+ Text = Izbrani jezik ni na voljo!
+ }
+
+ ConfigLanguageFailed {
+ Title = Napaka med spremembo jezikovnih nastavitev
+ Text = Spreminjanje jezikovnih nastavitev ni mogoče.
+ }
+}
+
+
+SuccessMessage {
+ InitRunning {
+ Title = Zagon poteka
+ Text = Zagon bo dokončan v ozadju.
+ }
+
+ ConfigSaved {
+ Title = Konfiguracija spravljena
+ Text = Nove nastavitve so sprejete.
+ }
+
+ MountDone {
+ Title = Kriptiran datotečni sistem aktiviran
+ Text = Kriptiran datotečni sistem je na voljo.
+ }
+
+ UmountDone {
+ Title = Kriptiran datotečni sistem deaktiviran.
+ Text = Kriptiran datotečni sistem je varovan pred vstopom.
+ }
+
+ PowerOff {
+ Title = Ugasni
+ Text = CryptoBox se zaustavlja. V nekaj sekundah ga lahko izklopite.(v kolikor se to ne zgodi avtomatično).
+ }
+
+ ReBoot {
+ Title = Ponovni zagon
+ Text = CryptoBox se zaganja. V nekaj sekundah bo zopet na voljo.
+ }
+}
+
+
+ErrorMessage {
+
+ UnknownAction {
+ Title = Neznan zahtevek
+ Text = Podali ste nedefiniran zahtevek.
+ }
+
+ NoSSL {
+ Title = Nekriptirana povezava
+ Text = CryptoBox sprejme le kriptirane povezave (https), da je geslo zaščiteno pred radovednimi očmi. V nekaj sekundah bo kriptirana povezava vzpostavljena.
+ }
+
+ InitFailed {
+ Title = Zagon ni uspel
+ Text = Prosim pošljite dnevnik (poglejte zgoraj) razvijalcem CryptoBoxa (cryptobox@systemausfall.org).
+ }
+
+ NoHardDisk {
+ Title = Ni trdega diska
+ Text = Primeren trdi disk za shranjenje kriptiranega datotečnega sistema ni zaznan. Poskrbite da bo med zagonom BIOS zaznal trdi disk.
+ }
+
+ NoDocumentation {
+ Title = No documentation
+ Text = There is no documentation available!
+ }
+}
+
diff --git a/plugins/date/date.py b/plugins/date/date.py
new file mode 100644
index 0000000..466a81a
--- /dev/null
+++ b/plugins/date/date.py
@@ -0,0 +1,69 @@
+import CryptoBoxPlugin
+
+
+class date(CryptoBoxPlugin.CryptoBoxPlugin):
+
+ pluginCapabilities = [ "system" ]
+ requestAuth = False
+ rank = 10
+
+ def doAction(self, store=None, year=None, month=None, day=None, hour=None, minute=None):
+ import datetime
+ if store:
+ try:
+ year, month, day = int(year), int(month), int(day)
+ hour, minute = int(hour), int(minute)
+ new_date = datetime.datetime(year, month, day, hour, minute)
+ except ValueError:
+ self.hdf["Data.Warning"] = "Plugins.date.InvalidDate"
+ self.__prepareFormData()
+ return "form_date"
+ date = "%02d%02d%02d%02d%d" % (month, day, hour, minute, year)
+ if self.__setDate(date):
+ self.cbox.log.info("changed date to: %s" % date)
+ self.hdf["Data.Success"] = "Plugins.date.DateChanged"
+ return None
+ else:
+ ## a failure should usually be an invalid date (we do not check it really)
+ self.cbox.log.info("failed to set date: %s" % date)
+ self.hdf["Data.Warning"] = "Plugins.date.InvalidDate"
+ self.__prepareFormData()
+ return "form_date"
+ else:
+ self.__prepareFormData()
+ return "form_date"
+
+
+ def getStatus(self):
+ now = self.__getCurrentDate()
+ return "%d/%d/%d/%d/%d/%d" % (now.year, now.month, now.day, now.hour, now.minute, now.second)
+
+
+ def __prepareFormData(self):
+ date = self.__getCurrentDate()
+ self.hdf[self.hdf_prefix + "year"] = date.year
+ self.hdf[self.hdf_prefix + "month"] = date.month
+ self.hdf[self.hdf_prefix + "day"] = date.day
+ self.hdf[self.hdf_prefix + "hour"] = date.hour
+ self.hdf[self.hdf_prefix + "minute"] = date.minute
+
+
+ def __getCurrentDate(self):
+ import datetime
+ return datetime.datetime(2000,1,1).now()
+
+
+ def __setDate(self, date):
+ import subprocess
+ import os
+ proc = subprocess.Popen(
+ shell = False,
+ args = [
+ self.cbox.prefs["Programs"]["super"],
+ self.cbox.prefs["Programs"]["CryptoBoxRootActions"],
+ "plugin",
+ os.path.join(self.pluginDir, "root_action.py"),
+ date])
+ proc.wait()
+ return proc.returncode == 0
+
diff --git a/plugins/date/form_date.cs b/plugins/date/form_date.cs
new file mode 100644
index 0000000..3dd732a
--- /dev/null
+++ b/plugins/date/form_date.cs
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
diff --git a/plugins/date/lang/en.hdf b/plugins/date/lang/en.hdf
new file mode 100644
index 0000000..df00df5
--- /dev/null
+++ b/plugins/date/lang/en.hdf
@@ -0,0 +1,35 @@
+Name = Change date and time
+Link = Set date/time
+
+Title.ConfigDate = Date and time setting
+
+Button.ConfigDate = Set date and time
+
+Text.Date = Date
+Text.Time = Time
+Text.Months {
+ 1 = January
+ 2 = February
+ 3 = March
+ 4 = April
+ 5 = May
+ 6 = June
+ 7 = July
+ 8 = August
+ 9 = September
+ 10 = October
+ 11 = November
+ 12 = December
+}
+
+SuccessMessage.DateChanged {
+ Title = Date changed
+ Text = The date was changed successfully.
+}
+
+WarningMessage {
+ InvalidDate {
+ Title = Invalid value
+ Text = An invalid value for date or time was supplied. Please try again.
+ }
+}
diff --git a/plugins/date/plugin_icon.png b/plugins/date/plugin_icon.png
new file mode 100644
index 0000000..f263906
Binary files /dev/null and b/plugins/date/plugin_icon.png differ
diff --git a/plugins/date/root_action.py b/plugins/date/root_action.py
new file mode 100755
index 0000000..609f0c3
--- /dev/null
+++ b/plugins/date/root_action.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python2.4
+
+## necessary: otherwise CryptoBoxRootActions.py will refuse to execute this script
+PLUGIN_TYPE = "cryptobox"
+
+DATE_BIN = "/bin/date"
+
+import subprocess
+import re
+import sys
+import os
+
+if __name__ == "__main__":
+ args = sys.argv[1:]
+
+ self_bin = sys.argv[0]
+
+ if len(args) > 1:
+ sys.stderr.write("%s: too many arguments (%s)\n" % (self_bin, args))
+ sys.exit(1)
+
+ if len(args) == 0:
+ sys.stderr.write("%s: no argument supplied\n" % self_bin)
+ sys.exit(1)
+
+ if re.search(u'\D', args[0]):
+ sys.stderr.write("%s: illegal argument (%s)\n" % (self_bin, args[0]))
+ sys.exit(1)
+
+ proc = subprocess.Popen(
+ shell = False,
+ stdout = subprocess.PIPE,
+ args = [DATE_BIN, args[0]])
+ proc.wait()
+ sys.exit(proc.returncode)
+
diff --git a/plugins/date/unittests.py b/plugins/date/unittests.py
new file mode 100644
index 0000000..82f1faa
--- /dev/null
+++ b/plugins/date/unittests.py
@@ -0,0 +1,60 @@
+import WebInterfaceTestClass
+
+class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
+
+ def test_get_date(self):
+ date = self._getCurrentDate()
+
+
+ def test_change_date(self):
+ now = self._getCurrentDate()
+ ## copy current time
+ new_date = dict(now)
+ ## move three minutes forward (more is not nice because of screensavers)
+ new_date["minute"] = (now["minute"] + 3) % 60
+ ## in case of minute-overflow we also have to move the hour a little bit forward
+ new_date["hour"] = now["hour"] + ((now["minute"] + 3) / 60)
+ ## move forward ...
+ self._setDate(new_date)
+ self.assertEquals(new_date, self._getCurrentDate())
+ ## ... and backward
+ self._setDate(now)
+ self.assertEquals(now, self._getCurrentDate())
+
+
+ def _getCurrentDate(self):
+ date_url = self.URL + "date"
+ self.register_auth(date_url)
+ self.cmd.go(date_url)
+ self.cmd.find("Data.Status.Plugins.date=([0-9]+/[0-9]+/[0-9]+/[0-9]+/[0-9]+/[0-9]+)$", "m")
+ dateNumbers = self.locals["__match__"].split("/")
+ self.assertEquals(len(dateNumbers), 6)
+ ## we ignore seconds
+ dateField = {
+ "year" : int(dateNumbers[0]),
+ "month" : int(dateNumbers[1]),
+ "day" : int(dateNumbers[2]),
+ "hour" : int(dateNumbers[3]),
+ "minute" : int(dateNumbers[4])}
+ return dateField
+
+
+ def _setDate(self, date):
+ """for now we have to use this function instead of the one below"""
+ date_url = self.URL + "date?store=1&year=%d&month=%d&day=%d&hour=%d&minute=%d" % (date["year"], date["month"], date["day"], date["hour"], date["minute"])
+ self.register_auth(date_url)
+ self.cmd.go(date_url)
+
+
+ def _setDateBroken(self, date):
+ """this should work, but the parsing of twill seems to be broken"""
+ date_url = self.URL + "date"
+ self.register_auth(date_url)
+ self.cmd.go(date_url)
+ self.cmd.formvalue("set_date", "year", str(date["year"]))
+ self.cmd.formvalue("set_date", "month", str(date["month"]))
+ self.cmd.formvalue("set_date", "day", str(date["day"]))
+ self.cmd.formvalue("set_date", "hour", str(date["hour"]))
+ self.cmd.formvalue("set_date", "minute", str(date["minute"]))
+ self.cmd.submit()
+
diff --git a/plugins/disks/disks.cs b/plugins/disks/disks.cs
new file mode 100644
index 0000000..8857774
--- /dev/null
+++ b/plugins/disks/disks.cs
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/disks/disks.py b/plugins/disks/disks.py
new file mode 100644
index 0000000..5824a72
--- /dev/null
+++ b/plugins/disks/disks.py
@@ -0,0 +1,17 @@
+import CryptoBoxPlugin
+
+class disks(CryptoBoxPlugin.CryptoBoxPlugin):
+
+ pluginCapabilities = [ "menu" ]
+ requestAuth = False
+ rank = 10
+
+ def doAction(self):
+ self.cbox.reReadContainerList()
+ return "disks"
+
+
+ def getStatus(self):
+ return "TODO"
+
+
diff --git a/plugins/disks/lang/de.hdf b/plugins/disks/lang/de.hdf
new file mode 100644
index 0000000..c2ef355
--- /dev/null
+++ b/plugins/disks/lang/de.hdf
@@ -0,0 +1,6 @@
+Name = Datenträger-Übersicht
+Link = Datenträger
+
+Title.Disks = Verfügbare Datenträger
+
+Text.NoDisksAvailable = Es sind keine Datenträger verfügbar!
diff --git a/plugins/disks/lang/en.hdf b/plugins/disks/lang/en.hdf
new file mode 100644
index 0000000..f30795a
--- /dev/null
+++ b/plugins/disks/lang/en.hdf
@@ -0,0 +1,6 @@
+Name = Disk overview
+Link = Disks
+
+Title.Disks = Available disks
+
+Text.NoDisksAvailable = No available disks were found!
diff --git a/plugins/disks/plugin_icon.png b/plugins/disks/plugin_icon.png
new file mode 100644
index 0000000..ae6bd74
Binary files /dev/null and b/plugins/disks/plugin_icon.png differ
diff --git a/plugins/disks/unittests.py b/plugins/disks/unittests.py
new file mode 100644
index 0000000..e7cdf34
--- /dev/null
+++ b/plugins/disks/unittests.py
@@ -0,0 +1,9 @@
+import WebInterfaceTestClass
+
+class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
+
+ def test_read_form(self):
+ '''display all devices'''
+ self.cmd.go(self.URL + "disks?weblang=en")
+ self.cmd.find("Disks")
+
diff --git a/plugins/format_fs/format_fs.py b/plugins/format_fs/format_fs.py
new file mode 100644
index 0000000..a5463d8
--- /dev/null
+++ b/plugins/format_fs/format_fs.py
@@ -0,0 +1,95 @@
+import CryptoBoxPlugin
+from CryptoBoxExceptions import *
+
+class format_fs(CryptoBoxPlugin.CryptoBoxPlugin):
+
+ pluginCapabilities = [ "volume" ]
+ requestAuth = True
+ rank = 60
+
+ ## map filesystem types to the appropriate arguments for 'mkfs'
+ fsTypes = {
+ "windows": "vfat",
+ "linux": "ext3" }
+
+ containerTypes = [ "luks", "plain" ]
+
+
+ def doAction(self, store=None, fs_type="windows", container_type="luks", crypto_password=None, crypto_password2=None, confirm=None):
+ if not fs_type in self.fsTypes.keys():
+ self.cbox.info
+ return "format_volume"
+ self.hdf[self.hdf_prefix + "fs_type"] = fs_type
+ self.hdf[self.hdf_prefix + "container_type"] = container_type
+ for t in self.fsTypes.keys():
+ self.hdf[self.hdf_prefix + "fs_types." + t] = t
+ if store == "step1":
+ if not confirm:
+ self.cbox.log.warn("missing confirmation for formatting of filesystem: %s" % self.device)
+ self.hdf["Data.Warning"] = "Plugins.format_fs.FormatNotConfirmed"
+ return "volume_format"
+ if container_type == "luks":
+ return "volume_format_luks"
+ elif container_type == "plain":
+ return self.__format_plain(fs_type)
+ elif store == "step2":
+ if container_type == "luks":
+ return self.__format_luks(fs_type, crypto_password, crypto_password2)
+ else:
+ self.cbox.log.info("invalid input value for 'container_type': %s" % container_type)
+ return "volume_format"
+ elif store:
+ self.cbox.log.info("invalid input value for 'store': %s" % store)
+ return "volume_format"
+ else:
+ return "volume_format"
+
+
+ def getStatus(self):
+ return "no status"
+
+
+ def __format_plain(self, fsType):
+ try:
+ container = self.cbox.getContainer(self.device)
+ container.create(container.Types["plain"])
+ except CBVolumeIsActive:
+ self.hdf["Data.Warning"] = "VolumeMayNotBeMounted"
+ self.cbox.log.info("initialization is not possible as long as the device (%s) is mounted" % self.device)
+ return None
+ except CBContainerError, errMsg:
+ self.hdf["Data.Warning"] = "Plugins.format_fs.FormatFailed"
+ self.cbox.log.warn("initialization of device '%s' failed" % self.device)
+ self.cbox.log.warn("reason: %s" % errMsg)
+ return "volume_format"
+ else:
+ self.cbox.log.info("successfully initialized device '%s'" % self.device)
+ return None
+
+
+ def __format_luks(self, fsType, pw, pw2):
+ if not pw:
+ self.hdf["Data.Warning"] = "EmptyPassword"
+ self.cbox.log.warn("no crypto password was supplied for initialization of device '%s'" % self.device)
+ return "volume_format"
+ if pw != pw2:
+ self.hdf["Data.Warning"] = "DifferentPasswords"
+ self.cbox.log.warn("the crypto password was not repeated correctly for initialization of device '%s'" % self.device)
+ return "volume_format"
+ container = self.cbox.getContainer(self.device)
+ try:
+ container.create(container.Types["luks"], pw)
+ except CBVolumeIsActive:
+ self.hdf["Data.Warning"] = "VolumeMayNotBeMounted"
+ self.cbox.log.info("initialization is not possible as long as the device (%s) is mounted" % self.device)
+ return None
+ except CBContainerError, errMsg:
+ self.hdf["Data.Warning"] = "Plugins.format_fs.FormatFailed"
+ self.cbox.log.warn("initialization of device '%s' failed" % self.device)
+ self.cbox.log.warn("reason: %s" % errMsg)
+ return "volume_format"
+ else:
+ self.hdf["Data.Success"] = "Plugins.format_fs.FormatSuccess"
+ self.cbox.log.info("successfully initialized device '%s'" % self.device)
+ return None
+
diff --git a/plugins/format_fs/lang/en.hdf b/plugins/format_fs/lang/en.hdf
new file mode 100644
index 0000000..37982b2
--- /dev/null
+++ b/plugins/format_fs/lang/en.hdf
@@ -0,0 +1,49 @@
+Name = Create filesystems
+Link = Format
+
+Title.Format = Initializing filesystem
+
+Button.Format = Initialize filesystem
+
+Text {
+ Confirm = Yes, I know what I am doing!
+ FSType = Filesystem type
+ IsEncrypted = Encryption
+ Yes = Yes
+ No = No
+}
+
+AdviceMessage {
+ FormatWarning {
+ Text = All data of the selected filesystem will get lost!
+ }
+
+ UnmountBeforeInit {
+ Text = You must deactivate this volume before you may initialize it.
+ Link.Text = Deactive volume now
+ Link.Rel = volume_mount
+ Link.Attr1.name = action
+ Link.Attr1.value = umount
+ Link.Attr2.name = redirect
+ Link.Attr2.value = format_fs
+ }
+}
+
+SuccessMessage {
+ FormatSuccess {
+ Title = Formatting successful
+ Text = The selected filesystem was successfully formatted.
+ }
+}
+
+WarningMessage {
+ FormatNotConfirmed {
+ Title = Confirmation missing
+ Text = You did not confirm this action by activating the checkbox.
+ }
+
+ FormatFailed {
+ Title = Formatting failed
+ Text = Formatting of the selected filesystem failed for unknown reasons - sorry!
+ }
+}
diff --git a/plugins/format_fs/plugin_icon.png b/plugins/format_fs/plugin_icon.png
new file mode 100644
index 0000000..85f58d3
Binary files /dev/null and b/plugins/format_fs/plugin_icon.png differ
diff --git a/plugins/format_fs/unittests.py b/plugins/format_fs/unittests.py
new file mode 100644
index 0000000..4310865
--- /dev/null
+++ b/plugins/format_fs/unittests.py
@@ -0,0 +1,10 @@
+import WebInterfaceTestClass
+
+class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
+
+ def test_read_form(self):
+ url = self.URL + "format_fs?weblang=en&device=%2Fdev%2Floop1"
+ self.register_auth(url)
+ self.cmd.go(url)
+ self.cmd.find('Initializing filesystem')
+
diff --git a/plugins/format_fs/volume_format.cs b/plugins/format_fs/volume_format.cs
new file mode 100644
index 0000000..ba9ed14
--- /dev/null
+++ b/plugins/format_fs/volume_format.cs
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/format_fs/volume_format_luks.cs b/plugins/format_fs/volume_format_luks.cs
new file mode 100644
index 0000000..e2c52bb
--- /dev/null
+++ b/plugins/format_fs/volume_format_luks.cs
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/partition/unittests.py b/plugins/partition/unittests.py
new file mode 100644
index 0000000..c2f5512
--- /dev/null
+++ b/plugins/partition/unittests.py
@@ -0,0 +1,10 @@
+import WebInterfaceTestClass
+
+class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
+
+ def test_read_form(self):
+ url = self.URL + "partition?weblang=en"
+ self.register_auth(url)
+ self.cmd.go(url)
+ self.cmd.find('VERY careful')
+
diff --git a/plugins/plugin-interface.txt b/plugins/plugin-interface.txt
new file mode 100644
index 0000000..3fef72f
--- /dev/null
+++ b/plugins/plugin-interface.txt
@@ -0,0 +1,63 @@
+The following directory structure is required:
+ - python code: plugins/PLUGINNAME/PLUGINNAME.py (all lower case is recommended)
+ - language files: plugins/PLUGINNAME/lang/(en|de|??).hdf
+ - clearsilver templates: plugins/PLUGINNAME/*.cs
+ - icon (128x128px recommended): plugins/PLUGINNAME/plugin_icon.png
+
+
+Python code interface:
+ - create a class with the same name as the plugin - it must inherit CryptoBoxPlugin
+ - function "doAction":
+ - this function will get called whenever this plugins is involved in a request
+ - all arguments should be optional (e.g. for displaying a form without previous input values)
+ - the argument "store" should be used to process a form submission (just a recommendation)
+ - if the processing failed for some reason (invalid input, ...), it should manually set
+ "Data.Warning" or "Data.Success") to a value of your choice (preferably
+ you may want to use messages of the namespace of your plugin
+ (e.g. "Data.Plugins.PLUGINNAME.WarningMessage.InvalidInput"))
+ - the return value should be the name of the template that should be displayed after processing
+ (a template file in the plugin directory takes precedence over global template files)
+ - the return value may also be a dictionary with the following elements:
+ * template: the name of the template file (mandatory)
+ * generator: a generator object ("yield") - its content will replace every
+ occurrence of "" in the template (useful for pages that
+ are displayed step by step (as for formatting of filesystems))
+ - the return value may also be a dictionary with the following elements:
+ * plugin: the name of a plugin
+ * values: a dictionary of variables that should be defined for this plugin
+ - an empty (e.g. None) return value can be used to go to the default page ("disks"
+ or "volume_mount" (for volume plugins))
+ - function "getStatus":
+ - returns a string, that describes a state connected to this plugin (e.g. the current date and
+ time (for the "date" plugin))
+ - the class variable "pluginCapabilities" must be an array of strings (supported: "system" and
+ "volume")
+ - the class variable "requestAuth" is boolean and defines, if admin authentication is necessary
+ for this plugin
+ - the class variable "rank" is an integer in the range of 0..100 - it determines the order
+ of plugins in listings (lower value -> higher priority)
+ - the class variable "enabled" is boolean and detemines the default availability of the plugin
+ - volume plugins contain the attribute "device" (you may trust this value - a volume plugin will
+ never get called with an invalid device)
+ - the python module which contains the plugin's class should also contain a class called
+ 'unittests' - it should inherit WebInterfaceTestClass.WebInterfaceTestClass
+
+
+Language file structure:
+ - the content of the language file will be added to the hdf dataset below "Lang.Plugins.PLUGINNAME"
+ (this avoids namespace conflicts)
+ - the following values _must_ be defined:
+ Name (a short description)
+ Link (the visible text for links to this plugin)
+ Rank (defines the order of the plugins displayed (0..100))
+ - all warnings, error and success messages should be stored below WarningMessage.???
+ (resp. ErrorMessage or SuccessMessage)
+
+
+Clearsilver template:
+ - should start with a "
" tag (volume plugins: "h2")
+ - links to the plugin (e.g. in form headers) could look like the following:
+
+ - volume plugins must include "show_volume_[header|footer]" (see examples)
+
+
diff --git a/plugins/plugin_icon_unknown.png b/plugins/plugin_icon_unknown.png
new file mode 100644
index 0000000..d6e9b3a
Binary files /dev/null and b/plugins/plugin_icon_unknown.png differ
diff --git a/plugins/plugin_manager/lang/en.hdf b/plugins/plugin_manager/lang/en.hdf
new file mode 100644
index 0000000..c1c7856
--- /dev/null
+++ b/plugins/plugin_manager/lang/en.hdf
@@ -0,0 +1,15 @@
+Name = Plugin Manager
+Link = Manage plugins
+
+Title.PluginManager = Plugin Manager
+
+Button.SaveSettings = Save settings
+
+Text {
+ PluginName = Plugin
+ PluginRank = Priority
+ PluginEnabled = Enabled?
+ RequestsAuth = Requires admin?
+ VolumePlugins = Volume plugins
+ SystemPlugins = System plugins
+}
diff --git a/plugins/plugin_manager/plugin_icon.png b/plugins/plugin_manager/plugin_icon.png
new file mode 100644
index 0000000..236169c
Binary files /dev/null and b/plugins/plugin_manager/plugin_icon.png differ
diff --git a/plugins/plugin_manager/plugin_list.cs b/plugins/plugin_manager/plugin_list.cs
new file mode 100644
index 0000000..7449f3e
--- /dev/null
+++ b/plugins/plugin_manager/plugin_list.cs
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/volume_props/lang/en.hdf b/plugins/volume_props/lang/en.hdf
new file mode 100644
index 0000000..55bbfcc
--- /dev/null
+++ b/plugins/volume_props/lang/en.hdf
@@ -0,0 +1,63 @@
+Name = Volume properties
+Link = Properties
+
+Title {
+ Properties = Properties
+ ChangeVolumeName = Change the name of this volume
+ ChangePassword = Change the password of this volume
+ Encryption = Encryption
+}
+
+
+Button {
+ ContainerNameSet = Change name
+ ChangePassword = Change password
+ FormatContainer = Format volume
+}
+
+
+Text.FormatForEncryptionSupport = This volume is not encrypted. If you want to turn on encryption, then you have to format the volume. Beware: this will destroy all data of this container.
+
+
+AdviceMessage {
+ UmountBeforeProps {
+ Text = You must deactivate a volume, if you want to change its properties.
+ Link.Text = Deactive volume now
+ Link.Rel = volume_mount
+ Link.Attr1.name = action
+ Link.Attr1.value = umount
+ Link.Attr2.name = redirect
+ Link.Attr2.value = volume_props
+ }
+}
+
+
+SuccessMessage {
+ PasswordChange {
+ Title = Password changed
+ Text = The password of this volume was changed successfully.
+ }
+}
+
+
+WarningMessage {
+ InvalidVolumeName {
+ Title = Changing of container's name failed
+ Text = The supplied new name of the container was invalid. Please try again!
+ }
+
+ SetVolumeNameFailed {
+ Title = Changing of container's name failed
+ Text = Could not change the name of the container. Take a look at the log files for details.
+ }
+
+ VolumeNameIsInUse {
+ Title = Volume name is in use
+ Text = Another volume with the same name is active.
+ }
+
+ PasswordChange {
+ Title = Could not change password
+ Text = The password of this volume could not be changed - sorry!
+ }
+}
diff --git a/plugins/volume_props/plugin_icon.png b/plugins/volume_props/plugin_icon.png
new file mode 100644
index 0000000..20d6d59
Binary files /dev/null and b/plugins/volume_props/plugin_icon.png differ
diff --git a/plugins/volume_props/unittests.py b/plugins/volume_props/unittests.py
new file mode 100644
index 0000000..e91a78d
--- /dev/null
+++ b/plugins/volume_props/unittests.py
@@ -0,0 +1,10 @@
+import WebInterfaceTestClass
+
+class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
+
+ def test_read_form(self):
+ url = self.URL + "volume_props?weblang=en&device=%2Fdev%2Floop1"
+ self.register_auth(url)
+ self.cmd.go(url)
+ self.cmd.find('Properties')
+
diff --git a/plugins/volume_props/volume_properties.cs b/plugins/volume_props/volume_properties.cs
new file mode 100644
index 0000000..92c3fe6
--- /dev/null
+++ b/plugins/volume_props/volume_properties.cs
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/volume_props/volume_props.py b/plugins/volume_props/volume_props.py
new file mode 100644
index 0000000..605dc75
--- /dev/null
+++ b/plugins/volume_props/volume_props.py
@@ -0,0 +1,81 @@
+import CryptoBoxPlugin
+from CryptoBoxExceptions import *
+
+
+class volume_props(CryptoBoxPlugin.CryptoBoxPlugin):
+
+ pluginCapabilities = [ "volume" ]
+ requestAuth = False
+ rank = 40
+
+
+ def doAction(self, store=None, vol_name=None, old_pw=None, new_pw=None, new_pw2=None):
+ self.container = self.cbox.getContainer(self.device)
+ if not self.container:
+ return None
+ self.__prepareHDF()
+ if store == "set_name":
+ return self.__setVolumeName(vol_name)
+ elif store == "change_pw":
+ return self.__changePassword(old_pw, new_pw, new_pw2)
+ elif not store:
+ return "volume_properties"
+ else:
+ self.cbox.log.info("plugin 'volume_props' - unknown action: %s" % store)
+ return "volume_properties"
+
+
+ def getStatus(self):
+ self.container = self.cbox.getContainer(self.device)
+ if not self.container:
+ return "invalid device"
+ return "name=%s" % self.container.getName()
+
+
+ def __prepareHDF(self):
+ self.hdf[self.hdf_prefix + "vol_name"] = self.container.getName()
+
+
+ def __setVolumeName(self, vol_name):
+ if not vol_name:
+ self.hdf["Data.Warning"] = "Plugins.volume_props.InvalidVolumeName"
+ return "volume_properties"
+ if vol_name == self.container.getName():
+ ## nothing has to be done
+ return "volume_properties"
+ try:
+ self.container.setName(vol_name)
+ except CBInvalidName:
+ self.hdf["Data.Warning"] = "Plugins.volume_props.InvalidVolumeName"
+ except CBNameActivelyUsed:
+ self.hdf["Data.Warning"] = "Plugins.volume_props.VolumeNameIsInUse"
+ except CBContainerError:
+ self.hdf["Data.Warning"] = "Plugins.volume_props.SetVolumeNameFailed"
+ ## reread the volume name
+ self.__prepareHDF()
+ return "volume_properties"
+
+
+ def __changePassword(self, old_pw, new_pw, new_pw2):
+ if not old_pw:
+ self.hdf["Data.Warning"] = "EmptyPassword"
+ elif not new_pw:
+ self.hdf["Data.Warning"] = "EmptyNewPassword"
+ elif new_pw != new_pw2:
+ self.hdf["Data.Warning"] = "DifferentPasswords"
+ elif old_pw == new_pw:
+ ## do nothing
+ pass
+ else:
+ try:
+ self.container.changePassword(old_pw, new_pw)
+ except CBInvalidType, errMsg:
+ self.cbox.log.info("plugin 'volume_props' - cannot change passphrase for non-encrypted container (%s): %s" % (self.device, errMsg))
+ except CBVolumeIsActive:
+ self.hdf["Data.Warning"] = "VolumeMayNotBeMounted"
+ except CBChangePasswordError, errMsg:
+ self.cbox.log.warn("plugin 'volume_props' - cannot change password for device (%s): %s" % (self.device, errMsg))
+ self.hdf["Data.Warning"] = "Plugins.volume_props.PasswordChange"
+ else:
+ self.hdf["Data.Success"] = "Plugins.volume_props.PasswordChange"
+ return "volume_properties"
diff --git a/scripts/check_languages.py b/scripts/check_languages.py
new file mode 100755
index 0000000..3004c13
--- /dev/null
+++ b/scripts/check_languages.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python2.4
+#
+# $Id$
+#
+# compare translated language files with the master (english) language files
+# it is useful for finding incomplete translations
+#
+# Copyright (c) 02006 sense.lab
+#
+# License: This script is distributed under the terms of version 2
+# of the GNU GPL. See the LICENSE file included with the package.
+#
+# Parameter: LANGUAGE (e.g. "de")
+#
+
+import os, sys
+try:
+ import neo_cgi, neo_util
+except ImportError, errMsg:
+ sys.stderr.write("Could not import the python clearsilver module: %s\n" % (errMsg,))
+ sys.stderr.write("Maybe you should try 'apt-get install python-clearsilver'?\n")
+ sys.exit(1)
+
+SUFFIX = ".hdf"
+DEFAULT_LANGUAGE = "en"
+
+
+def getHDFkeys(hdf):
+ import types
+ if type(hdf.dump()) == types.NoneType: return []
+ return [e.split(" = ",1)[0].strip() for e in hdf.dump().splitlines()]
+
+
+def compareFiles(langFile1, langFile2):
+ ## check for existence of files
+ for filename in (langFile2, langFile1):
+ if not os.path.exists(filename):
+ sys.stderr.write("could not find language file: %s\n" % filename)
+ return
+
+ ## check if the files are the same
+ if langFile1 == langFile2:
+ sys.stderr.write("cannot compare the language file with itself: %s\n" % langFile1)
+ return
+
+ print "Comparing '%s' and '%s':" % (langFile1, langFile2)
+
+ hdf1 = neo_util.HDF()
+ hdf1.readFile(langFile1)
+ hdf2 = neo_util.HDF()
+ hdf2.readFile(langFile2)
+
+ hdfKeys1 = getHDFkeys(hdf1)
+ hdfKeys2 = getHDFkeys(hdf2)
+
+ ## check for empty language data sets
+ for (keys, filename) in ((hdfKeys1, langFile1), (hdfKeys2, langFile2)):
+ if len(keys) == 0:
+ sys.stderr.write("\tthe language file is empty: %s\n" % filename)
+ return
+
+ ## check for missing keys (only part of the first (master) file)
+ for key in hdfKeys1:
+ if not key in hdfKeys2:
+ print "\tmissing key: %s" % key
+
+ ## check for superfluous keys (only part of the second file)
+ for key in hdfKeys2:
+ if not key in hdfKeys1:
+ print "\tsuperfluous key: %s" % key
+
+
+def find_lang_file(arg, dirname, fnames):
+ lfile = os.path.join(dirname, arg["fname"])
+ if os.path.isfile(lfile):
+ arg["list"].append(lfile)
+
+
+
+############ main #############
+if "__main__" != __name__:
+ sys.exit(0)
+
+args = sys.argv[1:]
+
+## check parameters
+if len(args) != 1:
+ sys.stderr.write("invalid number of parameters: a language name is required\n")
+ sys.exit(1)
+
+
+language = args[0]
+
+if language == DEFAULT_LANGUAGE:
+ sys.stderr.write("you must specify a language different from the default (%s)!\n" % DEFAULT_LANGUAGE)
+ sys.exit(1)
+
+obj = { "fname":"%s%s" % (DEFAULT_LANGUAGE, SUFFIX),
+ "list": [] }
+
+os.path.walk(os.getcwd(), find_lang_file, obj)
+
+for langFile in obj["list"]:
+ refLang = langFile.replace("/%s%s" % (DEFAULT_LANGUAGE, SUFFIX), "/%s%s" % (language, SUFFIX))
+ compareFiles(refLang, langFile)
+
diff --git a/scripts/check_languages.sh b/scripts/check_languages.sh
deleted file mode 100755
index 502dbe9..0000000
--- a/scripts/check_languages.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# compare the defined fields of a language file with the english translation
-#
-# nice for finding unavailable definitions
-#
-# Parameter: LANGUAGE
-# (e.g. "de")
-#
-
-set -u
-
-LANG_DIR=$(dirname $0)/../lang
-DEFAULT_LANG=en
-TMP_FILE1=/tmp/$(basename $0)-$$-1
-TMP_FILE2=/tmp/$(basename $0)-$$-2
-
-[ $# -ne 1 ] && echo -e "Syntax: $(basename $0) LANGUAGE\n" >&2 && exit 1
-
-grep "=" "$LANG_DIR/${DEFAULT_LANG}.hdf" | grep -v "^[[:space:]]*#" | cut -f 1 -d "=" >"$TMP_FILE1"
-grep "=" "$LANG_DIR/${1}.hdf" | grep -v "^[[:space:]]*#" | cut -f 1 -d "=" >"$TMP_FILE2"
-
-diff -wu "$TMP_FILE1" "$TMP_FILE2"
-
-rm "$TMP_FILE1" "$TMP_FILE2"
-
diff --git a/scripts/userdocexport.sh b/scripts/userdocexport.sh
index 192c296..299df52 100755
--- a/scripts/userdocexport.sh
+++ b/scripts/userdocexport.sh
@@ -29,7 +29,7 @@ WIKI_HOST="https://systemausfall.org"
# the trailing slash is important
WIKI_URL=/trac/cryptobox/wiki/
-CBOX_CGI="?action=doc\&page="
+CBOX_CGI="/doc?page="
LANGUAGES="de en"
diff --git a/templates/access_denied.cs b/templates/access_denied.cs
new file mode 100644
index 0000000..cfe44fe
--- /dev/null
+++ b/templates/access_denied.cs
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/templates/empty.cs b/templates/empty.cs
index a8716a3..0447a4d 100644
--- a/templates/empty.cs
+++ b/templates/empty.cs
@@ -1,3 +1,6 @@
+
+
+
diff --git a/templates/error.cs b/templates/error.cs
deleted file mode 100644
index 18ac8f1..0000000
--- a/templates/error.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/templates/footer.cs b/templates/footer.cs
index a784024..6ae1777 100644
--- a/templates/footer.cs
+++ b/templates/footer.cs
@@ -1,35 +1,32 @@
-