migrate to luks

-- diese und die folgenden Zeilen werden ignoriert --

A    https://svn.systemausfall.org/svn/cryptobox/branches/luks
This commit is contained in:
lars 2005-10-26 01:02:57 +00:00
parent e45dfa2ed8
commit 8d1c3aa9c4
364 changed files with 21139 additions and 0 deletions

View file

@ -0,0 +1,3 @@
<!-- $Id$ -->
<!-- what else would you expect here? -->

View file

@ -0,0 +1,3 @@
<!-- $Id$ -->
<?cs call:error(Data.Error) ?>

View file

@ -0,0 +1,31 @@
<!-- $Id$ -->
<?cs if:Data.Redirect ?>
<p class="warning"><a href="<?cs if:Data.Redirect.URL ?><?cs var:Data.Redirect.URL ?><?cs else ?><?cs call:getSelfURL('action=' + Data.Redirect.Action, '') ?><?cs /if ?>"><?cs var:Lang.Text.RedirectNote ?></a></p>
<?cs /if ?>
</div><!-- end of 'words' -->
<div id="footer">
<!-- Version -->
v0.3&nbsp;&nbsp;
<a href="http://cryptobox.org" title="<?cs var:Lang.Text.ProjectHomePage ?>">CryptoBox-Home</a> <?cs var:Lang.Text.ProjectNote ?>&nbsp;<a href="https://systemausfall.org/senselab" title="systemausfall.org">sense.lab</a>
</div>
</div>
</div>
<!-- CBOX-STATUS-begin - used for validation - do not touch!
Data.Config.IP=<?cs var:Data.Config.IP ?>
Data.Config.Language=<?cs var:Data.Config.Language ?>
Data.Config.TimeOut=<?cs var:Data.Config.TimeOut ?>
Data.Status.Config=<?cs var:Data.Status.Config ?>
Data.Status.InitRunning=<?cs var:Data.Status.InitRunning ?>
Data.Status.IP=<?cs var:Data.Status.IP ?>
Data.Status.Mounted=<?cs var:Data.Status.Mounted ?>
CBOX-STATUS-end -->
<!-- $Revision$ -->
</body>
</html>

View file

@ -0,0 +1,31 @@
<!-- $Id$ -->
<div id="config">
<h1><?cs var:Lang.Title.Config ?></h1>
<?cs call:print_form_header() ?>
<?cs if:Data.Config.AdminPasswordIsSet ?>
<p><label for="current_admin_password"><?cs call:help_popUp(Lang.Text.EnterCurrentAdminPassword,"prove_admin_pw") ?></label><br/>
<input type="password" id="current_admin_password" name="current_admin_password" size="20" tabindex="0" maxlength="40" /> </p>
<?cs /if ?>
<p><label for="ip"><?cs call:help_popUp(Lang.Text.IPAddress,'set_ip_address') ?></label><br/>
<input type="text" id="ip" size="16" maxsize="15" name="ip" tabindex="1"
value="<?cs var:Data.Config.IP ?>" /><p>
<p><label for="timeout"><?cs call:help_popUp(Lang.Text.TimeOut,'set_timeout') ?></label><br/>
<input type="text" id="timeout" size="5" maxsize="5" name="timeout" tabindex="2"
value="<?cs var:Data.Config.TimeOut ?>" /></p>
<p><label for="language"><?cs call:help_popUp(Lang.Text.SelectLanguage,'set_language') ?></label><br/>
<select name="language" tabindex="3">
<?cs each:item = Data.Languages ?>
<option value="<?cs name:item ?>" <?cs if:(name(item) == Data.Config.Language) ?>selected="selected"<?cs /if ?>><?cs var:item ?></option>
<?cs /each ?>
</select></p>
<input type="hidden" name="action" value="config_do" />
<button type="submit" tabindex="100"><?cs var:Lang.Button.SaveConfig ?></button>
</form>
</div>

View file

@ -0,0 +1,34 @@
<!-- $Id$ -->
<h1><?cs var:Lang.Title.Init ?></h1>
<div class="init">
<?cs call:print_form_header() ?>
<p class="note"><?cs var:Lang.Text.InitWarning ?></p>
<?cs if:Data.Config.AdminPasswordIsSet ?>
<p><label for="current_admin_password"><?cs call:help_popUp(Lang.Text.EnterCurrentAdminPassword,"prove_admin_pw") ?></label><br/>
<input type="password" id="current_admin_password" name="current_admin_password" size="20" tabindex="0" maxlength="40" /> </p>
<?cs /if ?>
<p><label for="admin_password"><?cs call:help_popUp(Lang.Text.EnterNewAdminPassword,"new_admin_pw") ?></label><br/>
<input type="password" id="admin_password" name="admin_password" size="20" tabindex="1" maxlength="40" /> </p>
<p><label for="admin_password2"><?cs call:help_popUp(Lang.Text.EnterSameAdminPassword,"new_admin_pw_repeat") ?></label><br/>
<input type="password" id="admin_password2" name="admin_password2" size="20" tabindex="2" maxlength="40" /></p>
<p><label for="crypto_password"><?cs call:help_popUp(Lang.Text.EnterNewCryptoPassword,"crypto_pw") ?></label><br/>
<input type="password" id="crypto_password" name="crypto_password" size="20" tabindex="3" maxlength="40" /></p>
<p><label for="crypto_password2"><?cs call:help_popUp(Lang.Text.EnterSameCryptoPassword,'crypto_pw_repeat') ?></label><br/>
<input type="password" id="crypto_password2" name="crypto_password2" size="20" tabindex="4" maxlength="40" /></p>
<p><label for="confirm"><?cs call:help_popUp(Lang.Text.ConfirmInitHint,'confirm_text') ?><br/>
<span class="note" id="confirmtext"><?cs var:Lang.Text.ConfirmInit ?></span></label><br/>
<input type="text" id="confirm" name="confirm" size="30" tabindex="5" maxlength="50" /></p>
<input type="hidden" name="action" value="init_do" />
<button type="submit" tabindex="100"><?cs var:Lang.Button.DoInit ?></button>
</form>
</div>
<hr/>
<div class="partition_info">
<h2><?cs var:Lang.Text.PartitionInfo ?></h2>
<p><?cs var:Data.PartitionInfo ?></p>
</div>

View file

@ -0,0 +1,15 @@
<!-- $Id$ -->
<h1><?cs var:Lang.Title.Mount ?></h1>
<div align="center">
<?cs call:print_form_header() ?>
<p><label for="crypto_passwort"><?cs var:Lang.Text.EnterCurrentCryptoPassword ?></label>
<input type="password" id="crypto_password" name="crypto_password" size="20" tabindex="0" maxlength="40" /></p>
<input type="hidden" name="action" value="mount_do" />
<button type="submit" tabindex="100"><?cs var:Lang.Button.Mount ?></button>
</form>
</div>

View file

@ -0,0 +1,19 @@
<!-- $Id$ -->
<h1><?cs var:Lang.Title.ShutDown ?></h1>
<div align="center">
<?cs call:print_form_header() ?>
<input type="hidden" name="action" value="shutdown_do" />
<input type="hidden" name="type" value="poweroff" />
<button type="submit"><?cs var:Lang.Button.PowerOff ?></button>
</form>
&nbsp;
<?cs call:print_form_header() ?>
<input type="hidden" name="action" value="shutdown_do" />
<input type="hidden" name="type" value="reboot" />
<button type="submit"><?cs var:Lang.Button.ReBoot ?></button>
</form>
</div>

View file

@ -0,0 +1,12 @@
<!-- $Id$ -->
<h1><?cs var:Lang.Title.Umount ?></h1>
<div align="center">
<?cs call:print_form_header() ?>
<input type="hidden" name="action" value="umount_do" />
<button type="submit"><?cs var:Lang.Button.Umount ?></button>
</form>
</div>

View file

@ -0,0 +1,47 @@
<!-- $Id$ -->
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CryptoBox</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" media="screen" href="/cryptobox.css" type="text/css" />
<?cs if:Data.Redirect.URL ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs var:Data.Redirect.URL ?>" /><?cs
elif:Data.Redirect.Action ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs call:getSelfURL('action=' + Data.Redirect.Action, '') ?>" /><?cs /if ?>
</head>
<body>
<div id="lang">
<?cs each:item = Data.Languages ?>
<a href="<?cs call:getSelfURL('weblang=' + name(item),'weblang') ?><?cs
if:Data.QueryString ?>&<?cs var:Data.QueryString ?><?cs /if ?>"><?cs
var:item ?></a><br/>
<?cs /each ?>
</div>
<div id="main">
<?cs if:(Data.Status.Mounted == 1) ?>
<div id="head_red">
<?cs else ?>
<div id="head_green">
<?cs /if ?>
<h1><?cs var:Lang.Title.Top ?></h1>
<h2><?cs var:Lang.Title.Slogan ?></h2>
</div>
<div id="content">
<div id="menu">
<?cs if:Data.Redirect.URL ?>
<!-- the menu bar is disabled if redirection has been suggested -->
&nbsp;
<?cs else ?>
<?cs include:Settings.TemplateDir + '/nav.cs' ?>
<?cs /if ?>
</div>
<div id="words">

View file

@ -0,0 +1,93 @@
<!-- $Id$ -->
<?cs def:warning(warnname) ?><?cs
each:item = Lang.WarningMessage ?><?cs
if:(name(item) == warnname)
?><div class="warning">
<h1><?cs var:item.Title ?></h1>
<p><?cs var:item.Text ?></p></div>
<?cs
/if ?><?cs
/each ?><?cs
/def ?>
<?cs def:error(errname) ?><?cs
each:item = Lang.ErrorMessage ?><?cs
if:(name(item) == errname)
?><div class="error">
<h1><?cs var:item.Title ?></h1>
<p><?cs var:item.Text ?></p></div>
<?cs
/if ?><?cs
/each ?><?cs
/def ?>
<?cs def:success(succname) ?><?cs
each:item = Lang.SuccessMessage ?><?cs
if:(name(item) == succname)
?><div class="success">
<h1><?cs var:item.Title ?></h1>
<p><?cs var:item.Text ?></p></div>
<?cs
/if ?><?cs
/each ?><?cs
/def ?>
<?cs def:parseTree(root) ?><?cs #
# the output looks quite ugly and is not very helpful as there are
# only a few values
?><!-- data tree
<?cs each:item = root ?><?cs
name:item ?>: <?cs var:item ?><?cs
each:subitem = item ?> / <?cs name:subitem ?>=<?cs var:subitem ?><?cs /each ?>
<?cs /each ?>
-->
<?cs /def ?>
<?cs def:getSelfURL(append,exclude) ?><?cs #
# construct the URL of the script out of the ScriptName, Data.PostData
# (except for the value mentioned in 'exclude') and a possible
# suffix (append)
# e.g.:
# - 'append' is 'weblang=de'
# - 'exclude' is 'weblang'
# BEWARE: both parameters have to be defined!
?><?cs set:PostSuffix='' ?><?cs
set:tmp_concat='?' ?><?cs
each:item = Data.PostData ?><?cs
if:(name(item) != exclude) ?><?cs
set:PostSuffix=PostSuffix + tmp_concat + name(item) + '=' + item ?><?cs
set:tmp_concat='&' ?><?cs
/if ?><?cs
/each ?><?cs
if:(append != '') ?><?cs set:PostSuffix=PostSuffix + tmp_concat + append ?><?cs
/if ?><?cs
var:ScriptName ?><?cs var:PostSuffix ?><?cs
/def ?>
<?cs def:help_popUp_broken(text,filename) ?><?cs #
# show a pop-up information block on the right side of the screen
# usually good for small explanatory texts
# does not work for ie?
?><a class="popup"><?cs
var:text ?><span><?cs
linclude:Settings.DocDir + '/' + Settings.DocLang + '/hints/' + filename + '.html' ?></span></a><?cs
/def ?>
<?cs def:help_popUp(text,filename) ?><?cs #
# TODO: remove this, if on-screen help will die :)
?><?cs var:text ?><?cs
/def ?>
<?cs def:print_form_header() ?><?cs #
# the header of a form - including Data.PostData values as hidden fields
?><form action="<?cs var:ScriptName ?>" method="post" enctype="application/x-www-from-urlencoded" accept-charset="utf-8">
<?cs each:item = Data.PostData
?><input type="hidden" name="<?cs name:item ?>" value="<?cs var:item ?>" /><?cs
/each ?><?cs
/def ?>

View file

@ -0,0 +1,16 @@
<!-- $Id$ -->
<?cs include:Settings.TemplateDir + '/macros.cs' ?>
<?cs include:Settings.TemplateDir + '/header.cs' ?>
<!-- this cryptobox template follows: <?cs var:Data.Action ?> -->
<?cs if:Data.Error ?>
<?cs include:Settings.TemplateDir + '/error.cs' ?>
<?cs else ?>
<?cs if:Data.Warning ?><?cs call:warning(Data.Warning) ?><?cs /if ?>
<?cs if:Data.Success ?><?cs call:success(Data.Success) ?><?cs /if ?>
<?cs include:Settings.TemplateDir + '/' + Data.Action + '.cs' ?>
<?cs /if ?>
<?cs include:Settings.TemplateDir + '/footer.cs' ?>

View file

@ -0,0 +1,22 @@
<!-- $Id$ -->
<!-- mounting possible? -->
<?cs if:((Data.Status.Config == 1) && (Data.Status.InitRunning == 0)) ?>
<?cs if:(Data.Status.Mounted == 1) ?>
<a href="<?cs call:getSelfURL('action=umount_do','action') ?>" title="<?cs var:Lang.Text.DoUmount ?>"><?cs var:Lang.Button.Umount ?></a>
<?cs else ?>
<a href="<?cs call:getSelfURL('action=mount_ask','action') ?>" title="<?cs var:Lang.Text.DoMount ?>"><?cs var:Lang.Button.Mount ?></a>
<?cs /if ?>
<a href="<?cs call:getSelfURL('action=status','action') ?>" title="<?cs var:Lang.Button.Status ?>"><?cs var:Lang.Button.Status ?></a>
<?cs /if ?>
<!-- already initialized (or at least in progress)? -->
<?cs if:(Data.Status.Config == 1) ?>
<a href="<?cs call:getSelfURL('action=config_ask','action') ?>" title="<?cs var:Lang.Text.Configuration ?>"><?cs var:Lang.Button.Config ?></a>
<?cs /if ?>
<a href="<?cs call:getSelfURL('action=init_ask','action') ?>" title="<?cs var:Lang.Button.DoInit ?>"><?cs var:Lang.Button.DoInit ?></a>
<a href="<?cs call:getSelfURL('action=show_log','action') ?>" title="<?cs var:Lang.Button.Protocol ?>"><?cs var:Lang.Button.Protocol ?></a>
<a href="<?cs call:getSelfURL('action=doc','action') ?>" title="<?cs var:Lang.Button.Documentation ?>"><?cs var:Lang.Button.Documentation ?></a>
<a href="<?cs call:getSelfURL('action=shutdown_ask','action') ?>" title="<?cs var:Lang.Button.PowerOff ?>"><?cs var:Lang.Button.PowerOff ?></a>

View file

@ -0,0 +1,7 @@
<!-- $Id$ -->
<div id="doc">
<?cs include:Settings.DocDir + '/' + Settings.DocLang + '/' + Data.Doc.Page + '.html' ?>
</div>

View file

@ -0,0 +1,13 @@
<!-- $Id$ -->
<div id="log">
<h1><?cs var:Lang.Title.Log ?></h1>
<?cs if:Data.Log ?>
<p class="console"><?cs var:Data.Log ?></p>
<?cs else ?>
<p><?cs var:Lang.Text.EmptyLog ?></p>
<?cs /if ?>
</div>

View file

@ -0,0 +1,5 @@
<!-- $Id$ -->
<h1><?cs var:Lang.Title.Status ?></h1>
<p><?cs if:(Data.Status.Mounted == 1) ?><?cs var:Lang.Text.CryptoIsActive ?>
<?cs else ?><?cs var:Lang.Text.CryptoIsDown ?><?cs /if ?></p>