tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

commit bd7300aa3ecb667f0e5b3ee252b42a3fedcb933c
parent 836d48c2d75059b7db5d0164d110b46e5a236a03
Author: Daniel "GDrooid" Rodriguez <gdrooid@openmailbox.org>
Date:   Fri,  9 Jan 2015 17:11:14 +0100

Update .po files and fix typo in tomb executable.

Diffstat:
Mextras/po/de.po | 5745+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
Mextras/po/es.po | 5743+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
Mextras/po/fr.po | 5825+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
Mextras/po/ru.po | 5659+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
Mextras/po/tomb.pot | 4923++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
Mtomb | 2+-
6 files changed, 24873 insertions(+), 3024 deletions(-)

diff --git a/extras/po/de.po b/extras/po/de.po @@ -1,1118 +1,5519 @@ msgid "" msgstr "" +"Project-Id-Version: Tomb the Crypto Undertaker\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: POEditor.com\n" -"Project-Id-Version: Tomb the Crypto Undertaker\n" -"Language: de\n" - -#: failure -msgid "Operation aborted." -msgstr "Vorgang abgebrochen." - -#: warning -msgid "often occurs on VPS and kernels that don't provide the loop module." -msgstr "tritt oft in virtuellen Maschinen auf oder mit Kerneln ohne Loop-Modul." - -#: warning -msgid "It is impossible to use Tomb on this machine at this conditions." -msgstr "Es ist unmöglich Tomb unter diesen Umständen auf dieser Maschine zu benutzen." - -#: message -msgid "Waiting for the key to be piped from stdin... " -msgstr "Warten auf den Schlüssel auf der Standarteingabe... " - -#: failure -msgid "This operation requires a key file to be specified using the -k option." -msgstr "Diese Operation benötigt das Angeben eines Schlüssels durch die -k Option." - -#: failure -msgid "Key not found, specify one using -k." -msgstr "Schlüssel nicht gefunden, bitte mit -k einen Schlüssel angeben." - -#: warning -msgid "User aborted password dialog." -msgstr "Benutzer hat den Passwortdialog abgebrochen." - -#: message -msgid "Password OK." -msgstr "Passwort OK." - -#: failure -msgid "Error: the newly generated keyfile does not seem valid." -msgstr "Fehler: Der neu erstellte Schlüssel scheint nicht gültig zu sein." - -#: failure -msgid "User aborted." -msgstr "Vom Benutzer abgebrochen." - -#: failure -msgid "You set empty password, which is not possible." -msgstr "Fehler: Passwort nicht gesetzt." - -#: failure -msgid "Wrong argument for --kdf: must be an integer number (iteration seconds)." -msgstr "Ungültiges Argument für --kdf: dies muss eine Ganzzahl sein." - -#: failure -msgid "gpg (GnuPG) is not found, Tomb cannot function without it." -msgstr "gpg (GnuPG) welches zur Funktion von Tomb notwendig ist, nicht gefunden." - -#: message -msgid "Please confirm the key password for the encoding" -msgstr "Bitte bestätigen Sie das Passwort zur Verschlüsselung" - -#: warning -msgid "Wrong password supplied." -msgstr "Das eingegebene Passwort ist falsch." - -#: failure -msgid "You shall not bury a key whose password is unknown to you." -msgstr "Sie dürfen keinen Schlüssel vergraben, von dem Sie das Passwort nicht kennen." - -#: warning -msgid "Encoding error: steghide reports problems." -msgstr "Fehler beim Verschlüsseln: steghide meldet Fehler." - -#: warning -msgid "Make explicit use of --force to overwrite." -msgstr "Benutzen Sie --force um ein Überschreiben zu erzwingen." - -#: warning -msgid "Use of --force selected: overwriting." -msgstr "--force wurde benutzt, wird überschrieben." - -#: failure -msgid "A filename needs to be specified using -k to forge a new key." -msgstr "Mit -k muss ein Dateiname angegeben werden, um einen neuen Schlüssel zu schmieden." - -#: failure -msgid "Forging this key would overwrite an existing file. Operation aborted." -msgstr "Diesen Schlüssel zu schmieden würde eine existierende Datei überschreiben. Aktion abgebrochen." - -#: message -msgid "This operation takes time, keep using this computer on other tasks," -msgstr "Dieser Vorgang braucht Zeit, benutzen Sie den Computer für andere Aufgaben," - -#: message -msgid "once done you will be asked to choose a password for your tomb." -msgstr "wenn der Vorgang einmal abgeschlossen ist, werden Sie gefragt ein Passwort für ihr Grab anzugeben." - -#: message -msgid "To make it faster you can move the mouse around." -msgstr "Um den Vorgang zu Beschleunigen können Sie die Maus hin und her bewegen." - -#: message -msgid "If you are on a server, you can use an Entropy Generation Daemon." -msgstr "Falls Sie auf einem Server sind können Sie einen Daemon benutzen um Entropie zu erstellen." - -#: warning -msgid "Cannot generate encryption key." -msgstr "Verschlüsselungsschlüssel konnte nicht erstellt werden." - -#: message -msgid "(You can also change it later using 'tomb passwd'.)" -msgstr "(Sie können ihn auch später mit 'tomb passwd' wechseln.)" - -#: warning -msgid "The key does not seem to be valid." -msgstr "Der Schlüssel scheint ungültig zu sein." - -#: warning -msgid "Dumping contents to screen:" -msgstr "Inhalte werden am Bildschirm angezeigt :" - -#: failure -msgid "Size argument missing, use -s" -msgstr "Größenangabe fehlt, benutzen Sie -s" - -#: warning -msgid "A tomb exists already. I'm not digging here:" -msgstr "Es existiert bereits ein Grab. Hier grabe ich nicht:" - -#: message -msgid "Your tomb is not yet ready, you need to forge a key and lock it:" -msgstr "Ihr Grab ist noch nicht bereit, erst müssen Sie einen Schlüssel schmieden und es abschließen:" - -#: warning -msgid "No tomb specified for locking." -msgstr "Kein Grab zum verschließen angegeben" - -#: warning -msgid "Usage: tomb lock file.tomb file.tomb.key" -msgstr "Gebrauch: tomb lock file.tomb file.tomb.key" - -#: failure -msgid "There is no tomb here. You have to it dig first." -msgstr "Es ist kein Grab an diesem Ort. Sie müssen erst eins graben." - -#: message -msgid "Checking if the tomb is empty (we never step on somebody else's bones)." -msgstr "Am kontrollieren ob Grab leer ist (wir würden nie fremde Knochen stören)." - -#: warning -msgid "The tomb was already locked with another key." -msgstr "Grab ist schon mit anderem Schlüssel verschlossen." - -#: failure -msgid "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." -msgstr "Vorgang abgebrochen. Ich kann kein bereits abgeschlossenes Grab nochmal abschließen. Graben Sie ein neues." - -#: message -msgid "Fine, this tomb seems empty." -msgstr "Gut, dieses Grab scheint leer." - -#: message -msgid "Formatting Luks mapped device." -msgstr "Formatieren des Luks Gerätes." - -#: warning -msgid "cryptsetup luksFormat returned an error." -msgstr "'cryptsetup luksFormat' hat einen Fehler ausgegeben." - -#: message -msgid "Formatting your Tomb with Ext3/Ext4 filesystem." -msgstr "Ihr Grab wird mit Ext3/Ext4 formatiert." - -#: warning -msgid "Tomb format returned an error." -msgstr "Beim Formatieren ist ein Fehler aufgetreten." - -#: message -msgid "Here below its status is reported:" -msgstr "Zustand des Grabes wie folgt:" - -#: message -msgid "This tomb is a valid LUKS encrypted device." -msgstr "Dieses Grab ist ein gültiges LUKS verschlüsseltes Gerät." - -#: failure -msgid "Failure mounting the encrypted file." -msgstr "Fehler beim Einhängen der verschlüsselten Datei." - -#: warning -msgid "How pitiful! A tomb, and no HOME." -msgstr "Wie bedaurndswert ! Ein Grab aber kein Zuhause." - -#: warning -msgid "Cannot exec bind hooks without a mounted tomb." -msgstr "'Bind hooks' kann nicht benutzt werden ohne eingehängtes Grab." - -#: failure -msgid "I can't see any open tomb, may they all rest in peace." -msgstr "Ich sehe kein geöffnetes Grab. Mögen sie alle in Frieden ruhen." - -#: message -msgid "Search index updated." -msgstr "Such-Index aktualisiert." - -#: warning -msgid "Run 'tomb index' to create indexes." -msgstr "Führen Sie 'tomb index' aus um Suchindexe zu erstellen." - -#: message -msgid "Search completed." -msgstr "Suche abgeschlossen." - -#: failure -msgid "No tomb name specified for resizing." -msgstr "Kein Name für das zu vergrössernde Grab angegeben." - -#: failure -msgid "Size is not an integer." -msgstr "Die Grösse muss eine Ganzzahl sein." - -#: failure -msgid "The new size must be greater then old tomb size." -msgstr "Die neue Grösse muss grösser sein als die alte." - -#: failure -msgid "There is no open tomb to be closed." -msgstr "Es gibt kein zu schließendes Grab." - -#: warning -msgid "Too many tombs mounted, please specify one (see tomb list)" -msgstr "Zu viele Gräber geöffnet, bitte geben sie ein Grab an (siehe 'tomb list')" - -#: warning -msgid "or issue the command 'tomb close all' to close them all." -msgstr "oder 'tomb close all' ausführen um alle zu schließen." - -#: warning -msgid "Please specify an existing tomb." -msgstr "Bitte geben Sie ein existierendes Grab an." - -#: message -msgid "Kill all processes busy inside the tomb." -msgstr "Abbrechen aller laufenden Prozesse im Grab." -#: warning -msgid "Tomb is busy, cannot umount!" -msgstr "Grab ist beschäftigt und kann nicht ausgehänkt werden!" - -#: failure -msgid "Error parsing." -msgstr "Syntax Fehler." - -#: warning -msgid "Some error occurred during option processing." -msgstr "Fehler beim interpretieren der Optionen." - -#: warning -msgid "The create command is deprecated, please use dig, forge and lock instead." -msgstr "Der Befehl create ist veraltet, benutzen Sie stattdesseb dig, forge, und lock." - -#: warning -msgid "For more informations see Tomb's manual page (man tomb)." -msgstr "Für mehr Informationen siehe Benutzerhandbuch (man tomb)." - -#: message -msgid "Try -h for help." -msgstr "Versuchen Sie -h um Hilfe zu erhalten." +#. Fold: Safety functions +#. Function: _whoami +#. +#. Code sample: +#. +#. # Set username from UID or environment +#. _USER=$SUDO_USER +#. [[ "$_USER" = "" ]] && { _USER=$USERNAME } +#. [[ "$_USER" = "" ]] && { _USER=$(id -u) } +#. [[ "$_USER" = "" ]] && { +#. > _failure "Failing to identify the user who is calling us" } +#. +#. # Get GID from option -G or the environment +#. option_is_set -G #. && _GID=$(option_value -G) || _GID=$(id -g $_USER) +#: tomb:189 +msgid "Failing to identify the user who is calling us" +msgstr "Fehler beim Identifizieren des uns rufenden Benutzers" -#: failure +#. Fold: Safety functions +#. Function: _plot +#. +#. Code sample: +#. TOMBFILE=$(basename $TOMBPATH) +#. +#. # The tomb name is TOMBFILE without an extension. +#. # It can start with dots: ..foo.tomb -> ..foo +#. TOMBNAME="${TOMBFILE%\.[^\.]*}" +#. [[ -z $TOMBNAME ]] && { +#. > _failure "Tomb won't work without a TOMBNAME." } +#. +#. # Normalize tomb name +#. TOMBFILE="$TOMBNAME.tomb" +#. +#: tomb:237 msgid "Tomb won't work without a TOMBNAME." msgstr "Ohne GRABNAME kann Tomb nicht funktionieren." -#: failure +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # Provide a random filename in shared memory +#. _tmp_create() { +#. [[ -d "$TMPPREFIX" ]] || { +#. # we create the tempdir with the sticky bit on +#. sudo mkdir -m 1777 "$TMPPREFIX" +#. > [[ $? == 0 ]] || _failure "Fatal error creating the temporary directory: ::1 temp dir::" "$TMPPREFIX" +#. } +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#: tomb:252 +msgid "Fatal error creating the temporary directory: ::1 temp dir::" +msgstr "Fataler Fehler beim kreieren der temporären Datei: ::1 temp dir::" + +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#: tomb:260 +msgid "Fatal error setting the permission umask for temporary files" +msgstr "" +"Fataler Fehler beim Setzen der Berechtigungsmaske für die temporären Dateien" + +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. > _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#: tomb:263 +msgid "Someone is messing up with us trying to hijack temporary files." +msgstr "" +"Jemand versucht uns durcheinander zu bringen und unsere temporären Dateien " +"zu kapern." + +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#: tomb:267 msgid "Fatal error creating a temporary file: ::1 temp file::" msgstr "Fataler Fehler beim erzeugen der temporären Datei: ::1 temp file::" -#: warning +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#. _verbose "Created tempfile: ::1 temp file::" "$tfile" +#. TOMBTMP="$tfile" +#. TOMBTMPFILES+=("$tfile") +#: tomb:270 +msgid "Fatal error setting ownership on temporary file: ::1 temp file::" +msgstr "" +"Fataler Fehler beim Setzen des Besitzers für die temporäre Datei: ::1 temp " +"file::" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. r=1 +#. is_crypt=`sudo dmsetup status "$s" | awk '/crypt/ {print $3}'` +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. > _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#: tomb:316 +msgid "An active swap partition is detected..." +msgstr "" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. > _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#: tomb:318 +msgid "All your swaps are belong to crypt. Good." +msgstr "All ihre Auslagerungsdateien gehören Crypt. Gut." + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. > _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#: tomb:320 +msgid "This poses a security risk." +msgstr "" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. > _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#: tomb:321 msgid "You can deactivate all swap partitions using the command:" msgstr "Sie können alle Swap-Partitionen deaktivieren mit dem Befehl:" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. > _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#: tomb:322 msgid " swapoff -a" msgstr " swapoff -a" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. > _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#. } +#: tomb:323 msgid "But if you want to proceed like this, use the -f (force) flag." -msgstr "Falls sie ohne dies zu tun fortfahren wollen, benutzen sie die -f (forcieren) Option." +msgstr "" +"Falls sie ohne dies zu tun fortfahren wollen, benutzen sie die -f " +"(forcieren) Option." + +#. Fold: Safety functions +#. Function: _check_swap +#. +#. Code sample: +#. _ensure_safe_swap +#. case $? in +#. 0|2) # No, or encrypted swap +#. return 0 +#. ;; +#. *) # Unencrypted swap +#. > _failure "Operation aborted." +#. ;; +#. esac +#. fi +#. } +#: tomb:342 +msgid "Operation aborted." +msgstr "Vorgang abgebrochen." + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find pinentry-curses and no DISPLAY detected." +#. fi +#. +#. else # a DISPLAY is found to be active +#. +#: tomb:379 +msgid "Cannot find pinentry-curses and no DISPLAY detected." +msgstr "" + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. EOF` +#. +#. else +#. +#. if _is_found "pinentry-curses"; then +#. +#. > _warning "Detected DISPLAY, but only pinentry-curses is found." +#. output=`cat <<EOF | pinentry-curses +#. OPTION ttyname=$TTY +#. OPTION lc-ctype=$LANG +#. SETTITLE $title +#: tomb:432 +msgid "Detected DISPLAY, but only pinentry-curses is found." +msgstr "" -#: failure +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find any pinentry: impossible to ask for password." +#. fi +#. +#. fi +#. +#: tomb:442 +msgid "Cannot find any pinentry: impossible to ask for password." +msgstr "" + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. fi # end of DISPLAY block +#. +#. # parse the pinentry output +#. for i in ${(f)output}; do +#. [[ "$i" =~ "^ERR.*" ]] && { +#. > _warning "Pinentry error: ::1 error::" ${i[(w)3]} +#. print "canceled" +#. return 1 } +#. +#. # here the password is found +#: tomb:452 +msgid "Pinentry error: ::1 error::" +msgstr "Pinentry Fehler: ::1 error::" + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. # here the password is found +#. [[ "$i" =~ "^D .*" ]] && password="${i##D }" +#. done +#. +#. [[ "$password" = "" ]] && { +#. > _warning "Empty password" +#. print "empty" +#. return 1 } +#. +#. print "$password" +#: tomb:461 +msgid "Empty password" +msgstr "Leeres Passwort" + +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Check if a filename is a valid tomb +#. is_valid_tomb() { +#. _verbose "is_valid_tomb ::1 tomb file::" $1 +#. +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. > _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#: tomb:477 msgid "Tomb file is missing from arguments." msgstr "Grab Datei fehlen Argumente." -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. > _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#: tomb:481 msgid "Tomb file not found: ::1 tomb file::" msgstr "Grab Datei nicht gefunden: ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. > _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#: tomb:483 msgid "Tomb file is not a regular file: ::1 tomb file::" msgstr "Tomb File ist keine reguläre Datei: ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. > _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#: tomb:485 msgid "Tomb file is empty (zero length): ::1 tomb file::" msgstr "Grab Datei ist leer (Länge: 0): ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. > _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#: tomb:487 msgid "Tomb file is not writable: ::1 tomb file::" msgstr "Grab-Datei ist nicht beschreibbar: ::1 tomb file::" -#: warning +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#. +#. # Tomb file may be a LUKS FS (or we are creating it) +#. [[ "`file $1`" =~ "luks encrypted file" ]] || { +#. > _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#: tomb:495 msgid "File is not yet a tomb: ::1 tomb file::" msgstr "Datei ist noch kein Grab: ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. > _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#: tomb:501 msgid "Tomb is currently in use: ::1 tomb name::" msgstr "Grab wird schon benutzt ::1 tomb name::" -#: message +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. > _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:504 msgid "Valid tomb file found: ::1 tomb path::" msgstr "Gültige tomb Datei gefunden: ::1 tomb path::" -#: warning +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. lo_mount() { +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. > _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#: tomb:516 msgid "Loop mount of volumes is not possible on this machine, this error" msgstr "Loop-Mount der Laufwerke nicht unterstützt, dieser Fehler" -#: print +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. > _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#: tomb:517 +msgid "often occurs on VPS and kernels that don't provide the loop module." +msgstr "" +"tritt oft in virtuellen Maschinen auf oder mit Kerneln ohne Loop-Modul." + +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. > _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#. sudo losetup -f "$tpath" # allocates the next loopback for our file +#: tomb:518 +msgid "It is impossible to use Tomb on this machine at this conditions." +msgstr "" +"Es ist unmöglich Tomb unter diesen Umständen auf dieser Maschine zu benutzen." + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # }}} +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. > _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#: tomb:558 msgid "Syntax: tomb [options] command [arguments]" msgstr "Syntax: tomb [Optionen] Befehl [Argumente]" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. > _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#: tomb:560 msgid "Commands:" msgstr "Befehle:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. > _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#: tomb:562 msgid " // Creation:" msgstr " // Erstellen:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. > _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#: tomb:563 msgid " dig create a new empty TOMB file of size -s in MB" msgstr " dig Neues GRAB erstellen mit der Größe -s Mb" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. > _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#: tomb:564 msgid " forge create a new KEY file and set its password" msgstr " forge Neuen SCHLÜSSEL erstellen und Passwort zuweisen" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. > _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#: tomb:565 msgid " lock installs a lock on a TOMB to use it with KEY" msgstr " lock GRAB mit einem SCHLÜSSEL zusperren" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. > _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#: tomb:567 msgid " // Operations on tombs:" msgstr " // Gräber bearbeiten:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. > _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#: tomb:568 msgid " open open an existing TOMB" msgstr " open Vorhandenens GRAB öffnen" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. > _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#: tomb:569 msgid " index update the search indexes of tombs" msgstr " index Den Suchindex der Gräber aktualisieren" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. > _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#: tomb:570 msgid " search looks for filenames matching text patterns" msgstr " search Sucht nach Dateinamen welche Textmustern entsprechen" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. > _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#: tomb:571 msgid " list list of open TOMBs and information on them" msgstr " list Liste geöffneter GRÄBER mit Infos" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. > _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#: tomb:572 msgid " close close a specific TOMB (or 'all')" msgstr " close Schliesst das angegebene GRAB (oder \"all\")" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. > _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#: tomb:573 msgid " slam slam a TOMB killing all programs using it" msgstr " slam Knallt ein GRAB zu und bricht alle dazugehörende Programme ab" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. > _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#: tomb:575 msgid " resize resize a TOMB to a new size -s (can only grow)" msgstr " resize Größe eines Grabes ändern zu -s Mb (nur vergrößern möglich)" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. > _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#: tomb:578 msgid " // Operations on keys:" msgstr " // Schlüssel bearbeiten:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. > _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#: tomb:579 +msgid " passwd change the password of a KEY (needs old pass)" +msgstr "" +" passwd ändern des Passworts für einen SCHLÜSSEL (benötigt altes Passwort)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. > _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#: tomb:580 +msgid " setkey change the KEY locking a TOMB (needs old key and pass)" +msgstr "" +" setkey ändern des SCHLÜSSELS von einem GRAB (benötigt alten Schlüssel und " +"Passwort)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. > _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#: tomb:583 +msgid " // Backup on paper:" +msgstr " //Backup auf Papier:" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. > _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#: tomb:584 msgid " engrave makes a QR code of a KEY to be saved on paper" msgstr " engrave Erstellt einen QR-Code eines SCHLÜSSELS zum ausdrucken" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. > _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#: tomb:588 +msgid " // Steganography:" +msgstr " // Steganographie:" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. > _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#: tomb:589 +msgid " bury hide a KEY inside a JPEG image (for use with -k)" +msgstr "" +" bury versteckt einen SCHLÜSSEL in einem JPEG Bild (zur Nutzung mit -k)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. > _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#: tomb:590 +msgid " exhume extract a KEY from a JPEG image (prints to stdout)" +msgstr "" +" exhume extrahiert einen SCHLÜSSEL aus einer JPEG Datei (gibt an dei " +"Standardausgabe aus)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. > _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#: tomb:593 msgid "Options:" msgstr "Optionen:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. > _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#: tomb:595 msgid " -s size of the tomb file when creating/resizing one (in MB)" -msgstr " -s Größe eines Grabes (beim Erstellen/neue Größe zuweisen) (in Mb)" - -#: print +msgstr "" +" -s Größe eines Grabes (beim Erstellen/neue Größe zuweisen) (in Mb)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. > _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#: tomb:596 msgid " -k path to the key to be used ('-k -' to read from stdin)" -msgstr " -k Dateipfad zum Schlüssel ('-k -' um ihn aus der Standarteingabe einzulesen)" - -#: print +msgstr "" +" -k Dateipfad zum Schlüssel ('-k -' um ihn aus der Standarteingabe " +"einzulesen)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. > _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#: tomb:597 msgid " -n don't process the hooks found in tomb" msgstr " -n 'Hooks' im Grab nicht benutzen" -#: print -msgid " -o mount options used to open (default: rw,noatime,nodev)" -msgstr " -o Mount Optionen beim Öffnen (Standart: rw,noatime,nodev)" +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. > _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#: tomb:598 +msgid " -o options passed to local command, e.g.:" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. > _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#: tomb:599 +msgid " - mount options used to open (default: rw,noatime,nodev)" +msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. > _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#: tomb:600 +msgid " - an alternate cipher to forge and lock" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. > _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#: tomb:601 msgid " -f force operation (i.e. even if swap is active)" msgstr " -f Vorgang erzwingen (z.B. falls Swap-Datei aktiv)" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. > _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#: tomb:603 msgid " --kdf generate passwords armored against dictionary attacks" msgstr " --kdf Gegen Wörterbuchattacken gefeite Passwörter erstellen" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. > _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#: tomb:607 msgid " -h print this help" msgstr " -h Anzeigen dieses Hilfetextes" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. > _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#: tomb:608 msgid " -v print version, license and list of available ciphers" -msgstr " -v Anzeigen der Version, Lizenzen und vorhandeners Verschlüsslungsmethoden" - -#: print +msgstr "" +" -v Anzeigen der Version, Lizenzen und vorhandeners " +"Verschlüsslungsmethoden" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. > _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#: tomb:609 msgid " -q run quietly without printing informations" msgstr " -q Still ablaufen lassen ohne Infos anzuzeigen" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. > _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#: tomb:610 msgid " -D print debugging information at runtime" msgstr " -D Debug-Infos beim Ablauf anzeigen" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. > _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#: tomb:612 msgid "For more informations on Tomb read the manual: man tomb" msgstr "Für mehr Informationen siehe Benutzerhandbuch (man tomb)." -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. > _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#. # Check whether a commandline option is set. +#: tomb:613 msgid "Please report bugs on <http://github.com/dyne/tomb/issues>." msgstr "Bug-Reports bitte an <https://github.com/dyne/tomb/issues>.." -#: failure +#. Fold: Commandline interaction +#. Function: _ensure_dependencies +#. +#. Code sample: +#. # missing, bail out. +#. _ensure_dependencies() { +#. +#. # Check for required programs +#. for req in cryptsetup pinentry sudo gpg mkfs.ext4 e2fsck; do +#. command -v $req 1>/dev/null 2>/dev/null || { +#. > _failure "Missing required dependency ::1 command::. Please install it." $req } +#. done +#. +#. # Ensure system binaries are available in the PATH +#. path+=(/sbin /usr/sbin) # zsh magic +#: tomb:748 msgid "Missing required dependency ::1 command::. Please install it." -msgstr "Fehlende Abhängigkeit ::1 tomb path:: wird benötigt. Bitte installieren Sie sie." +msgstr "" +"Fehlende Abhängigkeit ::1 tomb path:: wird benötigt. Bitte installieren Sie " +"sie." + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. > _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#: tomb:785 +msgid "cleartext key from stdin selected: this is unsafe." +msgstr "" +"Klartext Schlüssel von der Standarteingabe ausgewählt: Dies ist nicht sicher." + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. > exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#: tomb:786 +msgid "please use --unsafe if you really want to do this." +msgstr "Bitte benutzen Sie --unsafe wenn Sie dies wirklich tun wollen." -#: warning +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. > _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. _warning "is_valid_key() called without an argument." +#: tomb:788 +msgid "received key in cleartext from stdin (unsafe mode)" +msgstr "" +"Empfangen des Schlüssels in Klartext von der Standarteingabe (Nicht sicherer " +"Modus)" + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. > _warning "is_valid_key() called without an argument." +#. return 1 +#. } +#. +#. # If the key file is an image don't check file header +#: tomb:792 msgid "is_valid_key() called without an argument." msgstr "is_valid_key() ausgeführt ohne gültiges Argument." -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. } +#. +#. # If the key file is an image don't check file header +#. [[ -r $TOMBKEYFILE ]] #. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] #. && { +#. > _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. _message "Key is valid." +#: tomb:800 msgid "Key is an image, it might be valid." msgstr "Schlüssel ist ein Bild, es könnte gültig sein" -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] #. && { +#. _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. > _message "Key is valid." +#. return 0 } +#. +#. return 1 +#. } +#: tomb:804 msgid "Key is valid." msgstr "Schlüssel ist gültig" -#: warning +#. Fold: Key operations +#. Function: _tomb_key_recover recover_key +#. +#. Code sample: +#. } +#. +#. # $1 is a string containing an encrypted key +#. _tomb_key_recover recover_key() { +#. local key="${1}" # Unique argument is an encrypted key +#. +#. > _warning "Attempting key recovery." +#. +#. _head="${key[(f)1]}" # take the first line +#. +#. TOMBKEY="" # Reset global variable +#: tomb:814 msgid "Attempting key recovery." msgstr "Versuche Schlüssel wieder herzustellen" -#: warning -msgid "The key seems invalid or its format is not known by this version of Tomb." -msgstr "Der Schlüssel scheint ungültig zu sein, oder sein Format ist dieser Tomb Version unbekannt." +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. # Set global variables TOMBKEY and TOMBKEYFILE. +#. _load_key() { +#. local keyfile="$1" # Unique argument is an optional keyfile +#. +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. > _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. _message "Waiting for the key to be piped from stdin... " +#: tomb:838 +msgid "This operation requires a key file to be specified using the -k option." +msgstr "" +"Diese Operation benötigt das Angeben eines Schlüssels durch die -k Option." + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. > _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=stdin +#. TOMBKEY=$(cat) +#. elif [[ $keyfile == "cleartext" ]]; then +#. _verbose "load_key reading SECRET from stdin" +#: tomb:842 +msgid "Waiting for the key to be piped from stdin... " +msgstr "Warten auf den Schlüssel auf der Standarteingabe... " + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=cleartext +#. TOMBKEY=cleartext +#. TOMBSECRET=$(cat) +#. else +#. _verbose "load_key argument: ::1 key file::" $keyfile +#. > [[ -r $keyfile ]] || _failure "Key not found, specify one using -k." +#. TOMBKEYFILE=$keyfile +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#: tomb:853 +msgid "Key not found, specify one using -k." +msgstr "Schlüssel nicht gefunden, bitte mit -k einen Schlüssel angeben." -#: failure +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#. _verbose "load_key: ::1 key::" $TOMBKEYFILE +#. +#. is_valid_key $TOMBKEY || { +#. > _warning "The key seems invalid or its format is not known by this version of Tomb." +#. _tomb_key_recover $TOMBKEY +#. } +#. +#. # Declared TOMBKEYFILE (path) +#: tomb:861 +msgid "" +"The key seems invalid or its format is not known by this version of Tomb." +msgstr "" +"Der Schlüssel scheint ungültig zu sein, oder sein Format ist dieser Tomb " +"Version unbekannt." + +#. Fold: Key operations +#. Function: get_lukskey +#. +#. Code sample: +#. _verbose "KDF salt: $kdf_salt" +#. _verbose "KDF ic: $kdf_ic" +#. _verbose "KDF len: $kdf_len" +#. _password=$(tomb-kdb-pbkdf2 $kdf_salt $kdf_ic $kdf_len 2>/dev/null <<<$_password) +#. ;; +#. *) +#. > _failure "No suitable program for KDF ::1 program::." $pbkdf_hash +#. unset _password +#. return 1 +#. ;; +#. esac +#: tomb:936 msgid "No suitable program for KDF ::1 program::." msgstr "Kein gültiges Programm zur Schlüsselableitung ::1 program::." -#: failure +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. +#. # This function asks the user for the password to use the key it tests +#. # it against the return code of gpg on success returns 0 and saves +#. # the password in the global variable $TOMBPASSWORD +#. ask_key_password() { +#. [[ -z "$TOMBKEYFILE" ]] && { +#. > _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#: tomb:962 msgid "Internal error: ask_key_password() called before _load_key()." msgstr "Interner Fehler: ask_key_password() vor _load_key() ausgeführt." -#: message +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#. +#. > _message "A password is required to use key ::1 key::" $TOMBKEYFILE +#. passok=0 +#. tombpass="" +#. if [[ "$1" = "" ]]; then +#. +#: tomb:968 msgid "A password is required to use key ::1 key::" msgstr "Ein Passwort ist zur Benutzung des Schlüssels ::1 key:: erforderlich" -#: message +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. if [[ $c == 1 ]]; then +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE") +#. else +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE (attempt $c)") +#. fi +#. [[ $? = 0 ]] || { +#. > _warning "User aborted password dialog." +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#: tomb:980 +msgid "User aborted password dialog." +msgstr "Benutzer hat den Passwortdialog abgebrochen." + +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#. +#. [[ $? = 0 ]] && { +#. > passok=1; _message "Password OK." +#. break; +#. } +#. done +#. +#: tomb:987 +msgid "Password OK." +msgstr "Passwort OK." + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. change_passwd() { +#. local tmpnewkey lukskey c tombpass tombpasstmp +#. +#. _check_swap # Ensure swap is secure, if any +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. > _message "Commanded to change password for tomb key ::1 key::" $TOMBKEYFILE +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. +#: tomb:1025 msgid "Commanded to change password for tomb key ::1 key::" msgstr "Benutzer hat Passwort für Schlüssel ::1 key:: gewechselt." -#: failure +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. local tomboldpwd="`option_value --tomb-old-pwd`" +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomboldpwd +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. > [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#: tomb:1037 msgid "No valid password supplied." msgstr "Kein gültiges Passwort angegeben" -#: message +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#. +#. { option_is_set --tomb-pwd } && { +#: tomb:1039 +msgid "Changing password for ::1 key file::" +msgstr "Wechsle Passwort für ::1 key file::" + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. gen_key "$tombpwd" >> "$tmpnewkey" +#. } || { +#. gen_key >> "$tmpnewkey" +#. } +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. > _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. _success "Your passphrase was successfully updated." +#: tomb:1052 +msgid "Error: the newly generated keyfile does not seem valid." +msgstr "Fehler: Der neu erstellte Schlüssel scheint nicht gültig zu sein." + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. > _success "Your passphrase was successfully updated." +#. +#. return 0 +#. } +#. +#: tomb:1056 +msgid "Your passphrase was successfully updated." +msgstr "Ihr Passphrase wurde erfolgreich auf den neuesten Stand gebracht." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. +#. if [ "$1" = "" ]; then +#. while true; do +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. > _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. _failure "You set empty password, which is not possible." +#. fi +#: tomb:1078 +msgid "User aborted." +msgstr "Vom Benutzer abgebrochen." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. > _failure "You set empty password, which is not possible." +#. fi +#. tombpasstmp=$tombpass +#. tombpass=`ask_password "Type the new password to secure your key (again)"` +#. if [[ $? != 0 ]]; then +#: tomb:1081 +msgid "You set empty password, which is not possible." +msgstr "Fehler: Passwort nicht gesetzt." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # see: https://github.com/dyne/Tomb/issues/82 +#. itertime="`option_value --kdf`" +#. # removing support of floating points because they can't be type checked well +#. if [[ "$itertime" != <-> ]]; then +#. unset tombpass +#. unset tombpasstmp +#. > _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#: tomb:1109 +msgid "" +"Wrong argument for --kdf: must be an integer number (iteration seconds)." +msgstr "Ungültiges Argument für --kdf: dies muss eine Ganzzahl sein." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. unset tombpasstmp +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. > _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#: tomb:1114 +msgid "Using KDF, iterations: ::1 microseconds::" +msgstr "Benutze Schlüsselableitungsverfahren, Durchläufe: ::1 microseconds::" + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. > _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#: tomb:1115 msgid "generating salt" msgstr "generiere Salt" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. > _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#: tomb:1117 msgid "calculating iterations" msgstr "berechne Iterationen" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. > _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#. +#. header="_KDF_pbkdf2sha1_${pbkdf2_salt}_${pbkdf2_iter}_64\n" +#: tomb:1119 msgid "encoding the password" msgstr "Passwort verschlüsseln" -#: warning +#. Fold: Key operations +#. Function: list_gnupg_ciphers +#. +#. Code sample: +#. unset tombpasstmp +#. } +#. +#. # prints an array of ciphers available in gnupg (to encrypt keys) +#. list_gnupg_ciphers() { +#. # prints an error if GnuPG is not found +#. > which gpg 2>/dev/null || _failure "gpg (GnuPG) is not found, Tomb cannot function without it." +#. +#. ciphers=(`gpg --version | awk ' +#. BEGIN { ciphers=0 } +#. /^Cipher:/ { gsub(/,/,""); sub(/^Cipher:/,""); print; ciphers=1; next } +#: tomb:1150 +msgid "gpg (GnuPG) is not found, Tomb cannot function without it." +msgstr "" +"gpg (GnuPG) welches zur Funktion von Tomb notwendig ist, nicht gefunden." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEY +#. +#. imagefile=$PARAM +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. > _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#: tomb:1171 msgid "Encode failed: ::1 image file:: is not a jpeg image." msgstr "Verschlüsselung fehlgeschlagen: ::1 image file:: ist keine JPEG-Datei." -#: failure +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. > _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#: tomb:1175 +msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" +msgstr "Enkodiere Schlüssel ::1 tomb key:: im Bild ::2 image file::" + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. > _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#. # by Tomb, but its not strictly necessary (and having different +#: tomb:1176 +msgid "Please confirm the key password for the encoding" +msgstr "Bitte bestätigen Sie das Passwort zur Verschlüsselung" + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpwd +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. > _warning "Wrong password supplied." +#. _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#: tomb:1192 +msgid "Wrong password supplied." +msgstr "Das eingegebene Passwort ist falsch." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. _warning "Wrong password supplied." +#. > _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#. print - "$TOMBKEY" | awk ' +#: tomb:1193 +msgid "You shall not bury a key whose password is unknown to you." +msgstr "" +"Sie dürfen keinen Schlüssel vergraben, von dem Sie das Passwort nicht kennen." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. /^-----/ {next} +#. /^Version/ {next} +#. {print $0}' #. | steghide embed --embedfile - --coverfile ${imagefile} #. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. > _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#: tomb:1204 +msgid "Encoding error: steghide reports problems." +msgstr "Fehler beim Verschlüsseln: steghide meldet Fehler." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. | steghide embed --embedfile - --coverfile ${imagefile} #. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. > _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#. fi +#. +#. return $res +#: tomb:1207 +msgid "Tomb key encoded succesfully into image ::1 image file::" +msgstr "Grabschlüssel erfolgreich im Bild ::1 image file:: enkodiert" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # mandatory 1st arg: the image file where key is supposed to be +#. # optional 2nd arg: the password to use (same as key, internal use) +#. # optional 3rd arg: the key where to save the result (- for stdout) +#. exhume_key() { +#. [[ "$1" = "" ]] && { +#. > _failure "Exhume failed, no image specified" } +#. +#. local imagefile="$1" # The image file where to look for the key +#. local tombpass="$2" # (Optional) the password to use (internal use) +#. local destkey="$3" # (Optional) the key file where to save the +#: tomb:1219 +msgid "Exhume failed, no image specified" +msgstr "Extrahieren fehlgeschlagen, keine Bilddatei angegeben" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local destkey="$3" # (Optional) the key file where to save the +#. # result (- for stdout) +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. > _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#: tomb:1229 msgid "Exhume failed, image file not found: ::1 image file::" msgstr "Exhumieren fehlgeschlagen, Bilddatei nicht gefunden: ::1 image file::" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. > _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#: tomb:1231 msgid "Exhume failed: ::1 image file:: is not a jpeg image." msgstr "Verschlüsselung fehlgeschlagen: ::1 image file:: ist keine JPEG-Datei." -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#. TOMBKEY=$(steghide extract -sf $imagefile -p $tombpass -xf -) +#. [[ $? != 0 ]] && { +#. > _failure "Wrong password or no steganographic key found" } +#. +#. recover_key $TOMBKEY +#. +#. return 0 +#: tomb:1238 msgid "Wrong password or no steganographic key found" msgstr "Falsches Passwort, oder kein steganographischer Schlüssel gefunden" -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. } +#. +#. # Ensure we have a valid destination for the key +#. [[ -z $destkey ]] && { option_is_set -k } && destkey=$(option_value -k) +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. > _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#: tomb:1249 msgid "printing exhumed key on stdout" msgstr "Gebe exhumierten Schlüssel auf stdout aus" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. > _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#: tomb:1253 msgid "File exists: ::1 tomb key::" msgstr "Datei existiert: ::1 tomb key::" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. > _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#: tomb:1255 +msgid "Use of --force selected: overwriting." +msgstr "--force wurde benutzt, wird überschrieben." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. > _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#: tomb:1258 +msgid "Make explicit use of --force to overwrite." +msgstr "Benutzen Sie --force um ein Überschreiben zu erzwingen." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. > _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#: tomb:1259 msgid "Refusing to overwrite file. Operation aborted." msgstr "Überschreiben verweigert. Operation abgebrochen." -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. > _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#. tombpass=$(option_value --tomb-pwd) +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpass +#. } || { +#: tomb:1262 msgid "Trying to exhume a key out of image ::1 image file::" msgstr "Versuche Schlüssel aus ::1 image file:: zu exhumieren" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. steghide extract -sf $imagefile -p ${tombpass} -xf $destkey +#. r=$? +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. > _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#: tomb:1283 +msgid "Key succesfully exhumed to ::1 key::." +msgstr "Schlüssel erfolgreich exhumiert in ::1 key::." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. > _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#. return $r +#. } +#: tomb:1285 msgid "Nothing found in ::1 image file::" msgstr "Nichts gefunden in ::1 image file::" -#: failure +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. local keyname=$(basename $TOMBKEYFILE) +#. local pngname="$keyname.qr.png" +#. +#. > _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#: tomb:1300 +msgid "Rendering a printable QRCode for key: ::1 tomb key file::" +msgstr "Rendern eines ausdruckbaren QRCodes für Schlüssel: ::1 tomb key file::" + +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. > _failure "QREncode reported an error." } +#. +#. _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#: tomb:1305 msgid "QREncode reported an error." msgstr "QREncode meldet einen Fehler." -#: message +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. _failure "QREncode reported an error." } +#. +#. > _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#. file $pngname +#. } +#: tomb:1307 +msgid "Operation successful:" +msgstr "Operation erfolgreich:" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. dig_tomb() { +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. > _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#: tomb:1340 msgid "Commanded to dig tomb ::1 tomb path::" msgstr "Befehl erhalten zum ausgraben des Grabes: ::1 tomb path::" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. > [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#: tomb:1342 msgid "Missing path to tomb" msgstr "Dateipfad zum Grab fehlt" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. > [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#: tomb:1343 +msgid "Size argument missing, use -s" +msgstr "Größenangabe fehlt, benutzen Sie -s" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. > [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#: tomb:1344 msgid "Size must be an integer (megabytes)" msgstr "Größe muss eine Ganzzahl sein (Megabytes)" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. > [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#: tomb:1345 msgid "Tombs can't be smaller than 10 megabytes" msgstr "Gräber können nicht kleiner als 10 Megabyte sein" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#. > _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#: tomb:1350 +msgid "A tomb exists already. I'm not digging here:" +msgstr "Es existiert bereits ein Grab. Hier grabe ich nicht:" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ -e $TOMBPATH ]] && { +#. _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. > _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#: tomb:1355 +msgid "Creating a new tomb in ::1 tomb path::" +msgstr "Erstelle ein neues Grab in ::1 tomb path::" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. > _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#: tomb:1357 msgid "Generating ::1 tomb file:: of ::2 size::MiB" msgstr "Grab ::1 tomb file:: wird erstellt, mit der Größe ::2 size::Mb" -#: warning +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#. > _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. chmod 0600 $TOMBPATH +#. +#: tomb:1362 msgid "Error creating the tomb ::1 tomb path::" msgstr "Fehler beim Erzeugen des Grabes ::1 tomb path::" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. > _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#: tomb:1377 +msgid "Done digging ::1 tomb name::" +msgstr "Fertig mit ausgraben ::1 tomb name::" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. > _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#: tomb:1378 +msgid "Your tomb is not yet ready, you need to forge a key and lock it:" +msgstr "" +"Ihr Grab ist noch nicht bereit, erst müssen Sie einen Schlüssel schmieden " +"und es abschließen:" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. > _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#: tomb:1379 msgid "tomb forge ::1 tomb path::.key" msgstr "tomb forge ::1 tomb path::.key " -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. > _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:1380 msgid "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" msgstr "tomb lock ::1 tomb path:: -k ::1 tomb path::.key " -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. local destkey="$1" +#. { option_is_set -k } && { destkey=$(option_value -k) } +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. > _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#: tomb:1401 +msgid "A filename needs to be specified using -k to forge a new key." +msgstr "" +"Mit -k muss ein Dateiname angegeben werden, um einen neuen Schlüssel zu " +"schmieden." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. > _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#. +#. # Ensure GnuPG won't exit with an error before first run +#: tomb:1403 msgid "Commanded to forge key ::1 key::" msgstr "::1 key:: wird geschmiedet" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. mkdir -m 0700 $HOME/.gnupg +#. touch $HOME/.gnupg/pubring.gpg } +#. +#. # Do not overwrite any files accidentally +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. > _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#: tomb:1415 +msgid "Forging this key would overwrite an existing file. Operation aborted." +msgstr "" +"Diesen Schlüssel zu schmieden würde eine existierende Datei überschreiben. " +"Aktion abgebrochen." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. > _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#: tomb:1419 +msgid "Cannot generate encryption key." +msgstr "Verschlüsselungsschlüssel konnte nicht erstellt werden." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && algo=$algopt +#. +#. > _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#: tomb:1427 msgid "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" -msgstr "Der Schlüssel ::1 key:: wird mit dem Verschlüsselungsalgorithmus ::2 algorithm:: geschmiedet." +msgstr "" +"Der Schlüssel ::1 key:: wird mit dem Verschlüsselungsalgorithmus ::2 " +"algorithm:: geschmiedet." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. > _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#: tomb:1432 +msgid "This operation takes time, keep using this computer on other tasks," +msgstr "" +"Dieser Vorgang braucht Zeit, benutzen Sie den Computer für andere Aufgaben," + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. > _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#: tomb:1433 +msgid "once done you will be asked to choose a password for your tomb." +msgstr "" +"wenn der Vorgang einmal abgeschlossen ist, werden Sie gefragt ein Passwort " +"für ihr Grab anzugeben." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. > _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#: tomb:1434 +msgid "To make it faster you can move the mouse around." +msgstr "" +"Um den Vorgang zu Beschleunigen können Sie die Maus hin und her bewegen." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. > _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#. { option_is_set --use-urandom } && random_source=/dev/urandom +#: tomb:1435 +msgid "If you are on a server, you can use an Entropy Generation Daemon." +msgstr "" +"Falls Sie auf einem Server sind können Sie einen Daemon benutzen um Entropie " +"zu erstellen." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. > _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#: tomb:1449 +msgid "Choose the password of your key: ::1 tomb key::" +msgstr "Wählen Sie das Passwort von ihrem Schlüssel: ::1 tomb key::" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. > _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#. # the gen_key() function takes care of the new key's encryption +#: tomb:1450 +msgid "(You can also change it later using 'tomb passwd'.)" +msgstr "(Sie können ihn auch später mit 'tomb passwd' wechseln.)" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. > _warning "The key does not seem to be valid." +#. _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#: tomb:1468 +msgid "The key does not seem to be valid." +msgstr "Der Schlüssel scheint ungültig zu sein." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. _warning "The key does not seem to be valid." +#. > _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#: tomb:1469 +msgid "Dumping contents to screen:" +msgstr "Inhalte werden am Bildschirm angezeigt :" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. > _message "Done forging ::1 key file::" $TOMBKEYFILE +#. _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#: tomb:1477 msgid "Done forging ::1 key file::" msgstr "::1 key file:: fertig geschmiedet" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. _message "Done forging ::1 key file::" $TOMBKEYFILE +#. > _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#. # Step three -- Lock tomb +#: tomb:1478 +msgid "Your key is ready:" +msgstr "Ihr Schlüssel ist bereit:" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. # for more alternatives refer to cryptsetup(8) +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. > _warning "No tomb specified for locking." +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#: tomb:1498 +msgid "No tomb specified for locking." +msgstr "Kein Grab zum verschließen angegeben" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. _warning "No tomb specified for locking." +#. > _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#: tomb:1499 +msgid "Usage: tomb lock file.tomb file.tomb.key" +msgstr "Gebrauch: tomb lock file.tomb file.tomb.key" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#. +#. > _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. _failure "There is no tomb here. You have to dig it first." } +#. +#: tomb:1505 msgid "Commanded to lock tomb ::1 tomb file::" msgstr "Grab ::1 tomb file:: wird verschlossen" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _plot $tombpath +#. +#. _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. > _failure "There is no tomb here. You have to dig it first." } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. lo_mount $TOMBPATH +#: tomb:1508 +msgid "There is no tomb here. You have to dig it first." +msgstr "Es ist kein Grab an diesem Ort. Sie müssen erst eins graben." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. > _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#: tomb:1517 +msgid "Checking if the tomb is empty (we never step on somebody else's bones)." +msgstr "" +"Am kontrollieren ob Grab leer ist (wir würden nie fremde Knochen stören)." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. > _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#: tomb:1521 +msgid "The tomb was already locked with another key." +msgstr "Grab ist schon mit anderem Schlüssel verschlossen." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. > _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#. +#: tomb:1522 +msgid "" +"Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +msgstr "" +"Vorgang abgebrochen. Ich kann kein bereits abgeschlossenes Grab nochmal " +"abschließen. Graben Sie ein neues." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. > _message "Fine, this tomb seems empty." +#. fi +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#: tomb:1524 +msgid "Fine, this tomb seems empty." +msgstr "Gut, dieses Grab scheint leer." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. # the encryption cipher for a tomb can be set when locking using -c +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && cipher=$algopt +#. > _message "Locking using cipher: ::1 cipher::" $cipher +#. +#. # get the pass from the user and check it +#. if option_is_set --tomb-pwd; then +#. tomb_pwd="`option_value --tomb-pwd`" +#: tomb:1532 msgid "Locking using cipher: ::1 cipher::" msgstr "Abschließen mit Chiffre: ::1 cipher::" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password "$tomb_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #: tomb:1544 +msgid "Locking ::1 tomb file:: with ::2 tomb key file::" +msgstr "Schliesse ::1 tomb file:: ab mit ::2 tomb key file::" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. > _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#: tomb:1546 +msgid "Formatting Luks mapped device." +msgstr "Formatieren des Luks Gerätes." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#: tomb:1551 +msgid "cryptsetup luksFormat returned an error." +msgstr "'cryptsetup luksFormat' hat einen Fehler ausgegeben." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#: tomb:1556 msgid "cryptsetup luksOpen returned an error." msgstr "'cryptsetup luksOpen' hat einen Fehler ausgegeben" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. > _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#: tomb:1559 +msgid "Formatting your Tomb with Ext3/Ext4 filesystem." +msgstr "Ihr Grab wird mit Ext3/Ext4 formatiert." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. > _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#: tomb:1563 +msgid "Tomb format returned an error." +msgstr "Beim Formatieren ist ein Fehler aufgetreten." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#. > _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#: tomb:1564 msgid "Your tomb ::1 tomb file:: may be corrupted." msgstr "Ihr Grab ::1 tomb file:: könnte korrumpiert sein." -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. > _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" #. $TOMBPATH $TOMBKEYFILE +#. +#. } +#: tomb:1569 msgid "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" -msgstr "Grab ::1 tomb name:: wurde erfolgreich verschlüsselt mit LUKS dm-crypt ::2 cipher::" - -#: message +msgstr "" +"Grab ::1 tomb name:: wurde erfolgreich verschlüsselt mit LUKS dm-crypt ::2 " +"cipher::" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. > _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" #. $TOMBPATH $TOMBKEYFILE +#. +#. } +#. +#: tomb:1570 +msgid "" +"Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" +msgstr "" +"Ihr Grab ist bereit in ::1 tomb path::und gesichert mit dem Schlüssel ::2 " +"tomb key::" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. # This function changes the key that locks a tomb +#. change_tomb_key() { +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. > _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#: tomb:1580 msgid "Commanded to reset key for tomb ::1 tomb path::" -msgstr "Befehl erhalten zum zurücksetzen des Schlüssels fur das Grab ::1 tomb path::" - -#: warning +msgstr "" +"Befehl erhalten zum zurücksetzen des Schlüssels fur das Grab ::1 tomb path::" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. > _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#: tomb:1583 msgid "Command 'setkey' needs two arguments: the old key file and the tomb." -msgstr "Der Befehl 'setkey' benötigt zwei Argumente: Die alte Schlüsseldatei und das Grab." - -#: warning +msgstr "" +"Der Befehl 'setkey' benötigt zwei Argumente: Die alte Schlüsseldatei und das " +"Grab." + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. > _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#. _check_swap +#: tomb:1584 msgid "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" msgstr "z.B.: tomb -k new.tomb.key old.tomb.key secret.tomb" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. > _failure "Execution aborted." +#. } +#. +#. _check_swap +#. is_valid_tomb $tombpath +#: tomb:1585 msgid "Execution aborted." msgstr "Vorgang abgebrochen." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. sudo cryptsetup isLuks ${nstloop} +#. # is it a LUKS encrypted nest? we check one more time +#. [[ $? == 0 ]] || { +#. > _failure "Not a valid LUKS encrypted volume: ::1 volume::" $TOMBPATH } +#. +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#: tomb:1596 msgid "Not a valid LUKS encrypted volume: ::1 volume::" msgstr "Dieses Grab ist ein gültiges LUKS verschlüsseltes Gerät: ::1 volume::" -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. > _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#: tomb:1604 +msgid "Changing lock on tomb ::1 tomb name::" +msgstr "Wechsle Schloss am Grab ::1 tomb name::" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. > _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#. # save date of mount in minutes since 1970 +#: tomb:1605 msgid "Old key: ::1 old key::" msgstr "Alter Schlüssel: ::1 old key::" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomb_old_pwd +#. ask_key_password "$tomb_old_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #: tomb:1621 msgid "No valid password supplied for the old key." msgstr "Kein gültiges Passwort für den alten Schlüssel angegeben." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksOpen ${nstloop} ${mapper} +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. _message "New key: ::1 key file::" $TOMBKEYFILE +#: tomb:1627 msgid "Unexpected error in luksOpen." msgstr "Unerwarteter Fehler in luksOpen." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksOpen ${nstloop} ${mapper} +#. [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. > _message "New key: ::1 key file::" $TOMBKEYFILE +#. +#. if option_is_set --tomb-pwd; then +#. tomb_new_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#: tomb:1631 msgid "New key: ::1 key file::" msgstr "Neuer Schlüssel: ::1 key file::" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#. ask_key_password "$tomb_new_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the new key." } +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#: tomb:1641 msgid "No valid password supplied for the new key." msgstr "Kein gültiges Passwort für den neuen Schlüssel angegeben." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#: tomb:1650 msgid "Unexpected error in luksChangeKey." msgstr "Unerwarteter Fehler in luksChangeKey." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. > sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#: tomb:1652 msgid "Unexpected error in luksClose." msgstr "Unerwarteter Fehler in luksClose." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. > _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#: tomb:1654 +msgid "Succesfully changed key for tomb: ::1 tomb file::" +msgstr "Schlüssel Erfolgreich gewechselt für das Grab: : ::1 tomb file::" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. > _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#. +#: tomb:1655 msgid "The new key is: ::1 new key::" msgstr "Der neue Schlüssel ist: ::1 new key::" -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # {{{ Open +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. > [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#: tomb:1667 msgid "No tomb name specified for opening." msgstr "Bitte geben Sie den Namen des zu vöffnenden Grabes an." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. > _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#: tomb:1669 msgid "Commanded to open tomb ::1 tomb name::" msgstr "Grab ::1 tomb name:: wird geöffnet" -#: warning +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#. # check file type (if its a Luks fs) +#. [[ "`file $TOMBPATH`" =~ "luks encrypted file" ]] || { +#. > _warning "::1 tomb file:: is not a valid tomb file" $TOMBFILE +#. _failure "Operation aborted." +#. } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#: tomb:1676 msgid "::1 tomb file:: is not a valid tomb file" msgstr "::1 tomb file:: iste keine gültige Grabdatei" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. > _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#: tomb:1686 msgid "Mountpoint not specified, using default: ::1 mount point::" msgstr "Mountpoint nicht angegeben, ::1 mount point:: wird benutzt" -#: warning +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. > _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#: tomb:1690 msgid "::1 tomb name:: is already open." msgstr "::1 tomb name:: ist bereits geöffnet." -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. > _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#: tomb:1691 +msgid "Here below its status is reported:" +msgstr "Zustand des Grabes wie folgt:" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. > _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#: tomb:1695 +msgid "Opening ::1 tomb file:: on ::2 mount point::" +msgstr "Öffne ::1 tomb file:: auf ::2 mount point::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. > _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#: tomb:1702 msgid "::1 tomb file:: is not a valid Luks encrypted storage file." msgstr "::1 tomb file:: ist keine gültige Luks verschlüsselte Datei." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. > _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#: tomb:1704 +msgid "This tomb is a valid LUKS encrypted device." +msgstr "Dieses Grab ist ein gültiges LUKS verschlüsseltes Gerät." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#. /^Cipher mode/ {print $3} +#. /^Hash spec/ {print $3}'`) +#. > _message "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" $tombdump[1] $tombdump[2] $tombdump[3] +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#: tomb:1711 msgid "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" -msgstr "Verschlüsselung \"::1 cipher::\" im Modus \"::2 mode::\" und der Hashfunktion \"::3 hash::\"." +msgstr "" +"Verschlüsselung \"::1 cipher::\" im Modus \"::2 mode::\" und der " +"Hashfunktion \"::3 hash::\"." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#. /^Key slot.*ENABLED/ { if(zero==1) print "WARN" }'` +#. [[ "$slotwarn" == "WARN" ]] && { +#. > _warning "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." } +#. +#. # save date of mount in minutes since 1970 +#. mapdate=`date +%s` +#. +#: tomb:1718 +msgid "" +"Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." +msgstr "" +"Mehrere Schlüssellöcher sind an diesem Grab angebracht. Achtung, es könnte " +"eine Hintertür geben." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. ask_key_password +#. } +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} +#. [[ $? = 0 ]] || { +#. > _failure "Failure mounting the encrypted file." } +#. +#. # preserve the loopdev after exit +#. lo_preserve "$nstloop" +#. +#: tomb:1742 +msgid "Failure mounting the encrypted file." +msgstr "Fehler beim Einhängen der verschlüsselten Datei." -#: warning -msgid "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." -msgstr "Mehrere Schlüssellöcher sind an diesem Grab angebracht. Achtung, es könnte eine Hintertür geben." +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # array: [ cipher, keysize, loopdevice ] +#. tombstat=(`sudo cryptsetup status ${mapper} | awk ' +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. > _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#: tomb:1752 +msgid "Success unlocking tomb ::1 tomb name::" +msgstr "Entsperren erfolgreich von ::1 tomb name::" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. > _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#. _verbose "Tomb engraved as ::1 tomb name::" $TOMBNAME +#. sudo tune2fs -L $TOMBNAME /dev/mapper/${mapper} > /dev/null +#. +#: tomb:1755 msgid "Checking filesystem via ::1::" msgstr "Dateisystem kontrollieren mit ::1::" -#: message -msgid "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" -msgstr "Letzer Besuch von ::1 user::(::2 tomb build::) von ::3 tty:: auf ::4 host::" +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # TODO: safety check MOUNTOPTS +#. # safe_mount_options && #. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. > _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#: tomb:1773 +msgid "Error mounting ::1 mapper:: on ::2 tombmount::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. # safe_mount_options && #. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. > _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#: tomb:1775 +msgid "Are mount options '::1 mount options::' valid?" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#. > _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#: tomb:1780 +msgid "Cannot mount ::1 tomb name::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#. +#. > _success "Success opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. local tombtty tombhost tombuid tombuser +#. +#. # print out when was opened the last time, by whom and where +#: tomb:1786 +msgid "Success opening ::1 tomb file:: on ::2 mount point::" +msgstr "Erfolgreiches Öffnen von ::1 tomb file:: auf ::2 mount point::" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombuid=$(_cat ${tombmount}/.uid | tr -d ' ') +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. > _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#: tomb:1800 +msgid "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" +msgstr "" +"Letzer Besuch von ::1 user::(::2 tomb build::) von ::3 tty:: auf ::4 host::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. > _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#. print $_UID > ${tombmount}/.uid +#: tomb:1801 msgid "on date ::1 date::" msgstr "am ::1 date::" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. +#. # Default mount options are overridden with the -o switch +#. [[ -n ${(k)OPTS[-o]} ]] && MOUNTOPTS=${OPTS[-o]} +#. +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. > _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. _warning "Cannot exec bind hooks without a mounted tomb." +#: tomb:1849 +msgid "How pitiful! A tomb, and no HOME." +msgstr "Wie bedaurndswert ! Ein Grab aber kein Zuhause." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. > _warning "Cannot exec bind hooks without a mounted tomb." +#. return 1 } +#. +#. [[ -r "$mnt/bind-hooks" ]] || { +#. _verbose "bind-hooks not found in ::1 mount point::" $mnt +#: tomb:1853 +msgid "Cannot exec bind hooks without a mounted tomb." +msgstr "'Bind hooks' kann nicht benutzt werden ohne eingehängtes Grab." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # better parsing for bind hooks checks for two separated words on +#. # each line, using zsh word separator array subscript +#. _bindhooks="${mapfile[${mnt}/bind-hooks]}" +#. for h in ${(f)_bindhooks}; do +#. s="${h[(w)1]}" +#. d="${h[(w)2]}" +#. > [[ "$s" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. [[ "$d" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. maps+=($s $d) +#. _verbose "bind-hook found: $s -> $d" +#. done +#: tomb:1869 msgid "bind-hooks file is broken" msgstr "Datei mit den Bind-Hooks ist korrumpiert" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. _verbose "bind-hook found: $s -> $d" +#. done +#. unset _bindhooks +#. +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#: tomb:1878 msgid "bind-hooks map format: local/to/tomb local/to/$HOME" msgstr "'bind hooks' map format: local/to/tomb local/to/$HOME" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#: tomb:1882 msgid "bind-hooks map format: local/to/tomb local/to/$HOME. Rolling back" -msgstr "'bind-hooks' map format: local/to/tomb local/to/$HOME. Wird rückgängig gemacht" - -#: warning +msgstr "" +"'bind-hooks' map format: local/to/tomb local/to/$HOME. Wird rückgängig " +"gemacht" + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. > _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} #: tomb:1887 msgid "bind-hook target not existent, skipping ::1 home::/::2 subdir::" msgstr "'bind-hooks' Ziel ungültig, ::1 home::/::2 subdir:: wird ignoriert." -#: warning -msgid "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" -msgstr "'bind-hooks' Quelle nicht in Grab gefunden, ::1 mount point::/::2 subdir:: wird ignoriert" +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. > _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} #. && mounted+=("$HOME/${maps[$dir]}") +#. fi +#: tomb:1889 +msgid "" +"bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" +msgstr "" +"'bind-hooks' Quelle nicht in Grab gefunden, ::1 mount point::/::2 subdir:: " +"wird ignoriert" + +#. Fold: Open +#. Function: exec_safe_post_hooks +#. +#. Code sample: +#. # Only run if post-hooks has the executable bit set +#. [[ -x $mnt/post-hooks ]] || return +#. +#. # If the file starts with a shebang, run it. +#. cat $mnt/post-hooks | head -n1 | grep '^#!\s*/' &> /dev/null +#. [[ $? == 0 ]] && { +#. > _success "Post hooks found, executing as user ::1 user name::." $USERNAME +#. $mnt/post-hooks $act $mnt +#. } +#. } +#. +#: tomb:1917 +msgid "Post hooks found, executing as user ::1 user name::." +msgstr "Post Hooks gefunden, ausführen als Benutzer ::1 user name::." -#: failure +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. local tombname tombmount tombfs tombfsopts tombloop +#. local ts tombtot tombused tombavail tombpercent tombp tombsince +#. local tombtty tombhost tombuid tombuser +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "I can't see any ::1 status:: tomb, may they all rest in peace." ${1:-open} } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:1936 msgid "I can't see any ::1 status:: tomb, may they all rest in peace." msgstr "Ich sehe keine ::1 status::. Mögen sie alle in Frieden ruhen." -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. tombuser="${ee[(ws@:@)1]}" } +#. done +#. } +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. > _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#: tomb:1969 msgid "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" msgstr "::1 tombname:: geöffnet in ::2 tombmount:: mit ::3 tombfsopts::" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. > _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#: tomb:1972 msgid "::1 tombname:: open since ::2 tombsince::" msgstr "::1 tombname:: geöffnet seit ::2 tombsince::" -#: message -msgid "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" -msgstr "::1 tombname:: geöffnet von ::2 tombuser:: von ::3 tombtty:: auf ::4 tombhost::" - -#: message -msgid "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " -msgstr "::1 tombname:: Grösse ::2 tombtot:: davon ::3 tombused:: (::5 tombpercent::%) is benutzt: ::4 tombavail:: frei␣ " - -#: warning +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. > _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #: tomb:1975 +msgid "" +"::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" +msgstr "" +"::1 tombname:: geöffnet von ::2 tombuser:: von ::3 tombtty:: auf ::4 " +"tombhost::" + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. > _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#: tomb:1979 +msgid "" +"::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::" +"%) is used: ::4 tombavail:: free " +msgstr "" +"::1 tombname:: Grösse ::2 tombtot:: davon ::3 tombused:: (::5 tombpercent::" +"%) is benutzt: ::4 tombavail:: frei␣ " + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. > _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#: tomb:1983 msgid "::1 tombname:: warning: your tomb is almost full!" msgstr "::1 tombname:: Warnung: Ihr Grab ist fast voll!" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#. for h in ${mounted_hooks}; do +#. > _message "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" #. $tombname "`basename ${h[(ws:;:)1]}`" ${h[(ws:;:)2]} +#. done +#. done +#. } +#: tomb:1989 msgid "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" msgstr "::1 tombname:: bindet ::2 hookname:: ein auf ::3 hookdest::" -#: failure +#. Fold: List +#. Function: list_tomb_binds +#. +#. Code sample: +#. # list_tomb_binds +#. # print out an array of mounted bind hooks (internal use) +#. # format is semi-colon separated list of attributes +#. # needs an argument: name of tomb whose hooks belong +#. list_tomb_binds() { +#. [[ -z "$1" ]] && { +#. > _failure "Internal error: list_tomb_binds called without argument." } +#. +#. # list bind hooks on util-linux 2.20 (Debian 7) +#. mount -l #. | awk -vtomb="$1" ' +#: tomb:2044 msgid "Internal error: list_tomb_binds called without argument." msgstr "Interner Fehler: list_tomb_binds ohne rgumente aufgerufen." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # {{{ Index and search +#. +#. # index files in all tombs for search +#. # $1 is optional, to specify a tomb +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. > _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#: tomb:2076 msgid "Cannot index tombs on this system: updatedb (mlocate) not installed." -msgstr "Kann Gräber auf diesem System nicht indexieren: updatedb (mlocate) nicht installiert." - -#: warning +msgstr "" +"Kann Gräber auf diesem System nicht indexieren: updatedb (mlocate) nicht " +"installiert." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. > _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#: tomb:2080 msgid "Cannot use GNU findutils for index/search commands." msgstr "Kann GNU findutils nicht für Indexierung/Suchbefehle benutzen." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. > _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#: tomb:2082 msgid "Index command needs 'mlocate' to be installed." msgstr "Index Befehl benötigt installiertes 'mlocate'." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. > _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#: tomb:2090 msgid "There seems to be no open tomb engraved as [::1::]" msgstr "Es scheint kein als [::1::] graviertes Grab offen zu sein" -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. > _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#: tomb:2092 +msgid "I can't see any open tomb, may they all rest in peace." +msgstr "Ich sehe kein geöffnetes Grab. Mögen sie alle in Frieden ruhen." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#. { command -v unoconv 1>/dev/null 2>/dev/null } && { +#. unoconv -l 2>/dev/null & +#: tomb:2094 +msgid "Creating and updating search indexes." +msgstr "Kreieren und aktualisieren von Suchindexen" + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. > _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#: tomb:2107 msgid "Skipping ::1 tomb name:: (.noindex found)." msgstr "Überspringen von ::1 tomb name:: (.noindex gefunden)." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. > _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#: tomb:2109 msgid "Indexing ::1 tomb name:: filenames..." msgstr "Indexieren der Dateinamen von ::1 tomb name:: im Gange..." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. > _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#: tomb:2114 msgid "Indexing ::1 tomb name:: contents..." msgstr "Indexieren der Inhalte von ::1 tomb name:: im Gange..." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. > _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#. DefaultContents TXT* +#. IndexDir $tombmount +#: tomb:2116 +msgid "Generating a new swish-e configuration file: ::1 swish conf::" +msgstr "Kreieren einer neuen swish-e Konfigurationsdatei: ::1 swish conf::" + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. } +#. +#. swish-e -c ${tombmount}/.swishrc -S fs -v3 +#. +#. } +#. +#. > _message "Search index updated." +#. done +#. } +#. search_tombs() { +#. { command -v locate 1>/dev/null 2>/dev/null } || { +#: tomb:2190 +msgid "Search index updated." +msgstr "Such-Index aktualisiert." + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Searching for: ::1::" ${(f)@} +#. for t in ${mounted_tombs}; do +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:2210 +msgid "Searching for: ::1::" +msgstr "Suchen nach: ::1::" + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. > _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#: tomb:2218 msgid "Searching filenames in tomb ::1 tomb name::" msgstr "Suche Dateinamen in::1 tomb name::" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. > _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#: tomb:2220 msgid "Matches found: ::1 matches::" msgstr "Ergebnisse: ::1 matches::" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. > _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#: tomb:2225 msgid "Searching contents in tomb ::1 tomb name::" msgstr "Suche in den Inhalten von ::1 tomb name::" -#: warning +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. > _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#: tomb:2228 msgid "Skipping tomb ::1 tomb name::: not indexed." msgstr "Das Grab ::1 tomb name:: ist nicht indexiert und wird ignoriert." -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. > _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#. +#: tomb:2229 +msgid "Run 'tomb index' to create indexes." +msgstr "Führen Sie 'tomb index' aus um Suchindexe zu erstellen." + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. > _message "Search completed." +#. } +#. +#. # }}} - Index and search +#. +#: tomb:2231 +msgid "Search completed." +msgstr "Suche abgeschlossen." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # {{{ Resize +#. +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. > _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#: tomb:2242 msgid "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." msgstr "Grab ::1 tomb name:: wird auf ::2 size:: Mb vergrössert." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. > [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#: tomb:2244 +msgid "No tomb name specified for resizing." +msgstr "Kein Name für das zu vergrössernde Grab angegeben." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. > [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. _failure "Aborting operations: new size was not specified, use -s" } +#: tomb:2245 msgid "Cannot find ::1::" msgstr "::1:: nicht gefunden." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. > _failure "Aborting operations: new size was not specified, use -s" } +#. +#. is_valid_tomb $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#: tomb:2249 msgid "Aborting operations: new size was not specified, use -s" msgstr "Operationen werden abgebrochen: Neue Größe nicht mit -s angegeben" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. local oldtombsize=$(( `stat -c %s "$TOMBPATH" 2>/dev/null` / 1048576 )) +#. local mounted_tomb=`mount -l | +#. awk -vtomb="[$TOMBNAME]" '/^\/dev\/mapper\/tomb/ { if($7==tomb) print $1 }'` +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. > _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#: tomb:2261 msgid "Please close the tomb ::1 tomb name:: before trying to resize it." -msgstr "Bitte schließen Sie das Grab ::1 tomb name:: bevor Sie versuchen die Größe zu ändern." - -#: failure +msgstr "" +"Bitte schließen Sie das Grab ::1 tomb name:: bevor Sie versuchen die Größe " +"zu ändern." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. > _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#: tomb:2264 msgid "You must specify the new size of ::1 tomb name::" msgstr "Sie müssen die neue Grösse von ::1 tomb name:: angeben" -#: failure -msgid "Error creating the extra resize ::1 size::, operation aborted." -msgstr "Fehler beim erstellen der extra Vergrösserung ::1 size::, Operation abgebrochen." +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. > [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. _failure "The new size must be greater then old tomb size." } +#. +#: tomb:2266 +msgid "Size is not an integer." +msgstr "Die Grösse muss eine Ganzzahl sein." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. > _failure "The new size must be greater then old tomb size." } +#. +#. delta="$(( $newtombsize - $oldtombsize ))" +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#: tomb:2269 +msgid "The new size must be greater then old tomb size." +msgstr "Die neue Grösse muss grösser sein als die alte." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#. +#. _verbose "Data dump using ::1:: from /dev/urandom" ${DD[1]} +#. ${=DD} if=/dev/urandom bs=1048576 count=${delta} >> $TOMBPATH +#. +#. [[ $? == 0 ]] || { +#. > _failure "Error creating the extra resize ::1 size::, operation aborted." $tmp_resize } +#. +#. { option_is_set --tomb-pwd } && { +#. tomb_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_pwd +#: tomb:2279 +msgid "Error creating the extra resize ::1 size::, operation aborted." +msgstr "" +"Fehler beim erstellen der extra Vergrösserung ::1 size::, Operation " +"abgebrochen." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. mapper="tomb.$TOMBNAME.$mapdate.$(basename $nstloop)" +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} || { +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. > _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#: tomb:2300 msgid "cryptsetup failed to resize ::1 mapper::" msgstr "cryptsetup konnte ::1 mapper:: nicht vergrössern" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. > _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#: tomb:2303 msgid "e2fsck failed to check ::1 mapper::" msgstr "e2fsck konnte ::1 mapper:: nicht verifizieren" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. > _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#. # close and free the loop device +#. sudo cryptsetup luksClose "${mapper}" +#. +#: tomb:2306 msgid "resize2fs failed to resize ::1 mapper::" msgstr "resize2fs konnte ::1 mapper:: nicht vergrössern" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts`) +#. else +#. mounted_tombs=(`list_tomb_mounts $1`) +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#: tomb:2330 +msgid "There is no open tomb to be closed." +msgstr "Es gibt kein zu schließendes Grab." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. > _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#: tomb:2333 +msgid "Too many tombs mounted, please specify one (see tomb list)" +msgstr "" +"Zu viele Gräber geöffnet, bitte geben sie ein Grab an (siehe 'tomb list')" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. > _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#: tomb:2334 +msgid "or issue the command 'tomb close all' to close them all." +msgstr "oder 'tomb close all' ausführen um alle zu schließen." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. > _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#: tomb:2350 msgid "Tomb not found: ::1 tomb file::" msgstr "Grab unauffindbar: ::1 tomb file::" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. > _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #: tomb:2351 +msgid "Please specify an existing tomb." +msgstr "Bitte geben Sie ein existierendes Grab an." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#: tomb:2355 +msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" +msgstr "" +"Abruptes Schließen von ::1 tomb name:: eingehangen in ::2 mount point:: " + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. > _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #: tomb:2357 +msgid "Kill all processes busy inside the tomb." +msgstr "Abbrechen aller laufenden Prozesse im Grab." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. > _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount } +#. +#: tomb:2359 msgid "Cannot slam the tomb ::1 tomb name::" msgstr "::1 tomb name:: kann nicht abrupt geschlossen werden !" -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. > _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount } +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#: tomb:2361 msgid "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" msgstr "Grab ::1 tomb name:: eingehängt in ::2 mount point:: wird geschlossen." -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. > _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#: tomb:2369 msgid "Closing tomb bind hook: ::1 hook::" msgstr "Schliessen des 'bind hooks': ::1 hook::" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#: tomb:2372 +msgid "Slamming tomb: killing all processes using this hook." +msgstr "" +"Abruptes Schließen des Grabes: Beenden aller Prozesse die diesen Hook " +"benutzen." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. > _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#: tomb:2375 msgid "Cannot slam the bind hook ::1 hook::" msgstr "Abruptes Schliessen des 'bind hooks' ::1 hook:: nicht möglich" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. > _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#. done +#. +#. # Execute post-hooks for eventual cleanup +#: tomb:2378 msgid "Tomb bind hook ::1 hook:: is busy, cannot close tomb." -msgstr "Der 'bind hook' ::1 hook:: ist beschäftigt und kann nicht geschlossen werden." +msgstr "" +"Der 'bind hook' ::1 hook:: ist beschäftigt und kann nicht geschlossen werden." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. # Execute post-hooks for eventual cleanup +#. { option_is_set -n } || { +#. exec_safe_post_hooks ${tombmount%%/} close } +#. +#. _verbose "Performing umount of ::1 mount point::" $tombmount +#. sudo umount ${tombmount} +#. > [[ $? = 0 ]] || { _warning "Tomb is busy, cannot umount!"; return 1 } +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#: tomb:2388 +msgid "Tomb is busy, cannot umount!" +msgstr "Grab ist beschäftigt und kann nicht ausgehänkt werden!" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#. sudo cryptsetup luksClose $mapper +#. [[ $? == 0 ]] || { +#. > _failure "Error occurred in cryptsetup luksClose ::1 mapper::" $mapper } +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#: tomb:2395 msgid "Error occurred in cryptsetup luksClose ::1 mapper::" -msgstr "Ein Fehler ist beim Ausführen von 'cryptsetup luksClose ::1 mapper::' aufgetreten." +msgstr "" +"Ein Fehler ist beim Ausführen von 'cryptsetup luksClose ::1 mapper::' " +"aufgetreten." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#. _verbose "/dev/$tombloop was already closed." } +#. +#. > _success "Tomb ::1 tomb name:: closed: your bones will rest in peace." $tombname +#. +#. done # loop across mounted tombs +#. +#. return 0 +#: tomb:2402 +msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." +msgstr "" +"Grab ::1 tomb name:: geschlossen: Ihre Knochen werden in Frieden ruhen." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. return 1 +#. fi +#. return 0 +#. fi +#. unset discardme +#. if ! zparseopts -M -E -D -Adiscardme ${every_opts}; then +#. > _failure "Error parsing." +#. return 127 +#. fi +#. unset discardme +#. subcommand=$1 +#: tomb:2522 +msgid "Error parsing." +msgstr "Syntax Fehler." -#: warning +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. subcommand=$1 +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. > _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#: tomb:2532 msgid "There's no such command \"::1 subcommand::\"." msgstr "Der Befehl \"::1 subcommand::\" existiert nicht." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. > exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#. +#: tomb:2533 msgid "Please try -h for help." msgstr "Versuchen Sie -h um Hilfe zu erhalten." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # zsh magic: ${=string} will split to multiple arguments when spaces occur +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. > _warning "Some error occurred during option processing." +#. exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#: tomb:2545 +msgid "Some error occurred during option processing." +msgstr "Fehler beim interpretieren der Optionen." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. _warning "Some error occurred during option processing." +#. > exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#. ok=0 +#: tomb:2546 msgid "See \"tomb help\" for more info." msgstr "Sie \"tomb help\" für mehr Infos." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. for arg in $*; do +#. if [[ $arg == '--' || $arg == '-' ]]; then +#. ok=1 +#. continue #it shouldnt be appended to PARAM +#. elif [[ $arg[1] == '-' ]]; then +#. if [[ $ok == 0 ]]; then +#. > exitv=127 _failure "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" $arg $subcommand +#. fi +#. fi +#. PARAM+=$arg +#. done +#: tomb:2558 msgid "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" msgstr "Unbekannte Option ::1 arg:: für Unterbefehl ::2 subcommand::" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Use colors unless told not to +#. { ! option_is_set --no-color } && { autoload -Uz colors && colors } +#. # Some options are only available during insecure mode +#. { ! option_is_set --unsafe } && { +#. for opt in --tomb-pwd --use-urandom --tomb-old-pwd; do +#. { option_is_set $opt } && { +#. > exitv=127 _failure "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\nIf you really want so, add --unsafe" $opt } +#. done +#. } +#. # read -t or --tmp flags to set a custom temporary directory +#. option_is_set --tmp && TMPPREFIX=$(option_value --tmp) +#: tomb:2574 +msgid "" +"You specified option ::1 option::, which is DANGEROUS and should only be " +"used for testing\n" +"If you really want so, add --unsafe" +msgstr "" +"Sie haben die Option ::1 option:: gewählt, welche GEFÄHRLICH ist und nur zum " +"Testen benutzt werden sollte.\n" +"Wenn sie dies wollen, benutzen sie --unsafe" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. help) +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. > _warning "The create command is deprecated, please use dig, forge and lock instead." +#. _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#: tomb:2608 +msgid "" +"The create command is deprecated, please use dig, forge and lock instead." +msgstr "" +"Der Befehl create ist veraltet, benutzen Sie stattdesseb dig, forge, und " +"lock." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. _warning "The create command is deprecated, please use dig, forge and lock instead." +#. > _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#. # CREATE Step 1: dig -s NN file.tomb +#: tomb:2609 +msgid "For more informations see Tomb's manual page (man tomb)." +msgstr "Für mehr Informationen siehe Benutzerhandbuch (man tomb)." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. umount_tomb $PARAM[1] +#. ;; +#. +#. # Grow tomb's size +#. resize) +#. [[ $RESIZER == 0 ]] && { +#. > _failure "Resize2fs not installed: cannot resize tombs." } +#. resize_tomb $PARAM[1] +#. ;; +#. +#. ## Contents manipulation +#: tomb:2643 msgid "Resize2fs not installed: cannot resize tombs." msgstr "Resize2fs nicht installiert: Gräber können nicht vergrössert werden." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. ## Locking operations +#. +#. # Export key to QR Code +#. engrave) +#. [[ $QRENCODE == 0 ]] && { +#. > _failure "QREncode not installed: cannot engrave keys on paper." } +#. engrave_key ${=PARAM} +#. ;; +#. +#. # Change password on existing key +#: tomb:2669 msgid "QREncode not installed: cannot engrave keys on paper." msgstr "QREncode nicht installiert: Kann Grabgravur nicht auf Papier ausgeben." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. change_tomb_key ${=PARAM} +#. ;; +#. +#. # STEGANOGRAPHY: hide key inside an image +#. bury) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot bury keys into images." } +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#: tomb:2686 msgid "Steghide not installed: cannot bury keys into images." -msgstr "Steghide ist nicht installiert: Schlüssel können nicht in Bilder vergraben werden." - -#: failure +msgstr "" +"Steghide ist nicht installiert: Schlüssel können nicht in Bilder vergraben " +"werden." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#. exhume) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot exhume keys from images." } +#. exhume_key $PARAM[1] +#. ;; +#. +#. ## Internal commands useful to developers +#: tomb:2693 msgid "Steghide not installed: cannot exhume keys from images." -msgstr "Steghide ist nicht installiert: Schlüssel können nicht aus Bilder ausgegraben werden." - -#: print +msgstr "" +"Steghide ist nicht installiert: Schlüssel können nicht aus Bilder " +"ausgegraben werden." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Ask user for a password interactively +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. > _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#: tomb:2707 msgid "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" -msgstr "Tomb ::1 version:: - ein starker und sanfter Totengräber für ihre Geheimnisse" - -#: print -msgid " Copyright (C) 2007-2014 Dyne.org Foundation, License GNU GPL v3+" -msgstr " Urheberrecht (C) 2007-2014 Dyne.org Foundation, Lizens GNU GPL v3+" +msgstr "" +"Tomb ::1 version:: - ein starker und sanfter Totengräber für ihre Geheimnisse" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. > _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#: tomb:2709 +msgid " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. > _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#: tomb:2710 msgid " This is free software: you are free to change and redistribute it" -msgstr " This ist freie Software, Sie sind frei sie zu verändern und weiterzugeben" - -#: print +msgstr "" +" This ist freie Software, Sie sind frei sie zu verändern und weiterzugeben" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. > _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#: tomb:2711 +msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" +msgstr "" +" Für den aktuellsten Quellcode besuchen sie <http://dyne.org/software/tomb>" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. > _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#: tomb:2716 msgid " This source code is distributed in the hope that it will be useful," -msgstr " Dieser Quellcode wird veröffentlicht in der Hoffnung dass er nützlich ist," - -#: print +msgstr "" +" Dieser Quellcode wird veröffentlicht in der Hoffnung dass er nützlich ist," + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. > _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#: tomb:2717 msgid " but WITHOUT ANY WARRANTY; without even the implied warranty of" msgstr " aber OHNE JEDWEGE GARANTIE; inbegriffen die Garantie der" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. > _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#: tomb:2718 msgid " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." msgstr " MARKTGÄNGIGKEIT oder der EIGNUNG ZU EINEM BESTIMMTEN ZWECK." -#: print -msgid "System utils:" -msgstr "Systemwerkzeuge:" - -#: warning -msgid "Command \"::1 subcommand::\" not recognized." -msgstr "Der Befehl \"::1 subcommand::\" wurde nicht erkannt." - -#: print -msgid " passwd change the password of a KEY (needs old pass)" -msgstr " passwd ändern des Passworts für einen SCHLÜSSEL (benötigt altes Passwort)" - -#: print -msgid " setkey change the KEY locking a TOMB (needs old key and pass)" -msgstr " setkey ändern des SCHLÜSSELS von einem GRAB (benötigt alten Schlüssel und Passwort)" - -#: print -msgid " // Backup on paper:" -msgstr " //Backup auf Papier:" - -#: print -msgid " // Steganography:" -msgstr " // Steganographie:" - -#: print -msgid " bury hide a KEY inside a JPEG image (for use with -k)" -msgstr " bury versteckt einen SCHLÜSSEL in einem JPEG Bild (zur Nutzung mit -k)" - -#: print -msgid " exhume extract a KEY from a JPEG image (prints to stdout)" -msgstr " exhume extrahiert einen SCHLÜSSEL aus einer JPEG Datei (gibt an dei Standardausgabe aus)" - -#: failure -msgid "Exhume failed, no image specified" -msgstr "Extrahieren fehlgeschlagen, keine Bilddatei angegeben" - -#: print -msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" -msgstr " Für den aktuellsten Quellcode besuchen sie <http://dyne.org/software/tomb>" - -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. > _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#. _print "\000" +#. cat <<EOF +#: tomb:2720 msgid " When in need please refer to <http://dyne.org/support>." msgstr " Für Hilfe bitte wenden Sie sich an <http://dyne.org/support>." -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. > _print "System utils:" +#. _print "\000" +#. cat <<EOF +#. `sudo -V | head -n1` +#. `cryptsetup --version` +#: tomb:2722 +msgid "System utils:" +msgstr "Systemwerkzeuge:" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. `cryptsetup --version` +#. `pinentry --version` +#. `gpg --version | head -n1` - key forging algorithms (GnuPG symmetric ciphers): +#. `list_gnupg_ciphers` +#. EOF +#. _print "\000" +#. > _print "Optional utils:" +#. _print "\000" +#. _list_optional_tools version +#. return 0 +#. } +#: tomb:2732 msgid "Optional utils:" msgstr "Optionelle Hilfsmittel:" -#: failure -msgid "Fatal error setting the permission umask for temporary files" -msgstr "Fataler Fehler beim Setzen der Berechtigungsmaske für die temporären Dateien" - -#: failure -msgid "Fatal error setting ownership on temporary file: ::1 temp file::" -msgstr "Fataler Fehler beim Setzen des Besitzers für die temporäre Datei: ::1 temp file::" - -#: warning -msgid "cleartext key from stdin selected: this is unsafe." -msgstr "Klartext Schlüssel von der Standarteingabe ausgewählt: Dies ist nicht sicher." - -#: failure -msgid "please use --unsafe if you really want to do this." -msgstr "Bitte benutzen Sie --unsafe wenn Sie dies wirklich tun wollen." - -#: warning -msgid "received key in cleartext from stdin (unsafe mode)" -msgstr "Empfangen des Schlüssels in Klartext von der Standarteingabe (Nicht sicherer Modus)" - -#: failure -msgid "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\n" -"If you really want so, add --unsafe" -msgstr "Sie haben die Option ::1 option:: gewählt, welche GEFÄHRLICH ist und nur zum Testen benutzt werden sollte.\n" -"Wenn sie dies wollen, benutzen sie --unsafe" - -#: failure -msgid "Failing to identify the user who is calling us" -msgstr "Fehler beim Identifizieren des uns rufenden Benutzers" - -#: failure -msgid "Fatal error creating the temporary directory: ::1 temp dir::" -msgstr "Fataler Fehler beim kreieren der temporären Datei: ::1 temp dir::" - -#: failure -msgid "Someone is messing up with us trying to hijack temporary files." -msgstr "Jemand versucht uns durcheinander zu bringen und unsere temporären Dateien zu kapern." - -#: success -msgid "All your swaps are belong to crypt. Good." -msgstr "All ihre Auslagerungsdateien gehören Crypt. Gut." - -#: success -msgid "Changing password for ::1 key file::" -msgstr "Wechsle Passwort für ::1 key file::" - -#: success -msgid "Your passphrase was successfully updated." -msgstr "Ihr Passphrase wurde erfolgreich auf den neuesten Stand gebracht." - -#: success -msgid "Using KDF, iterations: ::1 microseconds::" -msgstr "Benutze Schlüsselableitungsverfahren, Durchläufe: ::1 microseconds::" - -#: success -msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" -msgstr "Enkodiere Schlüssel ::1 tomb key:: im Bild ::2 image file::" - -#: success -msgid "Tomb key encoded succesfully into image ::1 image file::" -msgstr "Grabschlüssel erfolgreich im Bild ::1 image file:: enkodiert" - -#: success -msgid "Key succesfully exhumed to ::1 key::." -msgstr "Schlüssel erfolgreich exhumiert in ::1 key::." - -#: success -msgid "Rendering a printable QRCode for key: ::1 tomb key file::" -msgstr "Rendern eines ausdruckbaren QRCodes für Schlüssel: ::1 tomb key file::" - -#: success -msgid "Operation successful:" -msgstr "Operation erfolgreich:" - -#: success -msgid "Creating a new tomb in ::1 tomb path::" -msgstr "Erstelle ein neues Grab in ::1 tomb path::" - -#: success -msgid "Done digging ::1 tomb name::" -msgstr "Fertig mit ausgraben ::1 tomb name::" - -#: success -msgid "Choose the password of your key: ::1 tomb key::" -msgstr "Wählen Sie das Passwort von ihrem Schlüssel: ::1 tomb key::" - -#: success -msgid "Your key is ready:" -msgstr "Ihr Schlüssel ist bereit:" - -#: success -msgid "Locking ::1 tomb file:: with ::2 tomb key file::" -msgstr "Schliesse ::1 tomb file:: ab mit ::2 tomb key file::" - -#: success -msgid "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" -msgstr "Ihr Grab ist bereit in ::1 tomb path::und gesichert mit dem Schlüssel ::2 tomb key::" - -#: success -msgid "Changing lock on tomb ::1 tomb name::" -msgstr "Wechsle Schloss am Grab ::1 tomb name::" - -#: success -msgid "Succesfully changed key for tomb: ::1 tomb file::" -msgstr "Schlüssel Erfolgreich gewechselt für das Grab: : ::1 tomb file::" - -#: success -msgid "Opening ::1 tomb file:: on ::2 mount point::" -msgstr "Öffne ::1 tomb file:: auf ::2 mount point::" - -#: success -msgid "Success unlocking tomb ::1 tomb name::" -msgstr "Entsperren erfolgreich von ::1 tomb name::" - -#: success -msgid "Success opening ::1 tomb file:: on ::2 mount point::" -msgstr "Erfolgreiches Öffnen von ::1 tomb file:: auf ::2 mount point::" - -#: success -msgid "Post hooks found, executing as user ::1 user name::." -msgstr "Post Hooks gefunden, ausführen als Benutzer ::1 user name::." - -#: success -msgid "Creating and updating search indexes." -msgstr "Kreieren und aktualisieren von Suchindexen" - -#: message -msgid "Generating a new swish-e configuration file: ::1 swish conf::" -msgstr "Kreieren einer neuen swish-e Konfigurationsdatei: ::1 swish conf::" - -#: success -msgid "Searching for: ::1::" -msgstr "Suchen nach: ::1::" - -#: success -msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" -msgstr "Abruptes Schließen von ::1 tomb name:: eingehangen in ::2 mount point:: " - -#: success -msgid "Slamming tomb: killing all processes using this hook." -msgstr "Abruptes Schließen des Grabes: Beenden aller Prozesse die diesen Hook benutzen." +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. } +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. > _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#: tomb:2742 +msgid "Command \"::1 subcommand::\" not recognized." +msgstr "Der Befehl \"::1 subcommand::\" wurde nicht erkannt." -#: success -msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." -msgstr "Grab ::1 tomb name:: geschlossen: Ihre Knochen werden in Frieden ruhen." +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. > _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#. return $? +#: tomb:2743 +msgid "Try -h for help." +msgstr "Versuchen Sie -h um Hilfe zu erhalten." -#: warning -msgid "Pinentry error: ::1 error::" -msgstr "Pinentry Fehler: ::1 error::" +#~ msgid " -o mount options used to open (default: rw,noatime,nodev)" +#~ msgstr " -o Mount Optionen beim Öffnen (Standart: rw,noatime,nodev)" -#: warning -msgid "Empty password" -msgstr "Leeres Passwort" +#~ msgid " Copyright (C) 2007-2014 Dyne.org Foundation, License GNU GPL v3+" +#~ msgstr " Urheberrecht (C) 2007-2014 Dyne.org Foundation, Lizens GNU GPL v3+" diff --git a/extras/po/es.po b/extras/po/es.po @@ -1,1130 +1,5499 @@ msgid "" msgstr "" +"Project-Id-Version: Tomb the Crypto Undertaker\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: POEditor.com\n" -"Project-Id-Version: Tomb the Crypto Undertaker\n" -"Language: es\n" - -#: failure -msgid "Operation aborted." -msgstr "Operación abortada." - -#: warning -msgid "often occurs on VPS and kernels that don't provide the loop module." -msgstr "ocurre frecuentemente en VPS y kernels que no proveen el módulo 'loop'." - -#: warning -msgid "It is impossible to use Tomb on this machine at this conditions." -msgstr "Es imposible usar Tomb en esta máquina en estas condiciones." - -#: message -msgid "Waiting for the key to be piped from stdin... " -msgstr "Esperando a recibir la llave a través de stdin... " - -#: failure -msgid "This operation requires a key file to be specified using the -k option." -msgstr "Esta operación requiere que se especifique una llave con la opción -k." - -#: failure -msgid "Key not found, specify one using -k." -msgstr "Llave no encontrada, especifica una usando -k." - -#: warning -msgid "User aborted password dialog." -msgstr "El usuario ha abortado el diálogo de contraseña." - -#: message -msgid "Password OK." -msgstr "Contraseña OK." - -#: failure -msgid "Error: the newly generated keyfile does not seem valid." -msgstr "Error: la llave recién generada no parece válida." - -#: failure -msgid "User aborted." -msgstr "El usuario ha abortado." - -#: failure -msgid "You set empty password, which is not possible." -msgstr "Has elegido una contraseña vacía, lo que no es posible." - -#: failure -msgid "Wrong argument for --kdf: must be an integer number (iteration seconds)." -msgstr "Argumento incorrecto para --kdf: debe ser un número entero (segundos por iteración)." - -#: failure -msgid "gpg (GnuPG) is not found, Tomb cannot function without it." -msgstr "No se encuentra gpg (GnuPG), Tomb no puede funcionar sin ello." - -#: message -msgid "Please confirm the key password for the encoding" -msgstr "Por favor, confirma la contraseña de la clave para la codificación" - -#: warning -msgid "Wrong password supplied." -msgstr "Contraseña incorrecta." - -#: failure -msgid "You shall not bury a key whose password is unknown to you." -msgstr "No deberías enterrar una clave cuya contraseña desconoces." - -#: warning -msgid "Encoding error: steghide reports problems." -msgstr "Error en la codficación: steghide reporta problemas." - -#: warning -msgid "Make explicit use of --force to overwrite." -msgstr "Usa --force para sobreescribir." - -#: warning -msgid "Use of --force selected: overwriting." -msgstr "Usando --force: sobreescribiendo." -#: failure -msgid "A filename needs to be specified using -k to forge a new key." -msgstr "Es necesario especificar un nombre de fichero usando -k para forgar una llave nueva." - -#: failure -msgid "Forging this key would overwrite an existing file. Operation aborted." -msgstr "Forjar esta llave sobreescribiría un fichero existente. Operación abortada." - -#: message -msgid "This operation takes time, keep using this computer on other tasks," -msgstr "Esta operación necesita tiempo, sigue usando el ordenador en otras tareas," - -#: message -msgid "once done you will be asked to choose a password for your tomb." -msgstr "cuando termine se te pedirá que elijas una contraseña para tu tumba." - -#: message -msgid "To make it faster you can move the mouse around." -msgstr "Para acelerarlo puedes mover el ratón por la pantalla." - -#: message -msgid "If you are on a server, you can use an Entropy Generation Daemon." -msgstr "Si estás en un servidor, puede usar un Entropy Generation Daemon." - -#: warning -msgid "Cannot generate encryption key." -msgstr "No se puede generar la llave de encriptación." - -#: message -msgid "(You can also change it later using 'tomb passwd'.)" -msgstr "(También puedes cambiarla más tarde usando 'tomb passwd'.)" - -#: warning -msgid "The key does not seem to be valid." -msgstr "Parece que la llave no es válida." - -#: warning -msgid "Dumping contents to screen:" -msgstr "Volcando contenido en la pantalla:" - -#: failure -msgid "Size argument missing, use -s" -msgstr "Falta el argumento de tamaño, usa -s" - -#: warning -msgid "A tomb exists already. I'm not digging here:" -msgstr "Ya existe una tumba. No voy a cavar aquí:" - -#: message -msgid "Your tomb is not yet ready, you need to forge a key and lock it:" -msgstr "Tu tumba no está lista todavía, tienes que forjar una llave y asegurarla:" - -#: warning -msgid "No tomb specified for locking." -msgstr "No se ha especificado una tumba que asegurar." - -#: warning -msgid "Usage: tomb lock file.tomb file.tomb.key" -msgstr "Uso: tomb lock file.tomb file.tomb.key" - -#: failure -msgid "There is no tomb here. You have to it dig first." -msgstr "No hay una tumba aquí. Tienes que cavarla primero." - -#: message -msgid "Checking if the tomb is empty (we never step on somebody else's bones)." -msgstr "Comprobando que la tumba esté vacía (no queremos pisar los huesos de alguien más)." - -#: warning -msgid "The tomb was already locked with another key." -msgstr "La tumba ya estaba asegurada con otra llave." - -#: failure -msgid "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." -msgstr "Operación abortada. No puedo asegurar una tumba que ya tiene un candado. Cava una nueva." - -#: message -msgid "Fine, this tomb seems empty." -msgstr "Bien, esta tumba parece vacía." - -#: message -msgid "Formatting Luks mapped device." -msgstr "Formateando dispositivo mapeado con Luks." - -#: warning -msgid "cryptsetup luksFormat returned an error." -msgstr "cryptsetup luksFormat ha devuelto un error." - -#: message -msgid "Formatting your Tomb with Ext3/Ext4 filesystem." -msgstr "Formateando tu tumba con el sistema de ficheros Ext3/Ext4." - -#: warning -msgid "Tomb format returned an error." -msgstr "El formateo de la tumba ha devuelto un error." - -#: message -msgid "Here below its status is reported:" -msgstr "Su estado se muestra a continuación:" - -#: message -msgid "This tomb is a valid LUKS encrypted device." -msgstr "Esta tumba es un dispositivo encriptado con LUKS válido." - -#: failure -msgid "Failure mounting the encrypted file." -msgstr "Fallo al montar el fichero encriptado." - -#: warning -msgid "How pitiful! A tomb, and no HOME." -msgstr "¡Que lamentable! Una tumba, y ningún HOGAR." - -#: warning -msgid "Cannot exec bind hooks without a mounted tomb." -msgstr "No se pueden ejecutar los bind-hooks sin una tumba montada." - -#: failure -msgid "I can't see any open tomb, may they all rest in peace." -msgstr "No puedo ver ninguna tumba abierta. Que todos descansen en paz." - -#: message -msgid "Search index updated." -msgstr "Índice de búsqueda actualizado." - -#: warning -msgid "Run 'tomb index' to create indexes." -msgstr "Corre 'tomb index' para crear los índices." - -#: message -msgid "Search completed." -msgstr "Búsqueda completada." - -#: failure -msgid "No tomb name specified for resizing." -msgstr "No se ha especificado el nombre de la tumba a la que cambiar el tamaño." - -#: failure -msgid "Size is not an integer." -msgstr "El tamaño no es un número entero." - -#: failure -msgid "The new size must be greater then old tomb size." -msgstr "El nuevo tamaño debe ser mayor que el viejo tamaño de la tumba." - -#: failure -msgid "There is no open tomb to be closed." -msgstr "No hay ninguna tumba abierta que cerrar." - -#: warning -msgid "Too many tombs mounted, please specify one (see tomb list)" -msgstr "Demasiadas tumbas abietas, por favor, especifica una (véase tomb list)" - -#: warning -msgid "or issue the command 'tomb close all' to close them all." -msgstr "o utiliza el comando 'tomb close all' para cerrarlas todas." - -#: warning -msgid "Please specify an existing tomb." -msgstr "Por favor, especifica una tumba existente." - -#: message -msgid "Kill all processes busy inside the tomb." -msgstr "Mata todos los procesos ocupados dentro de la tumba." - -#: warning -msgid "Tomb is busy, cannot umount!" -msgstr "La tumba está ocupada, ¡no se puede desmontar!" +#. Fold: Safety functions +#. Function: _whoami +#. +#. Code sample: +#. +#. # Set username from UID or environment +#. _USER=$SUDO_USER +#. [[ "$_USER" = "" ]] && { _USER=$USERNAME } +#. [[ "$_USER" = "" ]] && { _USER=$(id -u) } +#. [[ "$_USER" = "" ]] && { +#. > _failure "Failing to identify the user who is calling us" } +#. +#. # Get GID from option -G or the environment +#. option_is_set -G #. && _GID=$(option_value -G) || _GID=$(id -g $_USER) +#: tomb:189 +msgid "Failing to identify the user who is calling us" +msgstr "Falló la identificación del usuario que nos llama." -#: failure -msgid "Error parsing." -msgstr "Error al parsear." +#. Fold: Safety functions +#. Function: _plot +#. +#. Code sample: +#. TOMBFILE=$(basename $TOMBPATH) +#. +#. # The tomb name is TOMBFILE without an extension. +#. # It can start with dots: ..foo.tomb -> ..foo +#. TOMBNAME="${TOMBFILE%\.[^\.]*}" +#. [[ -z $TOMBNAME ]] && { +#. > _failure "Tomb won't work without a TOMBNAME." } +#. +#. # Normalize tomb name +#. TOMBFILE="$TOMBNAME.tomb" +#. +#: tomb:237 +msgid "Tomb won't work without a TOMBNAME." +msgstr "Tomb no funcionará sin un TOMBNAME (nombre de la tumba)." -#: warning -msgid "Some error occurred during option processing." -msgstr "Ha ocurrido algún error al procesar las opciones." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # Provide a random filename in shared memory +#. _tmp_create() { +#. [[ -d "$TMPPREFIX" ]] || { +#. # we create the tempdir with the sticky bit on +#. sudo mkdir -m 1777 "$TMPPREFIX" +#. > [[ $? == 0 ]] || _failure "Fatal error creating the temporary directory: ::1 temp dir::" "$TMPPREFIX" +#. } +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#: tomb:252 +msgid "Fatal error creating the temporary directory: ::1 temp dir::" +msgstr "Error fatal al crear el directorio temporal ::1 directorio::" -#: warning -msgid "The create command is deprecated, please use dig, forge and lock instead." -msgstr "El comando create está obsoleto, por favor, usa dig, forge y lock en su lugar." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#: tomb:260 +msgid "Fatal error setting the permission umask for temporary files" +msgstr "" +"Error fatal al establecer el permiso umask para los ficheros temporales" + +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. > _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#: tomb:263 +msgid "Someone is messing up with us trying to hijack temporary files." +msgstr "Alguien está intentando secuestrar nuestros ficheros temporales." -#: warning -msgid "For more informations see Tomb's manual page (man tomb)." -msgstr "Para más información mira el manual de Tomb (man tomb)." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#: tomb:267 +msgid "Fatal error creating a temporary file: ::1 temp file::" +msgstr "Error fatal al crear el fichero temporal ::1 fichero::" -#: message -msgid "Try -h for help." -msgstr "Prueba -h para obtener ayuda." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#. _verbose "Created tempfile: ::1 temp file::" "$tfile" +#. TOMBTMP="$tfile" +#. TOMBTMPFILES+=("$tfile") +#: tomb:270 +msgid "Fatal error setting ownership on temporary file: ::1 temp file::" +msgstr "" +"Error fatal al establecer la posesión del fichero temporal ::1 fichero::" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. r=1 +#. is_crypt=`sudo dmsetup status "$s" | awk '/crypt/ {print $3}'` +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. > _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#: tomb:316 +msgid "An active swap partition is detected..." +msgstr "" -#: failure -msgid "Tomb won't work without a TOMBNAME." -msgstr "Tomb no funcionará sin un TOMBNAME (nombre de la tumba)." +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. > _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#: tomb:318 +msgid "All your swaps are belong to crypt. Good." +msgstr "Todas tus particiones de intercambio pertenecen a crypt. Bien." -#: failure -msgid "Fatal error creating a temporary file: ::1 temp file::" -msgstr "Error fatal al crear el fichero temporal ::1 fichero::" +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. > _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#: tomb:320 +msgid "This poses a security risk." +msgstr "" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. > _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#: tomb:321 msgid "You can deactivate all swap partitions using the command:" -msgstr "Puedes desactivar todas las particiones swap usando el siguiente comando:" - -#: warning +msgstr "" +"Puedes desactivar todas las particiones swap usando el siguiente comando:" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. > _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#: tomb:322 msgid " swapoff -a" msgstr " swapoff -a" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. > _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#. } +#: tomb:323 msgid "But if you want to proceed like this, use the -f (force) flag." msgstr "Pero si deseas continuar tal cual, usa el flag -f (force)." -#: failure +#. Fold: Safety functions +#. Function: _check_swap +#. +#. Code sample: +#. _ensure_safe_swap +#. case $? in +#. 0|2) # No, or encrypted swap +#. return 0 +#. ;; +#. *) # Unencrypted swap +#. > _failure "Operation aborted." +#. ;; +#. esac +#. fi +#. } +#: tomb:342 +msgid "Operation aborted." +msgstr "Operación abortada." + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find pinentry-curses and no DISPLAY detected." +#. fi +#. +#. else # a DISPLAY is found to be active +#. +#: tomb:379 +msgid "Cannot find pinentry-curses and no DISPLAY detected." +msgstr "No se puede encontrar pinentry-curses, y no se ha detectado DISPLAY." + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. EOF` +#. +#. else +#. +#. if _is_found "pinentry-curses"; then +#. +#. > _warning "Detected DISPLAY, but only pinentry-curses is found." +#. output=`cat <<EOF | pinentry-curses +#. OPTION ttyname=$TTY +#. OPTION lc-ctype=$LANG +#. SETTITLE $title +#: tomb:432 +msgid "Detected DISPLAY, but only pinentry-curses is found." +msgstr "DISPLAY detectado, pero sólo se ha encontrado pinentry-curses." + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find any pinentry: impossible to ask for password." +#. fi +#. +#. fi +#. +#: tomb:442 +msgid "Cannot find any pinentry: impossible to ask for password." +msgstr "" +"No se ha encontrado ningún pinentry: es imposible pedir una contraseña." + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. fi # end of DISPLAY block +#. +#. # parse the pinentry output +#. for i in ${(f)output}; do +#. [[ "$i" =~ "^ERR.*" ]] && { +#. > _warning "Pinentry error: ::1 error::" ${i[(w)3]} +#. print "canceled" +#. return 1 } +#. +#. # here the password is found +#: tomb:452 +msgid "Pinentry error: ::1 error::" +msgstr "Error de pinentry: ::1 error::" + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. # here the password is found +#. [[ "$i" =~ "^D .*" ]] && password="${i##D }" +#. done +#. +#. [[ "$password" = "" ]] && { +#. > _warning "Empty password" +#. print "empty" +#. return 1 } +#. +#. print "$password" +#: tomb:461 +msgid "Empty password" +msgstr "Contraseña vacia" + +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Check if a filename is a valid tomb +#. is_valid_tomb() { +#. _verbose "is_valid_tomb ::1 tomb file::" $1 +#. +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. > _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#: tomb:477 msgid "Tomb file is missing from arguments." msgstr "La tumba falta en los argumentos." -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. > _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#: tomb:481 msgid "Tomb file not found: ::1 tomb file::" msgstr "No se ha encontrado la tumba: ::1 tumba::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. > _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#: tomb:483 msgid "Tomb file is not a regular file: ::1 tomb file::" msgstr "La tumba no es un fichero regular: ::1 tumba::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. > _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#: tomb:485 msgid "Tomb file is empty (zero length): ::1 tomb file::" msgstr "La tumba está vacía (longitud cero): ::1 tumba::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. > _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#: tomb:487 msgid "Tomb file is not writable: ::1 tomb file::" msgstr "No se puede escribir en la tumba: ::1 tumba::" -#: warning +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#. +#. # Tomb file may be a LUKS FS (or we are creating it) +#. [[ "`file $1`" =~ "luks encrypted file" ]] || { +#. > _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#: tomb:495 msgid "File is not yet a tomb: ::1 tomb file::" msgstr "El fichero no es una tumba todavía: ::1 tumba::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. > _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#: tomb:501 msgid "Tomb is currently in use: ::1 tomb name::" msgstr "La tumba ya está en uso: ::1 tumba::" -#: message +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. > _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:504 msgid "Valid tomb file found: ::1 tomb path::" msgstr "Se ha encontrado una tumba válida en ::1 ruta::" -#: warning +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. lo_mount() { +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. > _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#: tomb:516 msgid "Loop mount of volumes is not possible on this machine, this error" -msgstr "No hay soporte para el montaje en loop de volúmenes en esta máquina, este error" +msgstr "" +"No hay soporte para el montaje en loop de volúmenes en esta máquina, este " +"error" + +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. > _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#: tomb:517 +msgid "often occurs on VPS and kernels that don't provide the loop module." +msgstr "" +"ocurre frecuentemente en VPS y kernels que no proveen el módulo 'loop'." + +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. > _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#. sudo losetup -f "$tpath" # allocates the next loopback for our file +#: tomb:518 +msgid "It is impossible to use Tomb on this machine at this conditions." +msgstr "Es imposible usar Tomb en esta máquina en estas condiciones." -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # }}} +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. > _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#: tomb:558 msgid "Syntax: tomb [options] command [arguments]" msgstr "Sintaxis: tomb [opciones] comando [argumentos]" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. > _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#: tomb:560 msgid "Commands:" msgstr "Comandos:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. > _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#: tomb:562 msgid " // Creation:" msgstr "// Creación:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. > _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#: tomb:563 msgid " dig create a new empty TOMB file of size -s in MB" msgstr " dig crear una nueva TUMBA vacía de tamaño -s en MB" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. > _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#: tomb:564 msgid " forge create a new KEY file and set its password" msgstr " forge crear una nueva LLAVE y especificar su contraseña" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. > _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#: tomb:565 msgid " lock installs a lock on a TOMB to use it with KEY" msgstr " lock instala un candado en una TUMBA para usarlo con la LLAVE" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. > _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#: tomb:567 msgid " // Operations on tombs:" msgstr "// Operaciones en tumbas:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. > _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#: tomb:568 msgid " open open an existing TOMB" msgstr " open abrir una TUMBA existente" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. > _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#: tomb:569 msgid " index update the search indexes of tombs" msgstr " index actualiza los índices de búsqueda de las tumbas" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. > _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#: tomb:570 msgid " search looks for filenames matching text patterns" msgstr " search busca nombres de fichero que coincidan con patrones de texto" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. > _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#: tomb:571 msgid " list list of open TOMBs and information on them" msgstr " list lista de TUMBAs abiertas e información acerca de ellas" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. > _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#: tomb:572 msgid " close close a specific TOMB (or 'all')" msgstr " close cerrar una TUMBA específica o todas ('all')" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. > _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#: tomb:573 msgid " slam slam a TOMB killing all programs using it" -msgstr " slam cerrar una TUMBA de un portazo, matando todos los programas que la usan" - -#: print +msgstr "" +" slam cerrar una TUMBA de un portazo, matando todos los programas que la " +"usan" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. > _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#: tomb:575 msgid " resize resize a TOMB to a new size -s (can only grow)" -msgstr " resize cambia el tamaño de una TUMBA al tamaño -s (sólo puede aumentar)" - -#: print +msgstr "" +" resize cambia el tamaño de una TUMBA al tamaño -s (sólo puede aumentar)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. > _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#: tomb:578 msgid " // Operations on keys:" msgstr "// Operaciones en llaves:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. > _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#: tomb:579 +msgid " passwd change the password of a KEY (needs old pass)" +msgstr "" +" passwd cambia la contraseña de la LLAVE (necesita la contraseña vieja)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. > _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#: tomb:580 +msgid " setkey change the KEY locking a TOMB (needs old key and pass)" +msgstr "" +" setkey cambia la LLAVE que cierra la TUMBA (necesita la contraseña y llave " +"viejas)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. > _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#: tomb:583 +msgid " // Backup on paper:" +msgstr " // Copia de seguridad en papel:" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. > _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#: tomb:584 msgid " engrave makes a QR code of a KEY to be saved on paper" msgstr " engrave crea un código QR de una LLAVE para guardarla en papel" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. > _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#: tomb:588 +msgid " // Steganography:" +msgstr " // Esteganografía:" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. > _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#: tomb:589 +msgid " bury hide a KEY inside a JPEG image (for use with -k)" +msgstr "" +" bury esconde la LLAVE dentro de una imagen JPEG (para usarla con -k)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. > _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#: tomb:590 +msgid " exhume extract a KEY from a JPEG image (prints to stdout)" +msgstr " exhume extraer una LLAVE de una imagen JPEG (escribe en stdout)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. > _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#: tomb:593 msgid "Options:" msgstr "Opciones:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. > _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#: tomb:595 msgid " -s size of the tomb file when creating/resizing one (in MB)" msgstr " -s tamaño de la tumba al crearla o cambiar su tamaño (en MB)" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. > _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#: tomb:596 msgid " -k path to the key to be used ('-k -' to read from stdin)" msgstr " -k ruta a la llave a utilizar ('-k -' para leerla de stdin)" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. > _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#: tomb:597 msgid " -n don't process the hooks found in tomb" msgstr " -n no procesar los hooks encontrados en la tumba" -#: print -msgid " -o mount options used to open (default: rw,noatime,nodev)" -msgstr " -o opciones de montaje usadas al abrir (por defecto: rw,noatime,nodev)" +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. > _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#: tomb:598 +msgid " -o options passed to local command, e.g.:" +msgstr "" -#: print -msgid " -f force operation (i.e. even if swap is active)" -msgstr " -f forzar operación (incluso si la memoria de intercambio está activa)" +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. > _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#: tomb:599 +msgid " - mount options used to open (default: rw,noatime,nodev)" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. > _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#: tomb:600 +msgid " - an alternate cipher to forge and lock" +msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. > _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#: tomb:601 +msgid " -f force operation (i.e. even if swap is active)" +msgstr "" +" -f forzar operación (incluso si la memoria de intercambio está activa)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. > _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#: tomb:603 msgid " --kdf generate passwords armored against dictionary attacks" msgstr " --kdf generar contraseñas blindadas contra ataques de diccionario" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. > _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#: tomb:607 msgid " -h print this help" msgstr " -h imprimir este mensaje de ayuda" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. > _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#: tomb:608 msgid " -v print version, license and list of available ciphers" msgstr " -v imprimir versión, licencia y lista de cifrados disponibles" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. > _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#: tomb:609 msgid " -q run quietly without printing informations" msgstr " -q correr silenciosamente sin imprimir información" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. > _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#: tomb:610 msgid " -D print debugging information at runtime" msgstr " -D imprimir información de debugging al correr" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. > _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#: tomb:612 msgid "For more informations on Tomb read the manual: man tomb" msgstr "Para más información acerca de Tomb lee el manual: man tomb" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. > _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#. # Check whether a commandline option is set. +#: tomb:613 msgid "Please report bugs on <http://github.com/dyne/tomb/issues>." msgstr "Por favor, reporta los bugs en <http://github.com/dyne/tomb/issues>." -#: failure +#. Fold: Commandline interaction +#. Function: _ensure_dependencies +#. +#. Code sample: +#. # missing, bail out. +#. _ensure_dependencies() { +#. +#. # Check for required programs +#. for req in cryptsetup pinentry sudo gpg mkfs.ext4 e2fsck; do +#. command -v $req 1>/dev/null 2>/dev/null || { +#. > _failure "Missing required dependency ::1 command::. Please install it." $req } +#. done +#. +#. # Ensure system binaries are available in the PATH +#. path+=(/sbin /usr/sbin) # zsh magic +#: tomb:748 msgid "Missing required dependency ::1 command::. Please install it." msgstr "Falta la dependencia ::1 comando::. Por favor, instálala." -#: warning +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. > _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#: tomb:785 +msgid "cleartext key from stdin selected: this is unsafe." +msgstr "" +"se ha seleccionado una clave en texto plano por la entrada estándar: esto es " +"inseguro." + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. > exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#: tomb:786 +msgid "please use --unsafe if you really want to do this." +msgstr "por favor, usa --unsafe si estás seguro." + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. > _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. _warning "is_valid_key() called without an argument." +#: tomb:788 +msgid "received key in cleartext from stdin (unsafe mode)" +msgstr "" +"se ha recibido una clave en texto plano por la entrada estándar (modo " +"inseguro)" + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. > _warning "is_valid_key() called without an argument." +#. return 1 +#. } +#. +#. # If the key file is an image don't check file header +#: tomb:792 msgid "is_valid_key() called without an argument." msgstr "Se ha llamado a is_valid_key() sin argumento." -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. } +#. +#. # If the key file is an image don't check file header +#. [[ -r $TOMBKEYFILE ]] #. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] #. && { +#. > _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. _message "Key is valid." +#: tomb:800 msgid "Key is an image, it might be valid." msgstr "La llave es una imagen, puede que sea válida." -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] #. && { +#. _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. > _message "Key is valid." +#. return 0 } +#. +#. return 1 +#. } +#: tomb:804 msgid "Key is valid." msgstr "La llave es válida." -#: warning +#. Fold: Key operations +#. Function: _tomb_key_recover recover_key +#. +#. Code sample: +#. } +#. +#. # $1 is a string containing an encrypted key +#. _tomb_key_recover recover_key() { +#. local key="${1}" # Unique argument is an encrypted key +#. +#. > _warning "Attempting key recovery." +#. +#. _head="${key[(f)1]}" # take the first line +#. +#. TOMBKEY="" # Reset global variable +#: tomb:814 msgid "Attempting key recovery." msgstr "Intentando recuperar la llave." -#: warning -msgid "The key seems invalid or its format is not known by this version of Tomb." -msgstr "La llave parece inválida, o este formato no es reconocido por esta versión de Tomb." +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. # Set global variables TOMBKEY and TOMBKEYFILE. +#. _load_key() { +#. local keyfile="$1" # Unique argument is an optional keyfile +#. +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. > _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. _message "Waiting for the key to be piped from stdin... " +#: tomb:838 +msgid "This operation requires a key file to be specified using the -k option." +msgstr "Esta operación requiere que se especifique una llave con la opción -k." + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. > _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=stdin +#. TOMBKEY=$(cat) +#. elif [[ $keyfile == "cleartext" ]]; then +#. _verbose "load_key reading SECRET from stdin" +#: tomb:842 +msgid "Waiting for the key to be piped from stdin... " +msgstr "Esperando a recibir la llave a través de stdin... " + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=cleartext +#. TOMBKEY=cleartext +#. TOMBSECRET=$(cat) +#. else +#. _verbose "load_key argument: ::1 key file::" $keyfile +#. > [[ -r $keyfile ]] || _failure "Key not found, specify one using -k." +#. TOMBKEYFILE=$keyfile +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#: tomb:853 +msgid "Key not found, specify one using -k." +msgstr "Llave no encontrada, especifica una usando -k." -#: failure +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#. _verbose "load_key: ::1 key::" $TOMBKEYFILE +#. +#. is_valid_key $TOMBKEY || { +#. > _warning "The key seems invalid or its format is not known by this version of Tomb." +#. _tomb_key_recover $TOMBKEY +#. } +#. +#. # Declared TOMBKEYFILE (path) +#: tomb:861 +msgid "" +"The key seems invalid or its format is not known by this version of Tomb." +msgstr "" +"La llave parece inválida, o este formato no es reconocido por esta versión " +"de Tomb." + +#. Fold: Key operations +#. Function: get_lukskey +#. +#. Code sample: +#. _verbose "KDF salt: $kdf_salt" +#. _verbose "KDF ic: $kdf_ic" +#. _verbose "KDF len: $kdf_len" +#. _password=$(tomb-kdb-pbkdf2 $kdf_salt $kdf_ic $kdf_len 2>/dev/null <<<$_password) +#. ;; +#. *) +#. > _failure "No suitable program for KDF ::1 program::." $pbkdf_hash +#. unset _password +#. return 1 +#. ;; +#. esac +#: tomb:936 msgid "No suitable program for KDF ::1 program::." msgstr "No hay un programa apropiado para usar KDF: ::1 programa::" -#: failure +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. +#. # This function asks the user for the password to use the key it tests +#. # it against the return code of gpg on success returns 0 and saves +#. # the password in the global variable $TOMBPASSWORD +#. ask_key_password() { +#. [[ -z "$TOMBKEYFILE" ]] && { +#. > _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#: tomb:962 msgid "Internal error: ask_key_password() called before _load_key()." -msgstr "Error interno: se ha llamado a ask_key_password() antes de _load_key()." - -#: message +msgstr "" +"Error interno: se ha llamado a ask_key_password() antes de _load_key()." + +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#. +#. > _message "A password is required to use key ::1 key::" $TOMBKEYFILE +#. passok=0 +#. tombpass="" +#. if [[ "$1" = "" ]]; then +#. +#: tomb:968 msgid "A password is required to use key ::1 key::" msgstr "Es necesaria una contraseña para usar la llave ::1 llave::" -#: message +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. if [[ $c == 1 ]]; then +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE") +#. else +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE (attempt $c)") +#. fi +#. [[ $? = 0 ]] || { +#. > _warning "User aborted password dialog." +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#: tomb:980 +msgid "User aborted password dialog." +msgstr "El usuario ha abortado el diálogo de contraseña." + +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#. +#. [[ $? = 0 ]] && { +#. > passok=1; _message "Password OK." +#. break; +#. } +#. done +#. +#: tomb:987 +msgid "Password OK." +msgstr "Contraseña OK." + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. change_passwd() { +#. local tmpnewkey lukskey c tombpass tombpasstmp +#. +#. _check_swap # Ensure swap is secure, if any +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. > _message "Commanded to change password for tomb key ::1 key::" $TOMBKEYFILE +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. +#: tomb:1025 msgid "Commanded to change password for tomb key ::1 key::" msgstr "Se ha ordenado cambiar la contraseña de la llave ::1 llave::" -#: failure +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. local tomboldpwd="`option_value --tomb-old-pwd`" +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomboldpwd +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. > [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#: tomb:1037 msgid "No valid password supplied." msgstr "Contraseña incorrecta." -#: message +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#. +#. { option_is_set --tomb-pwd } && { +#: tomb:1039 +msgid "Changing password for ::1 key file::" +msgstr "Cambiando la contraseña para ::1 fichero::" + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. gen_key "$tombpwd" >> "$tmpnewkey" +#. } || { +#. gen_key >> "$tmpnewkey" +#. } +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. > _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. _success "Your passphrase was successfully updated." +#: tomb:1052 +msgid "Error: the newly generated keyfile does not seem valid." +msgstr "Error: la llave recién generada no parece válida." + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. > _success "Your passphrase was successfully updated." +#. +#. return 0 +#. } +#. +#: tomb:1056 +msgid "Your passphrase was successfully updated." +msgstr "Tu contraseña ha sido actualizada con éxito." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. +#. if [ "$1" = "" ]; then +#. while true; do +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. > _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. _failure "You set empty password, which is not possible." +#. fi +#: tomb:1078 +msgid "User aborted." +msgstr "El usuario ha abortado." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. > _failure "You set empty password, which is not possible." +#. fi +#. tombpasstmp=$tombpass +#. tombpass=`ask_password "Type the new password to secure your key (again)"` +#. if [[ $? != 0 ]]; then +#: tomb:1081 +msgid "You set empty password, which is not possible." +msgstr "Has elegido una contraseña vacía, lo que no es posible." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # see: https://github.com/dyne/Tomb/issues/82 +#. itertime="`option_value --kdf`" +#. # removing support of floating points because they can't be type checked well +#. if [[ "$itertime" != <-> ]]; then +#. unset tombpass +#. unset tombpasstmp +#. > _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#: tomb:1109 +msgid "" +"Wrong argument for --kdf: must be an integer number (iteration seconds)." +msgstr "" +"Argumento incorrecto para --kdf: debe ser un número entero (segundos por " +"iteración)." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. unset tombpasstmp +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. > _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#: tomb:1114 +msgid "Using KDF, iterations: ::1 microseconds::" +msgstr "Usando KDF: ::1 microsegundos:: iteraciones" + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. > _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#: tomb:1115 msgid "generating salt" msgstr "generando salt" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. > _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#: tomb:1117 msgid "calculating iterations" msgstr "calculando iteraciones" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. > _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#. +#. header="_KDF_pbkdf2sha1_${pbkdf2_salt}_${pbkdf2_iter}_64\n" +#: tomb:1119 msgid "encoding the password" msgstr "codificando la contraseña" -#: warning +#. Fold: Key operations +#. Function: list_gnupg_ciphers +#. +#. Code sample: +#. unset tombpasstmp +#. } +#. +#. # prints an array of ciphers available in gnupg (to encrypt keys) +#. list_gnupg_ciphers() { +#. # prints an error if GnuPG is not found +#. > which gpg 2>/dev/null || _failure "gpg (GnuPG) is not found, Tomb cannot function without it." +#. +#. ciphers=(`gpg --version | awk ' +#. BEGIN { ciphers=0 } +#. /^Cipher:/ { gsub(/,/,""); sub(/^Cipher:/,""); print; ciphers=1; next } +#: tomb:1150 +msgid "gpg (GnuPG) is not found, Tomb cannot function without it." +msgstr "No se encuentra gpg (GnuPG), Tomb no puede funcionar sin ello." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEY +#. +#. imagefile=$PARAM +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. > _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#: tomb:1171 msgid "Encode failed: ::1 image file:: is not a jpeg image." msgstr "La codificación falló: ::1 fichero:: no es una imagen jpeg." -#: failure +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. > _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#: tomb:1175 +msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" +msgstr "Codificando la llave ::1 llave:: en la imagen ::2 imagen::." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. > _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#. # by Tomb, but its not strictly necessary (and having different +#: tomb:1176 +msgid "Please confirm the key password for the encoding" +msgstr "Por favor, confirma la contraseña de la clave para la codificación" + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpwd +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. > _warning "Wrong password supplied." +#. _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#: tomb:1192 +msgid "Wrong password supplied." +msgstr "Contraseña incorrecta." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. _warning "Wrong password supplied." +#. > _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#. print - "$TOMBKEY" | awk ' +#: tomb:1193 +msgid "You shall not bury a key whose password is unknown to you." +msgstr "No deberías enterrar una clave cuya contraseña desconoces." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. /^-----/ {next} +#. /^Version/ {next} +#. {print $0}' #. | steghide embed --embedfile - --coverfile ${imagefile} #. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. > _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#: tomb:1204 +msgid "Encoding error: steghide reports problems." +msgstr "Error en la codficación: steghide reporta problemas." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. | steghide embed --embedfile - --coverfile ${imagefile} #. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. > _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#. fi +#. +#. return $res +#: tomb:1207 +msgid "Tomb key encoded succesfully into image ::1 image file::" +msgstr "Llave codificada con éxito en la imagen ::1 fichero::." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # mandatory 1st arg: the image file where key is supposed to be +#. # optional 2nd arg: the password to use (same as key, internal use) +#. # optional 3rd arg: the key where to save the result (- for stdout) +#. exhume_key() { +#. [[ "$1" = "" ]] && { +#. > _failure "Exhume failed, no image specified" } +#. +#. local imagefile="$1" # The image file where to look for the key +#. local tombpass="$2" # (Optional) the password to use (internal use) +#. local destkey="$3" # (Optional) the key file where to save the +#: tomb:1219 +msgid "Exhume failed, no image specified" +msgstr "La exhumación ha fallado, no se ha especificado una imagen" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local destkey="$3" # (Optional) the key file where to save the +#. # result (- for stdout) +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. > _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#: tomb:1229 msgid "Exhume failed, image file not found: ::1 image file::" msgstr "La exhumación ha fallado, no se ha encontrado la imagen: ::1 imagen::" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. > _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#: tomb:1231 msgid "Exhume failed: ::1 image file:: is not a jpeg image." msgstr "La exhumación falló: ::1 imagen:: no es una imagen jpeg." -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#. TOMBKEY=$(steghide extract -sf $imagefile -p $tombpass -xf -) +#. [[ $? != 0 ]] && { +#. > _failure "Wrong password or no steganographic key found" } +#. +#. recover_key $TOMBKEY +#. +#. return 0 +#: tomb:1238 msgid "Wrong password or no steganographic key found" msgstr "Contraseña incorrecta o no se ha econtrando una clave esteganográfica" -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. } +#. +#. # Ensure we have a valid destination for the key +#. [[ -z $destkey ]] && { option_is_set -k } && destkey=$(option_value -k) +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. > _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#: tomb:1249 msgid "printing exhumed key on stdout" msgstr "mostrando llave exhumada en stdout" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. > _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#: tomb:1253 msgid "File exists: ::1 tomb key::" msgstr "El fichero existe: ::1 clave::" -#: failure -msgid "Refusing to overwrite file. Operation aborted." -msgstr "Crear esta tumba sobreescribiría un fichero existente. Operación abortada." +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. > _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#: tomb:1255 +msgid "Use of --force selected: overwriting." +msgstr "Usando --force: sobreescribiendo." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. > _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#: tomb:1258 +msgid "Make explicit use of --force to overwrite." +msgstr "Usa --force para sobreescribir." -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. > _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#: tomb:1259 +msgid "Refusing to overwrite file. Operation aborted." +msgstr "" +"Crear esta tumba sobreescribiría un fichero existente. Operación abortada." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. > _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#. tombpass=$(option_value --tomb-pwd) +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpass +#. } || { +#: tomb:1262 msgid "Trying to exhume a key out of image ::1 image file::" msgstr "Intentando exhumar una llave de la imagen ::1 fichero::" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. steghide extract -sf $imagefile -p ${tombpass} -xf $destkey +#. r=$? +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. > _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#: tomb:1283 +msgid "Key succesfully exhumed to ::1 key::." +msgstr "Llave exhumada con éxito en ::1 llave::." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. > _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#. return $r +#. } +#: tomb:1285 msgid "Nothing found in ::1 image file::" msgstr "No se ha encontrado nada en ::1 fichero::" -#: failure +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. local keyname=$(basename $TOMBKEYFILE) +#. local pngname="$keyname.qr.png" +#. +#. > _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#: tomb:1300 +msgid "Rendering a printable QRCode for key: ::1 tomb key file::" +msgstr "Creando un código QR imprimible para la llave ::1 fichero::." + +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. > _failure "QREncode reported an error." } +#. +#. _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#: tomb:1305 msgid "QREncode reported an error." msgstr "QREncode ha reportado un error." -#: message +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. _failure "QREncode reported an error." } +#. +#. > _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#. file $pngname +#. } +#: tomb:1307 +msgid "Operation successful:" +msgstr "Operación con éxito:" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. dig_tomb() { +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. > _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#: tomb:1340 msgid "Commanded to dig tomb ::1 tomb path::" msgstr "Se ha ordenado cavar la tubma ::1 ruta::" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. > [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#: tomb:1342 msgid "Missing path to tomb" msgstr "Falta la ruta de la tumba" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. > [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#: tomb:1343 +msgid "Size argument missing, use -s" +msgstr "Falta el argumento de tamaño, usa -s" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. > [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#: tomb:1344 msgid "Size must be an integer (megabytes)" msgstr "El tamaño debe ser un número entero (megabytes)" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. > [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#: tomb:1345 msgid "Tombs can't be smaller than 10 megabytes" msgstr "Las tumbas no pueden ser menores de 10 megabytes" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#. > _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#: tomb:1350 +msgid "A tomb exists already. I'm not digging here:" +msgstr "Ya existe una tumba. No voy a cavar aquí:" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ -e $TOMBPATH ]] && { +#. _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. > _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#: tomb:1355 +msgid "Creating a new tomb in ::1 tomb path::" +msgstr "Creando una nueva tumba en ::1 tumba::" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. > _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#: tomb:1357 msgid "Generating ::1 tomb file:: of ::2 size::MiB" msgstr "Generando ::1 tumba:: de ::2 size::MiB" -#: warning +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#. > _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. chmod 0600 $TOMBPATH +#. +#: tomb:1362 msgid "Error creating the tomb ::1 tomb path::" msgstr "Error al crear la tumba ::1 ruta de la tumba::" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. > _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#: tomb:1377 +msgid "Done digging ::1 tomb name::" +msgstr "Se ha terminado de cavar ::1 tumba::." + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. > _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#: tomb:1378 +msgid "Your tomb is not yet ready, you need to forge a key and lock it:" +msgstr "" +"Tu tumba no está lista todavía, tienes que forjar una llave y asegurarla:" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. > _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#: tomb:1379 msgid "tomb forge ::1 tomb path::.key" msgstr "tomb forge ::1 ruta::.key" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. > _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:1380 msgid "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" msgstr "tomb lock ::1 ruta:: -k ::1 ruta::.key" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. local destkey="$1" +#. { option_is_set -k } && { destkey=$(option_value -k) } +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. > _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#: tomb:1401 +msgid "A filename needs to be specified using -k to forge a new key." +msgstr "" +"Es necesario especificar un nombre de fichero usando -k para forgar una " +"llave nueva." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. > _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#. +#. # Ensure GnuPG won't exit with an error before first run +#: tomb:1403 msgid "Commanded to forge key ::1 key::" msgstr "Se ha ordenado forjar la llave ::1 llave::" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. mkdir -m 0700 $HOME/.gnupg +#. touch $HOME/.gnupg/pubring.gpg } +#. +#. # Do not overwrite any files accidentally +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. > _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#: tomb:1415 +msgid "Forging this key would overwrite an existing file. Operation aborted." +msgstr "" +"Forjar esta llave sobreescribiría un fichero existente. Operación abortada." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. > _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#: tomb:1419 +msgid "Cannot generate encryption key." +msgstr "No se puede generar la llave de encriptación." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && algo=$algopt +#. +#. > _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#: tomb:1427 msgid "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" -msgstr "Se ha ordenado forjar la llave ::1 llave:: con el algoritmo de cifrado ::2 algoritmo::" +msgstr "" +"Se ha ordenado forjar la llave ::1 llave:: con el algoritmo de cifrado ::2 " +"algoritmo::" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. > _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#: tomb:1432 +msgid "This operation takes time, keep using this computer on other tasks," +msgstr "" +"Esta operación necesita tiempo, sigue usando el ordenador en otras tareas," + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. > _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#: tomb:1433 +msgid "once done you will be asked to choose a password for your tomb." +msgstr "cuando termine se te pedirá que elijas una contraseña para tu tumba." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. > _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#: tomb:1434 +msgid "To make it faster you can move the mouse around." +msgstr "Para acelerarlo puedes mover el ratón por la pantalla." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. > _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#. { option_is_set --use-urandom } && random_source=/dev/urandom +#: tomb:1435 +msgid "If you are on a server, you can use an Entropy Generation Daemon." +msgstr "Si estás en un servidor, puede usar un Entropy Generation Daemon." -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. > _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#: tomb:1449 +msgid "Choose the password of your key: ::1 tomb key::" +msgstr "Elige una contraseña para tu llave: ::1 llave::" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. > _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#. # the gen_key() function takes care of the new key's encryption +#: tomb:1450 +msgid "(You can also change it later using 'tomb passwd'.)" +msgstr "(También puedes cambiarla más tarde usando 'tomb passwd'.)" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. > _warning "The key does not seem to be valid." +#. _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#: tomb:1468 +msgid "The key does not seem to be valid." +msgstr "Parece que la llave no es válida." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. _warning "The key does not seem to be valid." +#. > _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#: tomb:1469 +msgid "Dumping contents to screen:" +msgstr "Volcando contenido en la pantalla:" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. > _message "Done forging ::1 key file::" $TOMBKEYFILE +#. _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#: tomb:1477 msgid "Done forging ::1 key file::" msgstr "Se ha terminado de forjar ::1 llave::" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. _message "Done forging ::1 key file::" $TOMBKEYFILE +#. > _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#. # Step three -- Lock tomb +#: tomb:1478 +msgid "Your key is ready:" +msgstr "Tu llave está lista:" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. # for more alternatives refer to cryptsetup(8) +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. > _warning "No tomb specified for locking." +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#: tomb:1498 +msgid "No tomb specified for locking." +msgstr "No se ha especificado una tumba que asegurar." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. _warning "No tomb specified for locking." +#. > _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#: tomb:1499 +msgid "Usage: tomb lock file.tomb file.tomb.key" +msgstr "Uso: tomb lock file.tomb file.tomb.key" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#. +#. > _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. _failure "There is no tomb here. You have to dig it first." } +#. +#: tomb:1505 msgid "Commanded to lock tomb ::1 tomb file::" msgstr "Se ha ordenado asegurar la tumba ::1 tumba::" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _plot $tombpath +#. +#. _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. > _failure "There is no tomb here. You have to dig it first." } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. lo_mount $TOMBPATH +#: tomb:1508 +msgid "There is no tomb here. You have to dig it first." +msgstr "No hay una tumba aquí. Tienes que cavarla primero." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. > _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#: tomb:1517 +msgid "Checking if the tomb is empty (we never step on somebody else's bones)." +msgstr "" +"Comprobando que la tumba esté vacía (no queremos pisar los huesos de alguien " +"más)." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. > _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#: tomb:1521 +msgid "The tomb was already locked with another key." +msgstr "La tumba ya estaba asegurada con otra llave." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. > _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#. +#: tomb:1522 +msgid "" +"Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +msgstr "" +"Operación abortada. No puedo asegurar una tumba que ya tiene un candado. " +"Cava una nueva." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. > _message "Fine, this tomb seems empty." +#. fi +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#: tomb:1524 +msgid "Fine, this tomb seems empty." +msgstr "Bien, esta tumba parece vacía." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. # the encryption cipher for a tomb can be set when locking using -c +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && cipher=$algopt +#. > _message "Locking using cipher: ::1 cipher::" $cipher +#. +#. # get the pass from the user and check it +#. if option_is_set --tomb-pwd; then +#. tomb_pwd="`option_value --tomb-pwd`" +#: tomb:1532 msgid "Locking using cipher: ::1 cipher::" msgstr "Asegurando usando el cifrado: ::1::" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password "$tomb_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #: tomb:1544 +msgid "Locking ::1 tomb file:: with ::2 tomb key file::" +msgstr "Asegurando ::1 tumba:: con ::2 llave::" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. > _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#: tomb:1546 +msgid "Formatting Luks mapped device." +msgstr "Formateando dispositivo mapeado con Luks." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#: tomb:1551 +msgid "cryptsetup luksFormat returned an error." +msgstr "cryptsetup luksFormat ha devuelto un error." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#: tomb:1556 msgid "cryptsetup luksOpen returned an error." msgstr "cryptsetup luksOpen ha devuelto un error." -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. > _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#: tomb:1559 +msgid "Formatting your Tomb with Ext3/Ext4 filesystem." +msgstr "Formateando tu tumba con el sistema de ficheros Ext3/Ext4." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. > _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#: tomb:1563 +msgid "Tomb format returned an error." +msgstr "El formateo de la tumba ha devuelto un error." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#. > _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#: tomb:1564 msgid "Your tomb ::1 tomb file:: may be corrupted." msgstr "Puede que tu tumba ::1 tumba:: esté corrupta." -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. > _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" #. $TOMBPATH $TOMBKEYFILE +#. +#. } +#: tomb:1569 msgid "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" msgstr "Se ha terminado de asegurar ::1 tumba:: usando Luks dm-crypt ::2::" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. > _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" #. $TOMBPATH $TOMBKEYFILE +#. +#. } +#. +#: tomb:1570 +msgid "" +"Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" +msgstr "" +"Tu tumba está lista en ::1 tumba:: y asegurada con la llave ::2 llave::" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. # This function changes the key that locks a tomb +#. change_tomb_key() { +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. > _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#: tomb:1580 msgid "Commanded to reset key for tomb ::1 tomb path::" msgstr "Se ha ordenado resetear la llave para la tumba ::1 ruta::" -#: warning +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. > _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#: tomb:1583 msgid "Command 'setkey' needs two arguments: the old key file and the tomb." -msgstr "El comando 'setkey' necesita dos argumentos: la vieja llave y la tumba." - -#: warning +msgstr "" +"El comando 'setkey' necesita dos argumentos: la vieja llave y la tumba." + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. > _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#. _check_swap +#: tomb:1584 msgid "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" msgstr "Por ejemplo: tomb -k new.tomb.key old.tomb.key secret.tomb" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. > _failure "Execution aborted." +#. } +#. +#. _check_swap +#. is_valid_tomb $tombpath +#: tomb:1585 msgid "Execution aborted." msgstr "Ejecución abortada." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. sudo cryptsetup isLuks ${nstloop} +#. # is it a LUKS encrypted nest? we check one more time +#. [[ $? == 0 ]] || { +#. > _failure "Not a valid LUKS encrypted volume: ::1 volume::" $TOMBPATH } +#. +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#: tomb:1596 msgid "Not a valid LUKS encrypted volume: ::1 volume::" msgstr "No es un volumen LUKS encriptado válido: ::1 volumen::" -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. > _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#: tomb:1604 +msgid "Changing lock on tomb ::1 tomb name::" +msgstr "Cambiando el candado en la tumba ::1 tumba::." + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. > _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#. # save date of mount in minutes since 1970 +#: tomb:1605 msgid "Old key: ::1 old key::" msgstr "Llave vieja: ::1 Llave::" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomb_old_pwd +#. ask_key_password "$tomb_old_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #: tomb:1621 msgid "No valid password supplied for the old key." msgstr "No se ha proporcionado una contraseña válida para la vieja llave." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksOpen ${nstloop} ${mapper} +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. _message "New key: ::1 key file::" $TOMBKEYFILE +#: tomb:1627 msgid "Unexpected error in luksOpen." msgstr "Error inesperado en luksOpen." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksOpen ${nstloop} ${mapper} +#. [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. > _message "New key: ::1 key file::" $TOMBKEYFILE +#. +#. if option_is_set --tomb-pwd; then +#. tomb_new_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#: tomb:1631 msgid "New key: ::1 key file::" msgstr "Nueva llave: ::1 fichero::" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#. ask_key_password "$tomb_new_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the new key." } +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#: tomb:1641 msgid "No valid password supplied for the new key." msgstr "No se ha proporcionado una contraseña válida para la nueva llave." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#: tomb:1650 msgid "Unexpected error in luksChangeKey." msgstr "Error inesperado en luksChangeKey." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. > sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#: tomb:1652 msgid "Unexpected error in luksClose." msgstr "Error inesperado en luksClose." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. > _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#: tomb:1654 +msgid "Succesfully changed key for tomb: ::1 tomb file::" +msgstr "Se ha cambiado la clave con éxito para la tumba ::1 tumba::" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. > _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#. +#: tomb:1655 msgid "The new key is: ::1 new key::" msgstr "La nueva llave es: ::1 llave::" -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # {{{ Open +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. > [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#: tomb:1667 msgid "No tomb name specified for opening." msgstr "No se ha especificado el nombre de la tumba a abrir." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. > _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#: tomb:1669 msgid "Commanded to open tomb ::1 tomb name::" msgstr "Se ha ordenado abrir la tumba ::1 tumba::" -#: warning +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#. # check file type (if its a Luks fs) +#. [[ "`file $TOMBPATH`" =~ "luks encrypted file" ]] || { +#. > _warning "::1 tomb file:: is not a valid tomb file" $TOMBFILE +#. _failure "Operation aborted." +#. } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#: tomb:1676 msgid "::1 tomb file:: is not a valid tomb file" msgstr "::1 fichero:: no es un fichero de tumba válido" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. > _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#: tomb:1686 msgid "Mountpoint not specified, using default: ::1 mount point::" -msgstr "Punto de montaje no especificado, utilizando estándar: ::1 punto de montaje::" - -#: warning +msgstr "" +"Punto de montaje no especificado, utilizando estándar: ::1 punto de montaje::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. > _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#: tomb:1690 msgid "::1 tomb name:: is already open." msgstr "::1 tumba:: ya está abierta." -#: failure -msgid "::1 tomb file:: is not a valid Luks encrypted storage file." -msgstr "::1 tumba:: no es un fichero encriptado con LUKS válido." +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. > _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#: tomb:1691 +msgid "Here below its status is reported:" +msgstr "Su estado se muestra a continuación:" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. > _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#: tomb:1695 +msgid "Opening ::1 tomb file:: on ::2 mount point::" +msgstr "Abriendo ::1 tumba:: en ::2 punto de montaje::." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. > _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#: tomb:1702 +msgid "::1 tomb file:: is not a valid Luks encrypted storage file." +msgstr "::1 tumba:: no es un fichero encriptado con LUKS válido." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. > _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#: tomb:1704 +msgid "This tomb is a valid LUKS encrypted device." +msgstr "Esta tumba es un dispositivo encriptado con LUKS válido." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#. /^Cipher mode/ {print $3} +#. /^Hash spec/ {print $3}'`) +#. > _message "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" $tombdump[1] $tombdump[2] $tombdump[3] +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#: tomb:1711 +msgid "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" +msgstr "" +"El cifrado es \"::1 cifrado::\" en modo \"::2 modo::\" y hash \"::3 hash::\"" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#. /^Key slot.*ENABLED/ { if(zero==1) print "WARN" }'` +#. [[ "$slotwarn" == "WARN" ]] && { +#. > _warning "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." } +#. +#. # save date of mount in minutes since 1970 +#. mapdate=`date +%s` +#. +#: tomb:1718 +msgid "" +"Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." +msgstr "" +"Hay múltiples rarunas para la llave en esta tumba. Cuidado: puede haber una " +"puerta trasera." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. ask_key_password +#. } +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} +#. [[ $? = 0 ]] || { +#. > _failure "Failure mounting the encrypted file." } +#. +#. # preserve the loopdev after exit +#. lo_preserve "$nstloop" +#. +#: tomb:1742 +msgid "Failure mounting the encrypted file." +msgstr "Fallo al montar el fichero encriptado." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # array: [ cipher, keysize, loopdevice ] +#. tombstat=(`sudo cryptsetup status ${mapper} | awk ' +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. > _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#: tomb:1752 +msgid "Success unlocking tomb ::1 tomb name::" +msgstr "Se ha abierto el cerrojo de ::1 tumba:: con éxito." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. > _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#. _verbose "Tomb engraved as ::1 tomb name::" $TOMBNAME +#. sudo tune2fs -L $TOMBNAME /dev/mapper/${mapper} > /dev/null +#. +#: tomb:1755 +msgid "Checking filesystem via ::1::" +msgstr "Comprobando el sistema de ficheros a través de ::1::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # TODO: safety check MOUNTOPTS +#. # safe_mount_options && #. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. > _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#: tomb:1773 +msgid "Error mounting ::1 mapper:: on ::2 tombmount::" +msgstr "" -#: message -msgid "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" -msgstr "El cifrado es \"::1 cifrado::\" en modo \"::2 modo::\" y hash \"::3 hash::\"" +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. # safe_mount_options && #. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. > _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#: tomb:1775 +msgid "Are mount options '::1 mount options::' valid?" +msgstr "" -#: warning -msgid "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." -msgstr "Hay múltiples rarunas para la llave en esta tumba. Cuidado: puede haber una puerta trasera." +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#. > _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#: tomb:1780 +msgid "Cannot mount ::1 tomb name::" +msgstr "" -#: message -msgid "Checking filesystem via ::1::" -msgstr "Comprobando el sistema de ficheros a través de ::1::" +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#. +#. > _success "Success opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. local tombtty tombhost tombuid tombuser +#. +#. # print out when was opened the last time, by whom and where +#: tomb:1786 +msgid "Success opening ::1 tomb file:: on ::2 mount point::" +msgstr "Se ha abierto ::1 tumba:: en ::2 punto de montaje:: con éxito." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombuid=$(_cat ${tombmount}/.uid | tr -d ' ') +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. > _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#: tomb:1800 msgid "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" -msgstr "Última visita de ::1 usuario::(::2 versión de tomb::) desde ::3 tty:: en ::4 host::" - -#: message +msgstr "" +"Última visita de ::1 usuario::(::2 versión de tomb::) desde ::3 tty:: en ::4 " +"host::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. > _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#. print $_UID > ${tombmount}/.uid +#: tomb:1801 msgid "on date ::1 date::" msgstr "el ::1 fecha::" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. +#. # Default mount options are overridden with the -o switch +#. [[ -n ${(k)OPTS[-o]} ]] && MOUNTOPTS=${OPTS[-o]} +#. +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. > _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. _warning "Cannot exec bind hooks without a mounted tomb." +#: tomb:1849 +msgid "How pitiful! A tomb, and no HOME." +msgstr "¡Que lamentable! Una tumba, y ningún HOGAR." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. > _warning "Cannot exec bind hooks without a mounted tomb." +#. return 1 } +#. +#. [[ -r "$mnt/bind-hooks" ]] || { +#. _verbose "bind-hooks not found in ::1 mount point::" $mnt +#: tomb:1853 +msgid "Cannot exec bind hooks without a mounted tomb." +msgstr "No se pueden ejecutar los bind-hooks sin una tumba montada." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # better parsing for bind hooks checks for two separated words on +#. # each line, using zsh word separator array subscript +#. _bindhooks="${mapfile[${mnt}/bind-hooks]}" +#. for h in ${(f)_bindhooks}; do +#. s="${h[(w)1]}" +#. d="${h[(w)2]}" +#. > [[ "$s" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. [[ "$d" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. maps+=($s $d) +#. _verbose "bind-hook found: $s -> $d" +#. done +#: tomb:1869 msgid "bind-hooks file is broken" msgstr "El fichero de bind-hooks está roto." -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. _verbose "bind-hook found: $s -> $d" +#. done +#. unset _bindhooks +#. +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#: tomb:1878 msgid "bind-hooks map format: local/to/tomb local/to/$HOME" msgstr "Formato de mapeo de los bind-hooks: local/to/tomb local/to/$HOME" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#: tomb:1882 msgid "bind-hooks map format: local/to/tomb local/to/$HOME. Rolling back" -msgstr "Formato de mapeo de los bind-hooks: local/to/tomb local/to/HOME. Restaurando" - -#: warning +msgstr "" +"Formato de mapeo de los bind-hooks: local/to/tomb local/to/HOME. Restaurando" + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. > _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} #: tomb:1887 msgid "bind-hook target not existent, skipping ::1 home::/::2 subdir::" -msgstr "No existe un objetivo para el bind-hook, omitiendo ::1 hogar::/::2 directorio::" - -#: warning -msgid "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" -msgstr "No se ha encontrado la fuente para el bind-hook en la tumba, omitiendo ::1 punto de montaje::/::2 directorio::" - -#: failure +msgstr "" +"No existe un objetivo para el bind-hook, omitiendo ::1 hogar::/::2 " +"directorio::" + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. > _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} #. && mounted+=("$HOME/${maps[$dir]}") +#. fi +#: tomb:1889 +msgid "" +"bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" +msgstr "" +"No se ha encontrado la fuente para el bind-hook en la tumba, omitiendo ::1 " +"punto de montaje::/::2 directorio::" + +#. Fold: Open +#. Function: exec_safe_post_hooks +#. +#. Code sample: +#. # Only run if post-hooks has the executable bit set +#. [[ -x $mnt/post-hooks ]] || return +#. +#. # If the file starts with a shebang, run it. +#. cat $mnt/post-hooks | head -n1 | grep '^#!\s*/' &> /dev/null +#. [[ $? == 0 ]] && { +#. > _success "Post hooks found, executing as user ::1 user name::." $USERNAME +#. $mnt/post-hooks $act $mnt +#. } +#. } +#. +#: tomb:1917 +msgid "Post hooks found, executing as user ::1 user name::." +msgstr "" +"Se han encontrado post-hooks, se ejecutarán con el usuario ::1 usuario::." + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. local tombname tombmount tombfs tombfsopts tombloop +#. local ts tombtot tombused tombavail tombpercent tombp tombsince +#. local tombtty tombhost tombuid tombuser +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "I can't see any ::1 status:: tomb, may they all rest in peace." ${1:-open} } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:1936 msgid "I can't see any ::1 status:: tomb, may they all rest in peace." msgstr "No puedo ver ninguna tumba ::1 estado::. Que todos descansen en paz." -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. tombuser="${ee[(ws@:@)1]}" } +#. done +#. } +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. > _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#: tomb:1969 msgid "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" -msgstr "Se ha abierto ::1 nombre:: en ::2 punto de montaje:: usando ::3 opciones::" - -#: message +msgstr "" +"Se ha abierto ::1 nombre:: en ::2 punto de montaje:: usando ::3 opciones::" + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. > _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#: tomb:1972 msgid "::1 tombname:: open since ::2 tombsince::" msgstr "::1 nombre:: abierto desde ::2 cuando::" -#: message -msgid "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. > _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #: tomb:1975 +msgid "" +"::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" msgstr "::1 nombre:: abierto por ::2 usuario:: desde ::3 tty:: en ::4 host::" -#: message -msgid "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " -msgstr "::1 nombre:: de tamaño ::2 total:: del que ::3 usado:: (::5 porcentaje::%) se usa y ::4 disponible:: está libre " - -#: warning +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. > _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#: tomb:1979 +msgid "" +"::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::" +"%) is used: ::4 tombavail:: free " +msgstr "" +"::1 nombre:: de tamaño ::2 total:: del que ::3 usado:: (::5 porcentaje::%) " +"se usa y ::4 disponible:: está libre " + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. > _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#: tomb:1983 msgid "::1 tombname:: warning: your tomb is almost full!" msgstr "Advertencia: ¡tu tumba (::1 nombre::) está casi llena!" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#. for h in ${mounted_hooks}; do +#. > _message "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" #. $tombname "`basename ${h[(ws:;:)1]}`" ${h[(ws:;:)2]} +#. done +#. done +#. } +#: tomb:1989 msgid "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" msgstr "::1 tumba:: englaza ::2 hook:: en ::3 destino::" -#: failure +#. Fold: List +#. Function: list_tomb_binds +#. +#. Code sample: +#. # list_tomb_binds +#. # print out an array of mounted bind hooks (internal use) +#. # format is semi-colon separated list of attributes +#. # needs an argument: name of tomb whose hooks belong +#. list_tomb_binds() { +#. [[ -z "$1" ]] && { +#. > _failure "Internal error: list_tomb_binds called without argument." } +#. +#. # list bind hooks on util-linux 2.20 (Debian 7) +#. mount -l #. | awk -vtomb="$1" ' +#: tomb:2044 msgid "Internal error: list_tomb_binds called without argument." msgstr "Error interno: se ha llamado a list_tomb_binds sin argumento." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # {{{ Index and search +#. +#. # index files in all tombs for search +#. # $1 is optional, to specify a tomb +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. > _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#: tomb:2076 msgid "Cannot index tombs on this system: updatedb (mlocate) not installed." -msgstr "No se pueden indexar la tumbas en este sistema: updatedb (mlocate) no está instalado." - -#: warning +msgstr "" +"No se pueden indexar la tumbas en este sistema: updatedb (mlocate) no está " +"instalado." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. > _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#: tomb:2080 msgid "Cannot use GNU findutils for index/search commands." msgstr "No se puede usar GNU findutils para los comandos index/search." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. > _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#: tomb:2082 msgid "Index command needs 'mlocate' to be installed." msgstr "El comando index necesita que 'mlocate' esté instalado." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. > _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#: tomb:2090 msgid "There seems to be no open tomb engraved as [::1::]" msgstr "Parece que existe una tumba con el grabado [::1::]" -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. > _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#: tomb:2092 +msgid "I can't see any open tomb, may they all rest in peace." +msgstr "No puedo ver ninguna tumba abierta. Que todos descansen en paz." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#. { command -v unoconv 1>/dev/null 2>/dev/null } && { +#. unoconv -l 2>/dev/null & +#: tomb:2094 +msgid "Creating and updating search indexes." +msgstr "Creando y actualizando índices de búsqueda." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. > _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#: tomb:2107 msgid "Skipping ::1 tomb name:: (.noindex found)." msgstr "Omitiendo ::1 tumba:: (se ha econtrado .noindex)." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. > _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#: tomb:2109 msgid "Indexing ::1 tomb name:: filenames..." msgstr "Indexando los nombre de fichero de ::1 tumba::..." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. > _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#: tomb:2114 msgid "Indexing ::1 tomb name:: contents..." msgstr "Indexando el contenido de ::1 tumba::..." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. > _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#. DefaultContents TXT* +#. IndexDir $tombmount +#: tomb:2116 +msgid "Generating a new swish-e configuration file: ::1 swish conf::" +msgstr "Generando un nuevo fichero de configuración de swish-e: ::1 conf::" + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. } +#. +#. swish-e -c ${tombmount}/.swishrc -S fs -v3 +#. +#. } +#. +#. > _message "Search index updated." +#. done +#. } +#. search_tombs() { +#. { command -v locate 1>/dev/null 2>/dev/null } || { +#: tomb:2190 +msgid "Search index updated." +msgstr "Índice de búsqueda actualizado." + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Searching for: ::1::" ${(f)@} +#. for t in ${mounted_tombs}; do +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:2210 +msgid "Searching for: ::1::" +msgstr "Buscando ::1::" + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. > _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#: tomb:2218 msgid "Searching filenames in tomb ::1 tomb name::" msgstr "Buscando nombres de fichero en la tumba ::1 tumba::" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. > _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#: tomb:2220 msgid "Matches found: ::1 matches::" msgstr "Se han encontrado coindicencias: ::1::" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. > _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#: tomb:2225 msgid "Searching contents in tomb ::1 tomb name::" msgstr "Buscando contenido en la tumba ::1 tumba::" -#: warning +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. > _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#: tomb:2228 msgid "Skipping tomb ::1 tomb name::: not indexed." msgstr "Omitiendo tumba ::1 tomb name::: no se ha indexado." -#: message -msgid "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." -msgstr "Se ha ordenado cambiar el tamaño de la tumba ::1 tumba:: a ::2 tamaño:: megabytes." +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. > _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#. +#: tomb:2229 +msgid "Run 'tomb index' to create indexes." +msgstr "Corre 'tomb index' para crear los índices." + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. > _message "Search completed." +#. } +#. +#. # }}} - Index and search +#. +#: tomb:2231 +msgid "Search completed." +msgstr "Búsqueda completada." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # {{{ Resize +#. +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. > _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#: tomb:2242 +msgid "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." +msgstr "" +"Se ha ordenado cambiar el tamaño de la tumba ::1 tumba:: a ::2 tamaño:: " +"megabytes." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. > [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#: tomb:2244 +msgid "No tomb name specified for resizing." +msgstr "" +"No se ha especificado el nombre de la tumba a la que cambiar el tamaño." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. > [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. _failure "Aborting operations: new size was not specified, use -s" } +#: tomb:2245 msgid "Cannot find ::1::" msgstr "No se puede encontrar ::1::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. > _failure "Aborting operations: new size was not specified, use -s" } +#. +#. is_valid_tomb $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#: tomb:2249 msgid "Aborting operations: new size was not specified, use -s" msgstr "Abortando operaciones: no se ha especificado un nuevo tamaño, usa -s" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. local oldtombsize=$(( `stat -c %s "$TOMBPATH" 2>/dev/null` / 1048576 )) +#. local mounted_tomb=`mount -l | +#. awk -vtomb="[$TOMBNAME]" '/^\/dev\/mapper\/tomb/ { if($7==tomb) print $1 }'` +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. > _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#: tomb:2261 msgid "Please close the tomb ::1 tomb name:: before trying to resize it." msgstr "Por favor, cierra la tumba ::1 nombre:: antes de cambiar su tamaño." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. > _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#: tomb:2264 msgid "You must specify the new size of ::1 tomb name::" msgstr "Debes especificar el nuevo tamaño de ::1 tumba::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. > [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. _failure "The new size must be greater then old tomb size." } +#. +#: tomb:2266 +msgid "Size is not an integer." +msgstr "El tamaño no es un número entero." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. > _failure "The new size must be greater then old tomb size." } +#. +#. delta="$(( $newtombsize - $oldtombsize ))" +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#: tomb:2269 +msgid "The new size must be greater then old tomb size." +msgstr "El nuevo tamaño debe ser mayor que el viejo tamaño de la tumba." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#. +#. _verbose "Data dump using ::1:: from /dev/urandom" ${DD[1]} +#. ${=DD} if=/dev/urandom bs=1048576 count=${delta} >> $TOMBPATH +#. +#. [[ $? == 0 ]] || { +#. > _failure "Error creating the extra resize ::1 size::, operation aborted." $tmp_resize } +#. +#. { option_is_set --tomb-pwd } && { +#. tomb_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_pwd +#: tomb:2279 msgid "Error creating the extra resize ::1 size::, operation aborted." msgstr "Error al crear el espacio extra ::1 tamaño::, operación abortada." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. mapper="tomb.$TOMBNAME.$mapdate.$(basename $nstloop)" +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} || { +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. > _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#: tomb:2300 msgid "cryptsetup failed to resize ::1 mapper::" msgstr "cryptsetup ha fallado al cambiar el tamaño de ::1 mapper::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. > _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#: tomb:2303 msgid "e2fsck failed to check ::1 mapper::" msgstr "e2fsck ha fallado al comprobar ::1::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. > _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#. # close and free the loop device +#. sudo cryptsetup luksClose "${mapper}" +#. +#: tomb:2306 msgid "resize2fs failed to resize ::1 mapper::" msgstr "resize2fs ha fallado al cambiar el tamaño de ::1::" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts`) +#. else +#. mounted_tombs=(`list_tomb_mounts $1`) +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#: tomb:2330 +msgid "There is no open tomb to be closed." +msgstr "No hay ninguna tumba abierta que cerrar." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. > _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#: tomb:2333 +msgid "Too many tombs mounted, please specify one (see tomb list)" +msgstr "Demasiadas tumbas abietas, por favor, especifica una (véase tomb list)" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. > _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#: tomb:2334 +msgid "or issue the command 'tomb close all' to close them all." +msgstr "o utiliza el comando 'tomb close all' para cerrarlas todas." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. > _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#: tomb:2350 msgid "Tomb not found: ::1 tomb file::" msgstr "No se ha encontrado la tumba: ::1 tumba::" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. > _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #: tomb:2351 +msgid "Please specify an existing tomb." +msgstr "Por favor, especifica una tumba existente." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#: tomb:2355 +msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" +msgstr "" +"Cerrando de un portazo la tumba ::1 nombre:: montada en ::2 punto de " +"montaje::." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. > _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #: tomb:2357 +msgid "Kill all processes busy inside the tomb." +msgstr "Mata todos los procesos ocupados dentro de la tumba." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. > _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount } +#. +#: tomb:2359 msgid "Cannot slam the tomb ::1 tomb name::" msgstr "No se puede cerrar de un portazo la tumba ::1 tumba::" -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. > _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount } +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#: tomb:2361 msgid "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" msgstr "Cerrando la tumba ::1 tumba:: montada en ::2 punto de montaje::" -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. > _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#: tomb:2369 msgid "Closing tomb bind hook: ::1 hook::" msgstr "Cerrando el bind-hook: ::1::" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#: tomb:2372 +msgid "Slamming tomb: killing all processes using this hook." +msgstr "" +"Cerrando tumba de un portazo: matando todos los procesos que usan este hook." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. > _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#: tomb:2375 msgid "Cannot slam the bind hook ::1 hook::" msgstr "No se puede cerrar de un portazo el bind-hook ::1::" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. > _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#. done +#. +#. # Execute post-hooks for eventual cleanup +#: tomb:2378 msgid "Tomb bind hook ::1 hook:: is busy, cannot close tomb." msgstr "El bind-hook ::1:: está ocupado, no se puede cerrar la tumba." -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. # Execute post-hooks for eventual cleanup +#. { option_is_set -n } || { +#. exec_safe_post_hooks ${tombmount%%/} close } +#. +#. _verbose "Performing umount of ::1 mount point::" $tombmount +#. sudo umount ${tombmount} +#. > [[ $? = 0 ]] || { _warning "Tomb is busy, cannot umount!"; return 1 } +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#: tomb:2388 +msgid "Tomb is busy, cannot umount!" +msgstr "La tumba está ocupada, ¡no se puede desmontar!" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#. sudo cryptsetup luksClose $mapper +#. [[ $? == 0 ]] || { +#. > _failure "Error occurred in cryptsetup luksClose ::1 mapper::" $mapper } +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#: tomb:2395 msgid "Error occurred in cryptsetup luksClose ::1 mapper::" msgstr "Ha ocurrido un error en cryptsetup luksClose ::1::" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#. _verbose "/dev/$tombloop was already closed." } +#. +#. > _success "Tomb ::1 tomb name:: closed: your bones will rest in peace." $tombname +#. +#. done # loop across mounted tombs +#. +#. return 0 +#: tomb:2402 +msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." +msgstr "Tumba ::1 tumba:: cerrada: tu huesos descansarán en paz." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. return 1 +#. fi +#. return 0 +#. fi +#. unset discardme +#. if ! zparseopts -M -E -D -Adiscardme ${every_opts}; then +#. > _failure "Error parsing." +#. return 127 +#. fi +#. unset discardme +#. subcommand=$1 +#: tomb:2522 +msgid "Error parsing." +msgstr "Error al parsear." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. subcommand=$1 +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. > _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#: tomb:2532 msgid "There's no such command \"::1 subcommand::\"." msgstr "No existe el comando \"::1 comando::\"." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. > exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#. +#: tomb:2533 msgid "Please try -h for help." msgstr "Prueba -h para obtener ayuda." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # zsh magic: ${=string} will split to multiple arguments when spaces occur +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. > _warning "Some error occurred during option processing." +#. exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#: tomb:2545 +msgid "Some error occurred during option processing." +msgstr "Ha ocurrido algún error al procesar las opciones." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. _warning "Some error occurred during option processing." +#. > exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#. ok=0 +#: tomb:2546 msgid "See \"tomb help\" for more info." msgstr "Véase \"tomb help\" par más información." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. for arg in $*; do +#. if [[ $arg == '--' || $arg == '-' ]]; then +#. ok=1 +#. continue #it shouldnt be appended to PARAM +#. elif [[ $arg[1] == '-' ]]; then +#. if [[ $ok == 0 ]]; then +#. > exitv=127 _failure "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" $arg $subcommand +#. fi +#. fi +#. PARAM+=$arg +#. done +#: tomb:2558 msgid "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" -msgstr "No se reconoce la opción ::1 argumento:: para el subcomando ::2 subcomando::" +msgstr "" +"No se reconoce la opción ::1 argumento:: para el subcomando ::2 subcomando::" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Use colors unless told not to +#. { ! option_is_set --no-color } && { autoload -Uz colors && colors } +#. # Some options are only available during insecure mode +#. { ! option_is_set --unsafe } && { +#. for opt in --tomb-pwd --use-urandom --tomb-old-pwd; do +#. { option_is_set $opt } && { +#. > exitv=127 _failure "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\nIf you really want so, add --unsafe" $opt } +#. done +#. } +#. # read -t or --tmp flags to set a custom temporary directory +#. option_is_set --tmp && TMPPREFIX=$(option_value --tmp) +#: tomb:2574 +msgid "" +"You specified option ::1 option::, which is DANGEROUS and should only be " +"used for testing\n" +"If you really want so, add --unsafe" +msgstr "" +"Has especificado la opción ::1 opción::, que es PELIGROSA y debería usarse " +"sólo en testeo\n" +"Si estás seguro, añade --unsafe" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. help) +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. > _warning "The create command is deprecated, please use dig, forge and lock instead." +#. _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#: tomb:2608 +msgid "" +"The create command is deprecated, please use dig, forge and lock instead." +msgstr "" +"El comando create está obsoleto, por favor, usa dig, forge y lock en su " +"lugar." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. _warning "The create command is deprecated, please use dig, forge and lock instead." +#. > _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#. # CREATE Step 1: dig -s NN file.tomb +#: tomb:2609 +msgid "For more informations see Tomb's manual page (man tomb)." +msgstr "Para más información mira el manual de Tomb (man tomb)." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. umount_tomb $PARAM[1] +#. ;; +#. +#. # Grow tomb's size +#. resize) +#. [[ $RESIZER == 0 ]] && { +#. > _failure "Resize2fs not installed: cannot resize tombs." } +#. resize_tomb $PARAM[1] +#. ;; +#. +#. ## Contents manipulation +#: tomb:2643 msgid "Resize2fs not installed: cannot resize tombs." -msgstr "Resize2fs no está instalado: no se puede cambiar el tamaño de las tumbas." - -#: failure +msgstr "" +"Resize2fs no está instalado: no se puede cambiar el tamaño de las tumbas." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. ## Locking operations +#. +#. # Export key to QR Code +#. engrave) +#. [[ $QRENCODE == 0 ]] && { +#. > _failure "QREncode not installed: cannot engrave keys on paper." } +#. engrave_key ${=PARAM} +#. ;; +#. +#. # Change password on existing key +#: tomb:2669 msgid "QREncode not installed: cannot engrave keys on paper." msgstr "QREncode no está instalado: no se pueden grabar las llave en papel." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. change_tomb_key ${=PARAM} +#. ;; +#. +#. # STEGANOGRAPHY: hide key inside an image +#. bury) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot bury keys into images." } +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#: tomb:2686 msgid "Steghide not installed: cannot bury keys into images." -msgstr "Steghide no está instalado: no se pueden enterrar llaves en las imágenes." - -#: failure +msgstr "" +"Steghide no está instalado: no se pueden enterrar llaves en las imágenes." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#. exhume) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot exhume keys from images." } +#. exhume_key $PARAM[1] +#. ;; +#. +#. ## Internal commands useful to developers +#: tomb:2693 msgid "Steghide not installed: cannot exhume keys from images." -msgstr "Setghide no está instalado: no se pueden exhumar llaves de las imágenes." - -#: print +msgstr "" +"Setghide no está instalado: no se pueden exhumar llaves de las imágenes." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Ask user for a password interactively +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. > _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#: tomb:2707 msgid "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" msgstr "Tomb ::1 versión:: - un enterrador fuerte y amable para tus secretos" -#: print -msgid " Copyright (C) 2007-2014 Dyne.org Foundation, License GNU GPL v3+" -msgstr " Copyright (C) 2007-2014 Fundación Dyne.org, Licencia GNU GPL v3+" +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. > _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#: tomb:2709 +msgid " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. > _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#: tomb:2710 msgid " This is free software: you are free to change and redistribute it" msgstr " Esto es software libre: eres libre de modificarlo y redistribuirlo" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. > _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#: tomb:2711 +msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" +msgstr "" +" Para encontrar el código fuente más reciente visita <http://dyne.org/" +"software/tomb>" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. > _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#: tomb:2716 msgid " This source code is distributed in the hope that it will be useful," msgstr " Este código fuente se distribuye con la esperanza de que sea util," -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. > _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#: tomb:2717 msgid " but WITHOUT ANY WARRANTY; without even the implied warranty of" msgstr " pero SIN NINGUNA GARANTÍA; ni siquiera la garantía tácita de" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. > _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#: tomb:2718 msgid " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." msgstr " MERCANTIBILIDAD or APTITUD PARA UN PROPÓSITO PARTICULAR." -#: print -msgid "System utils:" -msgstr "Utilidades del sistema:" - -#: warning -msgid "Command \"::1 subcommand::\" not recognized." -msgstr "No se ha reconocido el commando \"::1 comando::\"." - -#: print -msgid " passwd change the password of a KEY (needs old pass)" -msgstr " passwd cambia la contraseña de la LLAVE (necesita la contraseña vieja)" - -#: print -msgid " setkey change the KEY locking a TOMB (needs old key and pass)" -msgstr " setkey cambia la LLAVE que cierra la TUMBA (necesita la contraseña y llave viejas)" - -#: print -msgid " // Backup on paper:" -msgstr " // Copia de seguridad en papel:" - -#: print -msgid " // Steganography:" -msgstr " // Esteganografía:" - -#: print -msgid " bury hide a KEY inside a JPEG image (for use with -k)" -msgstr " bury esconde la LLAVE dentro de una imagen JPEG (para usarla con -k)" - -#: print -msgid " exhume extract a KEY from a JPEG image (prints to stdout)" -msgstr " exhume extraer una LLAVE de una imagen JPEG (escribe en stdout)" - -#: failure -msgid "Exhume failed, no image specified" -msgstr "La exhumación ha fallado, no se ha especificado una imagen" - -#: print -msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" -msgstr " Para encontrar el código fuente más reciente visita <http://dyne.org/software/tomb>" - -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. > _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#. _print "\000" +#. cat <<EOF +#: tomb:2720 msgid " When in need please refer to <http://dyne.org/support>." msgstr " Cuando sea necesario por favor dirígete a <http://dyne.org/support>." -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. > _print "System utils:" +#. _print "\000" +#. cat <<EOF +#. `sudo -V | head -n1` +#. `cryptsetup --version` +#: tomb:2722 +msgid "System utils:" +msgstr "Utilidades del sistema:" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. `cryptsetup --version` +#. `pinentry --version` +#. `gpg --version | head -n1` - key forging algorithms (GnuPG symmetric ciphers): +#. `list_gnupg_ciphers` +#. EOF +#. _print "\000" +#. > _print "Optional utils:" +#. _print "\000" +#. _list_optional_tools version +#. return 0 +#. } +#: tomb:2732 msgid "Optional utils:" msgstr "Utilidades opcionales:" -#: failure -msgid "Fatal error setting the permission umask for temporary files" -msgstr "Error fatal al establecer el permiso umask para los ficheros temporales" - -#: failure -msgid "Fatal error setting ownership on temporary file: ::1 temp file::" -msgstr "Error fatal al establecer la posesión del fichero temporal ::1 fichero::" - -#: warning -msgid "cleartext key from stdin selected: this is unsafe." -msgstr "se ha seleccionado una clave en texto plano por la entrada estándar: esto es inseguro." - -#: failure -msgid "please use --unsafe if you really want to do this." -msgstr "por favor, usa --unsafe si estás seguro." - -#: warning -msgid "received key in cleartext from stdin (unsafe mode)" -msgstr "se ha recibido una clave en texto plano por la entrada estándar (modo inseguro)" - -#: failure -msgid "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\n" -"If you really want so, add --unsafe" -msgstr "Has especificado la opción ::1 opción::, que es PELIGROSA y debería usarse sólo en testeo\nSi estás seguro, añade --unsafe" - -#: failure -msgid "Failing to identify the user who is calling us" -msgstr "Falló la identificación del usuario que nos llama." - -#: failure -msgid "Fatal error creating the temporary directory: ::1 temp dir::" -msgstr "Error fatal al crear el directorio temporal ::1 directorio::" - -#: failure -msgid "Someone is messing up with us trying to hijack temporary files." -msgstr "Alguien está intentando secuestrar nuestros ficheros temporales." - -#: success -msgid "All your swaps are belong to crypt. Good." -msgstr "Todas tus particiones de intercambio pertenecen a crypt. Bien." - -#: success -msgid "Changing password for ::1 key file::" -msgstr "Cambiando la contraseña para ::1 fichero::" - -#: success -msgid "Your passphrase was successfully updated." -msgstr "Tu contraseña ha sido actualizada con éxito." - -#: success -msgid "Using KDF, iterations: ::1 microseconds::" -msgstr "Usando KDF: ::1 microsegundos:: iteraciones" - -#: success -msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" -msgstr "Codificando la llave ::1 llave:: en la imagen ::2 imagen::." - -#: success -msgid "Tomb key encoded succesfully into image ::1 image file::" -msgstr "Llave codificada con éxito en la imagen ::1 fichero::." - -#: success -msgid "Key succesfully exhumed to ::1 key::." -msgstr "Llave exhumada con éxito en ::1 llave::." - -#: success -msgid "Rendering a printable QRCode for key: ::1 tomb key file::" -msgstr "Creando un código QR imprimible para la llave ::1 fichero::." - -#: success -msgid "Operation successful:" -msgstr "Operación con éxito:" - -#: success -msgid "Creating a new tomb in ::1 tomb path::" -msgstr "Creando una nueva tumba en ::1 tumba::" - -#: success -msgid "Done digging ::1 tomb name::" -msgstr "Se ha terminado de cavar ::1 tumba::." - -#: success -msgid "Choose the password of your key: ::1 tomb key::" -msgstr "Elige una contraseña para tu llave: ::1 llave::" - -#: success -msgid "Your key is ready:" -msgstr "Tu llave está lista:" - -#: success -msgid "Locking ::1 tomb file:: with ::2 tomb key file::" -msgstr "Asegurando ::1 tumba:: con ::2 llave::" - -#: success -msgid "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" -msgstr "Tu tumba está lista en ::1 tumba:: y asegurada con la llave ::2 llave::" - -#: success -msgid "Changing lock on tomb ::1 tomb name::" -msgstr "Cambiando el candado en la tumba ::1 tumba::." - -#: success -msgid "Succesfully changed key for tomb: ::1 tomb file::" -msgstr "Se ha cambiado la clave con éxito para la tumba ::1 tumba::" - -#: success -msgid "Opening ::1 tomb file:: on ::2 mount point::" -msgstr "Abriendo ::1 tumba:: en ::2 punto de montaje::." - -#: success -msgid "Success unlocking tomb ::1 tomb name::" -msgstr "Se ha abierto el cerrojo de ::1 tumba:: con éxito." - -#: success -msgid "Success opening ::1 tomb file:: on ::2 mount point::" -msgstr "Se ha abierto ::1 tumba:: en ::2 punto de montaje:: con éxito." - -#: success -msgid "Post hooks found, executing as user ::1 user name::." -msgstr "Se han encontrado post-hooks, se ejecutarán con el usuario ::1 usuario::." - -#: success -msgid "Creating and updating search indexes." -msgstr "Creando y actualizando índices de búsqueda." - -#: message -msgid "Generating a new swish-e configuration file: ::1 swish conf::" -msgstr "Generando un nuevo fichero de configuración de swish-e: ::1 conf::" - -#: success -msgid "Searching for: ::1::" -msgstr "Buscando ::1::" - -#: success -msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" -msgstr "Cerrando de un portazo la tumba ::1 nombre:: montada en ::2 punto de montaje::." - -#: success -msgid "Slamming tomb: killing all processes using this hook." -msgstr "Cerrando tumba de un portazo: matando todos los procesos que usan este hook." - -#: success -msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." -msgstr "Tumba ::1 tumba:: cerrada: tu huesos descansarán en paz." - -#: warning -msgid "Pinentry error: ::1 error::" -msgstr "Error de pinentry: ::1 error::" - -#: warning -msgid "Empty password" -msgstr "Contraseña vacia" - -#: failure -msgid "Cannot find pinentry-curses and no DISPLAY detected." -msgstr "No se puede encontrar pinentry-curses, y no se ha detectado DISPLAY." +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. } +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. > _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#: tomb:2742 +msgid "Command \"::1 subcommand::\" not recognized." +msgstr "No se ha reconocido el commando \"::1 comando::\"." -#: warning -msgid "Detected DISPLAY, but only pinentry-curses is found." -msgstr "DISPLAY detectado, pero sólo se ha encontrado pinentry-curses." +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. > _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#. return $? +#: tomb:2743 +msgid "Try -h for help." +msgstr "Prueba -h para obtener ayuda." -#: failure -msgid "Cannot find any pinentry: impossible to ask for password." -msgstr "No se ha encontrado ningún pinentry: es imposible pedir una contraseña." +#~ msgid " -o mount options used to open (default: rw,noatime,nodev)" +#~ msgstr "" +#~ " -o opciones de montaje usadas al abrir (por defecto: rw,noatime," +#~ "nodev)" +#~ msgid " Copyright (C) 2007-2014 Dyne.org Foundation, License GNU GPL v3+" +#~ msgstr " Copyright (C) 2007-2014 Fundación Dyne.org, Licencia GNU GPL v3+" diff --git a/extras/po/fr.po b/extras/po/fr.po @@ -1,1164 +1,5561 @@ msgid "" msgstr "" +"Project-Id-Version: Tomb the Crypto Undertaker\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: POEditor.com\n" -"Project-Id-Version: Tomb the Crypto Undertaker\n" -"Language: fr\n" - -#: failure -msgid "Operation aborted." -msgstr "L'opération est interrompue." - -#: warning -msgid "often occurs on VPS and kernels that don't provide the loop module." -msgstr "se produit souvent sur les machines virtuelles et avec les noyaux qui ne fournissent pas le module loop." - -#: warning -msgid "It is impossible to use Tomb on this machine at this conditions." -msgstr "Il est impossible d'utiliser Tomb dans les conditions offertes par cette machine." - -#: message -msgid "Waiting for the key to be piped from stdin... " -msgstr "En attente d'une clé à lire sur l'entrée standard... " - -#: failure -msgid "This operation requires a key file to be specified using the -k option." -msgstr "Cette opération requiert la spécification du chemin de la clé par l'option -k." - -#: failure -msgid "Key not found, specify one using -k." -msgstr "Aucune clé n'a été trouvée, merci d'en spécifier une avec -k." - -#: warning -msgid "User aborted password dialog." -msgstr "L'utilisateur a interrompu le dialogue du mot de passe." - -#: message -msgid "Password OK." -msgstr "Le mot de passe est valide." - -#: failure -msgid "Error: the newly generated keyfile does not seem valid." -msgstr "Erreur : le fichier de clé nouvellement créé semble invalide." - -#: failure -msgid "User aborted." -msgstr "L'utilisateur a interrompu l'opération." - -#: failure -msgid "You set empty password, which is not possible." -msgstr "Vous ne pouvez pas saisir un mot de passe vide." - -#: failure -msgid "Wrong argument for --kdf: must be an integer number (iteration seconds)." -msgstr "Argument invalide pour --kdf : ce doit être un nombre entier (de secondes d'itérations)." - -#: failure -msgid "gpg (GnuPG) is not found, Tomb cannot function without it." -msgstr "gpg (GnuPG) n'est pas disponible, mais il est requis pour le fonctionnement de Tomb." - -#: message -msgid "Please confirm the key password for the encoding" -msgstr "Merci de confirmer le mot de passe de la clé en vue de l'encodage" - -#: warning -msgid "Wrong password supplied." -msgstr "Le mot de passe fourni est invalide." - -#: failure -msgid "You shall not bury a key whose password is unknown to you." -msgstr "Vous ne pouvez pas enterrer une clé dont vous ignorez le mot de passe." - -#: warning -msgid "Encoding error: steghide reports problems." -msgstr "Erreur à l'encodage : steghide rapporte des problèmes." - -#: warning -msgid "Make explicit use of --force to overwrite." -msgstr "Pour l'ignorer et l'écrire de nouveau, utiliser --force." - -#: warning -msgid "Use of --force selected: overwriting." -msgstr "L'option --force est sélectionnée : ré-écriture en cours." - -#: failure -msgid "A filename needs to be specified using -k to forge a new key." -msgstr "Pour forger une nouvelle clé, vous devez préciser un nom de fichier avec -k." - -#: failure -msgid "Forging this key would overwrite an existing file. Operation aborted." -msgstr "Forger cette clé détruirait un fichier existant. Opération annulée." - -#: message -msgid "This operation takes time, keep using this computer on other tasks," -msgstr "Cette opération prend du temps, continuez à utiliser l'ordinateur pour d'autres tâches," - -#: message -msgid "once done you will be asked to choose a password for your tomb." -msgstr "une fois l'opération terminée, vous devrez choisir un mot de passe pour votre tombe." - -#: message -msgid "To make it faster you can move the mouse around." -msgstr "Vous pouvez accélérer l'opération en bougeant la souris." - -#: message -msgid "If you are on a server, you can use an Entropy Generation Daemon." -msgstr "Si vous effectuez l'opération sur un serveur, vous pouvez utiliser un démon générateur d'entropie." - -#: warning -msgid "Cannot generate encryption key." -msgstr "La clé de chiffrement ne peut être générée." - -#: message -msgid "(You can also change it later using 'tomb passwd'.)" -msgstr "(Vous pouvez le modifier ultérieurement avec la commande 'tomb passwd'.)" - -#: warning -msgid "The key does not seem to be valid." -msgstr "La clé semble être invalide." -#: warning -msgid "Dumping contents to screen:" -msgstr "Capture des contenus à l'écran :" - -#: failure -msgid "Size argument missing, use -s" -msgstr "Utiliser -s pour préciser la taille de la tombe en Mo." - -#: warning -msgid "A tomb exists already. I'm not digging here:" -msgstr "Une tombe existe déjà à cet endroit. Je n'y creuse pas !" - -#: message -msgid "Your tomb is not yet ready, you need to forge a key and lock it:" -msgstr "Votre tombe n'est pas encore prête, vous devez en forger la clé et la vérouiller :" - -#: warning -msgid "No tomb specified for locking." -msgstr "Quelle tombe dois-je vérouiller ?" - -#: warning -msgid "Usage: tomb lock file.tomb file.tomb.key" -msgstr "Usage : tomb lock file.tomb file.tomb.key" - -#: failure -msgid "There is no tomb here. You have to it dig first." -msgstr "Il n'y a pas de tombe à cet endroit. Vous devez d'abord la creuser ('dig')." - -#: message -msgid "Checking if the tomb is empty (we never step on somebody else's bones)." -msgstr "Sondage de la tombe (nous ne piétinons jamais les os d'autrui)." - -#: warning -msgid "The tomb was already locked with another key." -msgstr "La tombe est déjà vérouillée avec une autre clé." - -#: failure -msgid "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." -msgstr "Opération abandonnée. Je ne peux pas vérouiller une tombe déjà vérouillée. Vous pouvez en creuser une autre (avec 'dig')." - -#: message -msgid "Fine, this tomb seems empty." -msgstr "Bien, la tombe semble être vide." - -#: message -msgid "Formatting Luks mapped device." -msgstr "Formatage du dispositif LUKS désigné." - -#: warning -msgid "cryptsetup luksFormat returned an error." -msgstr "Une erreur s'est produite à l'exécution de cryptsetup luksFormat" - -#: message -msgid "Formatting your Tomb with Ext3/Ext4 filesystem." -msgstr "Formatage de votre tombe avec un système de fichier Ext3/Ext4." - -#: warning -msgid "Tomb format returned an error." -msgstr "Une erreur s'est produite à l'exécution du formatage." - -#: message -msgid "Here below its status is reported:" -msgstr "L'état de la tombe suit :" - -#: message -msgid "This tomb is a valid LUKS encrypted device." -msgstr "Cette tombe est un dispositif chiffré LUKS valide." - -#: failure -msgid "Failure mounting the encrypted file." -msgstr "Le montage du fichier chiffré a échoué." - -#: warning -msgid "How pitiful! A tomb, and no HOME." -msgstr "C'est pitoyable ! Une tombe, mais sans abri (HOME n'est pas défini)." - -#: warning -msgid "Cannot exec bind hooks without a mounted tomb." -msgstr "L'exécution des ordres de montage ne peut se faire que si la tombe est montée." - -#: failure -msgid "I can't see any open tomb, may they all rest in peace." -msgstr "Je ne vois aucune tombe ouverte, qu'ils reposent tous en paix." - -#: message -msgid "Search index updated." -msgstr "L'index de recherche a été mis à jour." - -#: warning -msgid "Run 'tomb index' to create indexes." -msgstr "Exécuter 'tomb index' pour générer les index." - -#: message -msgid "Search completed." -msgstr "La recherche est terminée." - -#: failure -msgid "No tomb name specified for resizing." -msgstr "Merci de spécifier le nom de la tombe à agrandir." - -#: failure -msgid "Size is not an integer." -msgstr "La taille doit être un nombre entier." - -#: failure -msgid "The new size must be greater then old tomb size." -msgstr "La nouvelle taille doit être supérieure à l'ancienne." - -#: failure -msgid "There is no open tomb to be closed." -msgstr "Il n'y a pas de tombe à fermer." +#. Fold: Safety functions +#. Function: _whoami +#. +#. Code sample: +#. +#. # Set username from UID or environment +#. _USER=$SUDO_USER +#. [[ "$_USER" = "" ]] && { _USER=$USERNAME } +#. [[ "$_USER" = "" ]] && { _USER=$(id -u) } +#. [[ "$_USER" = "" ]] && { +#. > _failure "Failing to identify the user who is calling us" } +#. +#. # Get GID from option -G or the environment +#. option_is_set -G #. && _GID=$(option_value -G) || _GID=$(id -g $_USER) +#: tomb:189 +msgid "Failing to identify the user who is calling us" +msgstr "" -#: warning -msgid "Too many tombs mounted, please specify one (see tomb list)" -msgstr "Trop de tombes sont montées, merci d'en choisir une (voir 'tomb list')" +#. Fold: Safety functions +#. Function: _plot +#. +#. Code sample: +#. TOMBFILE=$(basename $TOMBPATH) +#. +#. # The tomb name is TOMBFILE without an extension. +#. # It can start with dots: ..foo.tomb -> ..foo +#. TOMBNAME="${TOMBFILE%\.[^\.]*}" +#. [[ -z $TOMBNAME ]] && { +#. > _failure "Tomb won't work without a TOMBNAME." } +#. +#. # Normalize tomb name +#. TOMBFILE="$TOMBNAME.tomb" +#. +#: tomb:237 +msgid "Tomb won't work without a TOMBNAME." +msgstr "Tomb ne va pas fonctionner sans le nom d'une tombe." -#: warning -msgid "or issue the command 'tomb close all' to close them all." -msgstr "ou bien exécuter 'tomb close all' pour les fermer toutes." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # Provide a random filename in shared memory +#. _tmp_create() { +#. [[ -d "$TMPPREFIX" ]] || { +#. # we create the tempdir with the sticky bit on +#. sudo mkdir -m 1777 "$TMPPREFIX" +#. > [[ $? == 0 ]] || _failure "Fatal error creating the temporary directory: ::1 temp dir::" "$TMPPREFIX" +#. } +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#: tomb:252 +msgid "Fatal error creating the temporary directory: ::1 temp dir::" +msgstr "" -#: warning -msgid "Please specify an existing tomb." -msgstr "Merci d'indiquer une tombe existante." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#: tomb:260 +msgid "Fatal error setting the permission umask for temporary files" +msgstr "" -#: message -msgid "Kill all processes busy inside the tomb." -msgstr "Exécution (sommaire) de tous les processus en cours dans la tombe." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. > _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#: tomb:263 +msgid "Someone is messing up with us trying to hijack temporary files." +msgstr "" -#: warning -msgid "Tomb is busy, cannot umount!" -msgstr "La tombe est occupée et ne peut pas être démontée !" +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#: tomb:267 +msgid "Fatal error creating a temporary file: ::1 temp file::" +msgstr "" +"Erreur fatale lors de la création d'un fichier temporaire : ::1 temp file::" + +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#. _verbose "Created tempfile: ::1 temp file::" "$tfile" +#. TOMBTMP="$tfile" +#. TOMBTMPFILES+=("$tfile") +#: tomb:270 +msgid "Fatal error setting ownership on temporary file: ::1 temp file::" +msgstr "" -#: failure -msgid "Error parsing." -msgstr "Erreur de syntaxe." +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. r=1 +#. is_crypt=`sudo dmsetup status "$s" | awk '/crypt/ {print $3}'` +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. > _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#: tomb:316 +msgid "An active swap partition is detected..." +msgstr "" -#: warning -msgid "Some error occurred during option processing." -msgstr "L'interprétation des options a échoué." +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. > _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#: tomb:318 +msgid "All your swaps are belong to crypt. Good." +msgstr "" -#: warning -msgid "The create command is deprecated, please use dig, forge and lock instead." -msgstr "La commande \"create\" est obsolète : il convient à présent d'utiliser \"dig\", \"forge\", et \"lock\"." +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. > _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#: tomb:320 +msgid "This poses a security risk." +msgstr "" -#: warning -msgid "For more informations see Tomb's manual page (man tomb)." -msgstr "Pour de plus amples informations, se référer au manuel de Tomb (man tomb)." +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. > _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#: tomb:321 +msgid "You can deactivate all swap partitions using the command:" +msgstr "" +"Vous pouvez désactiver l'ensemble des partitions de mémoire d'échange avec " +"la commande :" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. > _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#: tomb:322 +msgid " swapoff -a" +msgstr " swapoff -a" -#: message -msgid "Try -h for help." -msgstr "Essayer -h pour obtenir l'aide." +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. > _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#. } +#: tomb:323 +msgid "But if you want to proceed like this, use the -f (force) flag." +msgstr "" +"Mais si vous préférez continuer sans le faire, utilisez l'option -f (forcer)." + +#. Fold: Safety functions +#. Function: _check_swap +#. +#. Code sample: +#. _ensure_safe_swap +#. case $? in +#. 0|2) # No, or encrypted swap +#. return 0 +#. ;; +#. *) # Unencrypted swap +#. > _failure "Operation aborted." +#. ;; +#. esac +#. fi +#. } +#: tomb:342 +msgid "Operation aborted." +msgstr "L'opération est interrompue." -#: failure -msgid "Tomb won't work without a TOMBNAME." -msgstr "Tomb ne va pas fonctionner sans le nom d'une tombe." +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find pinentry-curses and no DISPLAY detected." +#. fi +#. +#. else # a DISPLAY is found to be active +#. +#: tomb:379 +msgid "Cannot find pinentry-curses and no DISPLAY detected." +msgstr "" -#: failure -msgid "Fatal error creating a temporary file: ::1 temp file::" -msgstr "Erreur fatale lors de la création d'un fichier temporaire : ::1 temp file::" +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. EOF` +#. +#. else +#. +#. if _is_found "pinentry-curses"; then +#. +#. > _warning "Detected DISPLAY, but only pinentry-curses is found." +#. output=`cat <<EOF | pinentry-curses +#. OPTION ttyname=$TTY +#. OPTION lc-ctype=$LANG +#. SETTITLE $title +#: tomb:432 +msgid "Detected DISPLAY, but only pinentry-curses is found." +msgstr "" -#: warning -msgid "You can deactivate all swap partitions using the command:" -msgstr "Vous pouvez désactiver l'ensemble des partitions de mémoire d'échange avec la commande :" +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find any pinentry: impossible to ask for password." +#. fi +#. +#. fi +#. +#: tomb:442 +msgid "Cannot find any pinentry: impossible to ask for password." +msgstr "" -#: warning -msgid " swapoff -a" -msgstr " swapoff -a" +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. fi # end of DISPLAY block +#. +#. # parse the pinentry output +#. for i in ${(f)output}; do +#. [[ "$i" =~ "^ERR.*" ]] && { +#. > _warning "Pinentry error: ::1 error::" ${i[(w)3]} +#. print "canceled" +#. return 1 } +#. +#. # here the password is found +#: tomb:452 +msgid "Pinentry error: ::1 error::" +msgstr "" -#: warning -msgid "But if you want to proceed like this, use the -f (force) flag." -msgstr "Mais si vous préférez continuer sans le faire, utilisez l'option -f (forcer)." +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. # here the password is found +#. [[ "$i" =~ "^D .*" ]] && password="${i##D }" +#. done +#. +#. [[ "$password" = "" ]] && { +#. > _warning "Empty password" +#. print "empty" +#. return 1 } +#. +#. print "$password" +#: tomb:461 +msgid "Empty password" +msgstr "" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Check if a filename is a valid tomb +#. is_valid_tomb() { +#. _verbose "is_valid_tomb ::1 tomb file::" $1 +#. +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. > _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#: tomb:477 msgid "Tomb file is missing from arguments." msgstr "Les arguments ne comportent pas le nom du fichier de la tombe." -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. > _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#: tomb:481 #, fuzzy msgid "Tomb file not found: ::1 tomb file::" msgstr "Le fichier valide d'une tombe a été trouvé : ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. > _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#: tomb:483 #, fuzzy msgid "Tomb file is not a regular file: ::1 tomb file::" msgstr "Le fichier valide d'une tombe a été trouvé : ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. > _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#: tomb:485 #, fuzzy msgid "Tomb file is empty (zero length): ::1 tomb file::" msgstr "Le fichier valide d'une tombe a été trouvé : ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. > _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#: tomb:487 #, fuzzy msgid "Tomb file is not writable: ::1 tomb file::" msgstr "Le fichier valide d'une tombe a été trouvé : ::1 tomb file::" -#: warning +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#. +#. # Tomb file may be a LUKS FS (or we are creating it) +#. [[ "`file $1`" =~ "luks encrypted file" ]] || { +#. > _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#: tomb:495 #, fuzzy msgid "File is not yet a tomb: ::1 tomb file::" msgstr "Ouverture de la tombe ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. > _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#: tomb:501 #, fuzzy msgid "Tomb is currently in use: ::1 tomb name::" msgstr "Fermons la tombe ::1 tomb name::" -#: message +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. > _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:504 msgid "Valid tomb file found: ::1 tomb path::" msgstr "Un fichier de tombe valide a été trouvé à : ::1 tomb path::" -#: warning +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. lo_mount() { +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. > _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#: tomb:516 #, fuzzy msgid "Loop mount of volumes is not possible on this machine, this error" -msgstr "Le montage en boucle des volumes n'est pas supporté sur cette machine, cette erreur" - -#: print +msgstr "" +"Le montage en boucle des volumes n'est pas supporté sur cette machine, cette " +"erreur" + +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. > _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#: tomb:517 +msgid "often occurs on VPS and kernels that don't provide the loop module." +msgstr "" +"se produit souvent sur les machines virtuelles et avec les noyaux qui ne " +"fournissent pas le module loop." + +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. > _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#. sudo losetup -f "$tpath" # allocates the next loopback for our file +#: tomb:518 +msgid "It is impossible to use Tomb on this machine at this conditions." +msgstr "" +"Il est impossible d'utiliser Tomb dans les conditions offertes par cette " +"machine." + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # }}} +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. > _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#: tomb:558 msgid "Syntax: tomb [options] command [arguments]" msgstr "Syntaxe : tomb [options] commande [arguments]" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. > _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#: tomb:560 msgid "Commands:" msgstr "Commandes :" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. > _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#: tomb:562 msgid " // Creation:" msgstr " // Création :" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. > _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#: tomb:563 msgid " dig create a new empty TOMB file of size -s in MB" msgstr " dig (creuser) Créer une nouvelle TOMBE de taille -s Mo" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. > _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#: tomb:564 msgid " forge create a new KEY file and set its password" -msgstr " forge (forger) Créer une nouvelle CLÉ et lui assigner un mot de passe" - -#: print +msgstr "" +" forge (forger) Créer une nouvelle CLÉ et lui assigner un mot de " +"passe" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. > _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#: tomb:565 msgid " lock installs a lock on a TOMB to use it with KEY" msgstr " lock (vérouiller) Vérouiller une TOMBE avec une CLÉ" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. > _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#: tomb:567 msgid " // Operations on tombs:" msgstr " // Opérations sur les tombes :" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. > _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#: tomb:568 msgid " open open an existing TOMB" msgstr " open (ouvrir) Ouvrir une TOMBE existante" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. > _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#: tomb:569 msgid " index update the search indexes of tombs" -msgstr " index (indéxer) Mettre à jour les indices de recherche des tombes" - -#: print +msgstr "" +" index (indéxer) Mettre à jour les indices de recherche des tombes" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. > _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#: tomb:570 msgid " search looks for filenames matching text patterns" -msgstr " search (rechercher) Rechercher des noms de fichiers selon des motifs textuels" - -#: print +msgstr "" +" search (rechercher) Rechercher des noms de fichiers selon des motifs " +"textuels" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. > _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#: tomb:571 msgid " list list of open TOMBs and information on them" -msgstr " list (énumérer) Établir une liste informative des TOMBES ouvertes" - -#: print +msgstr "" +" list (énumérer) Établir une liste informative des TOMBES ouvertes" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. > _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#: tomb:572 msgid " close close a specific TOMB (or 'all')" -msgstr " close (fermer) Sceller une TOMBE en fermant tous les programmes associés" - -#: print +msgstr "" +" close (fermer) Sceller une TOMBE en fermant tous les programmes " +"associés" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. > _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#: tomb:573 msgid " slam slam a TOMB killing all programs using it" -msgstr " slam referme une tombe brutalement, tuant tous les programmes qui l'utilisent" - -#: print +msgstr "" +" slam referme une tombe brutalement, tuant tous les programmes qui " +"l'utilisent" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. > _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#: tomb:575 msgid " resize resize a TOMB to a new size -s (can only grow)" msgstr " resize (élargir) Augmenter la taille d'une TOMBE à -s Mo" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. > _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#: tomb:578 msgid " // Operations on keys:" msgstr " // Opération sur les clés :" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. > _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#: tomb:579 +msgid " passwd change the password of a KEY (needs old pass)" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. > _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#: tomb:580 +msgid " setkey change the KEY locking a TOMB (needs old key and pass)" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. > _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#: tomb:583 +msgid " // Backup on paper:" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. > _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#: tomb:584 msgid " engrave makes a QR code of a KEY to be saved on paper" -msgstr " engrave (graver) Grave une empreinte de la CLÉ pour impression papier au format QR code" +msgstr "" +" engrave (graver) Grave une empreinte de la CLÉ pour impression papier " +"au format QR code" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. > _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#: tomb:588 +msgid " // Steganography:" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. > _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#: tomb:589 +msgid " bury hide a KEY inside a JPEG image (for use with -k)" +msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. > _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#: tomb:590 +msgid " exhume extract a KEY from a JPEG image (prints to stdout)" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. > _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#: tomb:593 msgid "Options:" msgstr "Options :" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. > _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#: tomb:595 msgid " -s size of the tomb file when creating/resizing one (in MB)" -msgstr " -s taille de la tombe lors de sa création ou son agrandissement (en Mo)" - -#: print +msgstr "" +" -s taille de la tombe lors de sa création ou son agrandissement (en " +"Mo)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. > _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#: tomb:596 msgid " -k path to the key to be used ('-k -' to read from stdin)" -msgstr " -k chemin de la clé à utiliser ('-k -' pour la lire depuis l'entrée standard)" - -#: print +msgstr "" +" -k chemin de la clé à utiliser ('-k -' pour la lire depuis l'entrée " +"standard)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. > _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#: tomb:597 msgid " -n don't process the hooks found in tomb" msgstr " -n ne pas utiliser les 'crochets' trouvés dans la tombe" -#: print -msgid " -o mount options used to open (default: rw,noatime,nodev)" -msgstr " -o options de montage à l'ouverture (par défaut : rw,noatime,nodev)" +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. > _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#: tomb:598 +msgid " -o options passed to local command, e.g.:" +msgstr "" -#: print -msgid " -f force operation (i.e. even if swap is active)" -msgstr " -f forcer l'opération (c-à-d même si la partition d'échange est activée)" +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. > _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#: tomb:599 +msgid " - mount options used to open (default: rw,noatime,nodev)" +msgstr "" -#: print -msgid " --kdf generate passwords armored against dictionary attacks" -msgstr " --kdf générer des mots de passe protégés contre les attaques par dictionnaire" +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. > _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#: tomb:600 +msgid " - an alternate cipher to forge and lock" +msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. > _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#: tomb:601 +msgid " -f force operation (i.e. even if swap is active)" +msgstr "" +" -f forcer l'opération (c-à-d même si la partition d'échange est " +"activée)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. > _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#: tomb:603 +msgid " --kdf generate passwords armored against dictionary attacks" +msgstr "" +" --kdf générer des mots de passe protégés contre les attaques par " +"dictionnaire" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. > _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#: tomb:607 msgid " -h print this help" msgstr " -h imprimer cette aide" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. > _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#: tomb:608 msgid " -v print version, license and list of available ciphers" -msgstr " -v imprimer la version, la licence, et la liste des codes disponibles" - -#: print +msgstr "" +" -v imprimer la version, la licence, et la liste des codes disponibles" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. > _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#: tomb:609 msgid " -q run quietly without printing informations" msgstr " -q exécuter silencieusement sans imprimer les informations" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. > _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#: tomb:610 msgid " -D print debugging information at runtime" msgstr " -D imprimer les information de débogage durant l'exécution" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. > _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#: tomb:612 msgid "For more informations on Tomb read the manual: man tomb" -msgstr "Pour de plus amples information sur Tomb, se reporter au manuel : man tomb" - -#: print +msgstr "" +"Pour de plus amples information sur Tomb, se reporter au manuel : man tomb" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. > _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#. # Check whether a commandline option is set. +#: tomb:613 msgid "Please report bugs on <http://github.com/dyne/tomb/issues>." -msgstr "Merci de rapporter les erreurs sur <https://github.com/dyne/tomb/issues>." - -#: failure +msgstr "" +"Merci de rapporter les erreurs sur <https://github.com/dyne/tomb/issues>." + +#. Fold: Commandline interaction +#. Function: _ensure_dependencies +#. +#. Code sample: +#. # missing, bail out. +#. _ensure_dependencies() { +#. +#. # Check for required programs +#. for req in cryptsetup pinentry sudo gpg mkfs.ext4 e2fsck; do +#. command -v $req 1>/dev/null 2>/dev/null || { +#. > _failure "Missing required dependency ::1 command::. Please install it." $req } +#. done +#. +#. # Ensure system binaries are available in the PATH +#. path+=(/sbin /usr/sbin) # zsh magic +#: tomb:748 msgid "Missing required dependency ::1 command::. Please install it." msgstr "Il manque la dépendance requise ::1 command::. Merci de l'installer." -#: warning +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. > _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#: tomb:785 +msgid "cleartext key from stdin selected: this is unsafe." +msgstr "" + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. > exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#: tomb:786 +msgid "please use --unsafe if you really want to do this." +msgstr "" + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. > _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. _warning "is_valid_key() called without an argument." +#: tomb:788 +msgid "received key in cleartext from stdin (unsafe mode)" +msgstr "" + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. > _warning "is_valid_key() called without an argument." +#. return 1 +#. } +#. +#. # If the key file is an image don't check file header +#: tomb:792 msgid "is_valid_key() called without an argument." msgstr "La fonction is_valid_key() a été appelée sans argument." -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. } +#. +#. # If the key file is an image don't check file header +#. [[ -r $TOMBKEYFILE ]] #. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] #. && { +#. > _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. _message "Key is valid." +#: tomb:800 msgid "Key is an image, it might be valid." msgstr "La clé est une image et pourrait être valide." -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] #. && { +#. _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. > _message "Key is valid." +#. return 0 } +#. +#. return 1 +#. } +#: tomb:804 msgid "Key is valid." msgstr "La clé est valide." -#: warning +#. Fold: Key operations +#. Function: _tomb_key_recover recover_key +#. +#. Code sample: +#. } +#. +#. # $1 is a string containing an encrypted key +#. _tomb_key_recover recover_key() { +#. local key="${1}" # Unique argument is an encrypted key +#. +#. > _warning "Attempting key recovery." +#. +#. _head="${key[(f)1]}" # take the first line +#. +#. TOMBKEY="" # Reset global variable +#: tomb:814 msgid "Attempting key recovery." msgstr "Tentative de récupération de la clé." -#: warning -msgid "The key seems invalid or its format is not known by this version of Tomb." -msgstr "La clé semble invalide ou son format n'est pas reconnu par cette version de Tomb." +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. # Set global variables TOMBKEY and TOMBKEYFILE. +#. _load_key() { +#. local keyfile="$1" # Unique argument is an optional keyfile +#. +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. > _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. _message "Waiting for the key to be piped from stdin... " +#: tomb:838 +msgid "This operation requires a key file to be specified using the -k option." +msgstr "" +"Cette opération requiert la spécification du chemin de la clé par l'option -" +"k." + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. > _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=stdin +#. TOMBKEY=$(cat) +#. elif [[ $keyfile == "cleartext" ]]; then +#. _verbose "load_key reading SECRET from stdin" +#: tomb:842 +msgid "Waiting for the key to be piped from stdin... " +msgstr "En attente d'une clé à lire sur l'entrée standard... " -#: failure +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=cleartext +#. TOMBKEY=cleartext +#. TOMBSECRET=$(cat) +#. else +#. _verbose "load_key argument: ::1 key file::" $keyfile +#. > [[ -r $keyfile ]] || _failure "Key not found, specify one using -k." +#. TOMBKEYFILE=$keyfile +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#: tomb:853 +msgid "Key not found, specify one using -k." +msgstr "Aucune clé n'a été trouvée, merci d'en spécifier une avec -k." + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#. _verbose "load_key: ::1 key::" $TOMBKEYFILE +#. +#. is_valid_key $TOMBKEY || { +#. > _warning "The key seems invalid or its format is not known by this version of Tomb." +#. _tomb_key_recover $TOMBKEY +#. } +#. +#. # Declared TOMBKEYFILE (path) +#: tomb:861 +msgid "" +"The key seems invalid or its format is not known by this version of Tomb." +msgstr "" +"La clé semble invalide ou son format n'est pas reconnu par cette version de " +"Tomb." + +#. Fold: Key operations +#. Function: get_lukskey +#. +#. Code sample: +#. _verbose "KDF salt: $kdf_salt" +#. _verbose "KDF ic: $kdf_ic" +#. _verbose "KDF len: $kdf_len" +#. _password=$(tomb-kdb-pbkdf2 $kdf_salt $kdf_ic $kdf_len 2>/dev/null <<<$_password) +#. ;; +#. *) +#. > _failure "No suitable program for KDF ::1 program::." $pbkdf_hash +#. unset _password +#. return 1 +#. ;; +#. esac +#: tomb:936 #, fuzzy msgid "No suitable program for KDF ::1 program::." msgstr "Pas de programme approprié pour la dérivation de clé ::1 kdf::." -#: failure +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. +#. # This function asks the user for the password to use the key it tests +#. # it against the return code of gpg on success returns 0 and saves +#. # the password in the global variable $TOMBPASSWORD +#. ask_key_password() { +#. [[ -z "$TOMBKEYFILE" ]] && { +#. > _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#: tomb:962 msgid "Internal error: ask_key_password() called before _load_key()." -msgstr "Erreur interne : la fonction ask_key_password() a été appelée avant _load_key()." - -#: message +msgstr "" +"Erreur interne : la fonction ask_key_password() a été appelée avant " +"_load_key()." + +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#. +#. > _message "A password is required to use key ::1 key::" $TOMBKEYFILE +#. passok=0 +#. tombpass="" +#. if [[ "$1" = "" ]]; then +#. +#: tomb:968 msgid "A password is required to use key ::1 key::" msgstr "Un mot de passe est nécessaire pour utiliser la clé ::1 key::" -#: message -msgid "Commanded to change password for tomb key ::1 key::" -msgstr "L'utilisateur a requis un changement du mot de passe de la clé ::1 key::." +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. if [[ $c == 1 ]]; then +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE") +#. else +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE (attempt $c)") +#. fi +#. [[ $? = 0 ]] || { +#. > _warning "User aborted password dialog." +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#: tomb:980 +msgid "User aborted password dialog." +msgstr "L'utilisateur a interrompu le dialogue du mot de passe." + +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#. +#. [[ $? = 0 ]] && { +#. > passok=1; _message "Password OK." +#. break; +#. } +#. done +#. +#: tomb:987 +msgid "Password OK." +msgstr "Le mot de passe est valide." -#: failure +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. change_passwd() { +#. local tmpnewkey lukskey c tombpass tombpasstmp +#. +#. _check_swap # Ensure swap is secure, if any +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. > _message "Commanded to change password for tomb key ::1 key::" $TOMBKEYFILE +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. +#: tomb:1025 +msgid "Commanded to change password for tomb key ::1 key::" +msgstr "" +"L'utilisateur a requis un changement du mot de passe de la clé ::1 key::." + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. local tomboldpwd="`option_value --tomb-old-pwd`" +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomboldpwd +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. > [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#: tomb:1037 #, fuzzy msgid "No valid password supplied." msgstr "Le mot de passe fourni est invalide." -#: message +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#. +#. { option_is_set --tomb-pwd } && { +#: tomb:1039 +msgid "Changing password for ::1 key file::" +msgstr "" + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. gen_key "$tombpwd" >> "$tmpnewkey" +#. } || { +#. gen_key >> "$tmpnewkey" +#. } +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. > _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. _success "Your passphrase was successfully updated." +#: tomb:1052 +msgid "Error: the newly generated keyfile does not seem valid." +msgstr "Erreur : le fichier de clé nouvellement créé semble invalide." + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. > _success "Your passphrase was successfully updated." +#. +#. return 0 +#. } +#. +#: tomb:1056 +msgid "Your passphrase was successfully updated." +msgstr "" + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. +#. if [ "$1" = "" ]; then +#. while true; do +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. > _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. _failure "You set empty password, which is not possible." +#. fi +#: tomb:1078 +msgid "User aborted." +msgstr "L'utilisateur a interrompu l'opération." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. > _failure "You set empty password, which is not possible." +#. fi +#. tombpasstmp=$tombpass +#. tombpass=`ask_password "Type the new password to secure your key (again)"` +#. if [[ $? != 0 ]]; then +#: tomb:1081 +msgid "You set empty password, which is not possible." +msgstr "Vous ne pouvez pas saisir un mot de passe vide." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # see: https://github.com/dyne/Tomb/issues/82 +#. itertime="`option_value --kdf`" +#. # removing support of floating points because they can't be type checked well +#. if [[ "$itertime" != <-> ]]; then +#. unset tombpass +#. unset tombpasstmp +#. > _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#: tomb:1109 +msgid "" +"Wrong argument for --kdf: must be an integer number (iteration seconds)." +msgstr "" +"Argument invalide pour --kdf : ce doit être un nombre entier (de secondes " +"d'itérations)." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. unset tombpasstmp +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. > _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#: tomb:1114 +msgid "Using KDF, iterations: ::1 microseconds::" +msgstr "" + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. > _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#: tomb:1115 msgid "generating salt" msgstr "Génération du sel en cours" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. > _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#: tomb:1117 msgid "calculating iterations" msgstr "Calcul des itérations en cours" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. > _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#. +#. header="_KDF_pbkdf2sha1_${pbkdf2_salt}_${pbkdf2_iter}_64\n" +#: tomb:1119 msgid "encoding the password" msgstr "Codage du mot de passe en cours" -#: warning +#. Fold: Key operations +#. Function: list_gnupg_ciphers +#. +#. Code sample: +#. unset tombpasstmp +#. } +#. +#. # prints an array of ciphers available in gnupg (to encrypt keys) +#. list_gnupg_ciphers() { +#. # prints an error if GnuPG is not found +#. > which gpg 2>/dev/null || _failure "gpg (GnuPG) is not found, Tomb cannot function without it." +#. +#. ciphers=(`gpg --version | awk ' +#. BEGIN { ciphers=0 } +#. /^Cipher:/ { gsub(/,/,""); sub(/^Cipher:/,""); print; ciphers=1; next } +#: tomb:1150 +msgid "gpg (GnuPG) is not found, Tomb cannot function without it." +msgstr "" +"gpg (GnuPG) n'est pas disponible, mais il est requis pour le fonctionnement " +"de Tomb." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEY +#. +#. imagefile=$PARAM +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. > _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#: tomb:1171 msgid "Encode failed: ::1 image file:: is not a jpeg image." msgstr "L'encodage a échoué : ::1 image file:: n'est pas une image JPEG." -#: failure +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. > _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#: tomb:1175 +msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" +msgstr "" + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. > _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#. # by Tomb, but its not strictly necessary (and having different +#: tomb:1176 +msgid "Please confirm the key password for the encoding" +msgstr "Merci de confirmer le mot de passe de la clé en vue de l'encodage" + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpwd +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. > _warning "Wrong password supplied." +#. _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#: tomb:1192 +msgid "Wrong password supplied." +msgstr "Le mot de passe fourni est invalide." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. _warning "Wrong password supplied." +#. > _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#. print - "$TOMBKEY" | awk ' +#: tomb:1193 +msgid "You shall not bury a key whose password is unknown to you." +msgstr "Vous ne pouvez pas enterrer une clé dont vous ignorez le mot de passe." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. /^-----/ {next} +#. /^Version/ {next} +#. {print $0}' #. | steghide embed --embedfile - --coverfile ${imagefile} #. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. > _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#: tomb:1204 +msgid "Encoding error: steghide reports problems." +msgstr "Erreur à l'encodage : steghide rapporte des problèmes." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. | steghide embed --embedfile - --coverfile ${imagefile} #. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. > _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#. fi +#. +#. return $res +#: tomb:1207 +msgid "Tomb key encoded succesfully into image ::1 image file::" +msgstr "" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # mandatory 1st arg: the image file where key is supposed to be +#. # optional 2nd arg: the password to use (same as key, internal use) +#. # optional 3rd arg: the key where to save the result (- for stdout) +#. exhume_key() { +#. [[ "$1" = "" ]] && { +#. > _failure "Exhume failed, no image specified" } +#. +#. local imagefile="$1" # The image file where to look for the key +#. local tombpass="$2" # (Optional) the password to use (internal use) +#. local destkey="$3" # (Optional) the key file where to save the +#: tomb:1219 +msgid "Exhume failed, no image specified" +msgstr "" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local destkey="$3" # (Optional) the key file where to save the +#. # result (- for stdout) +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. > _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#: tomb:1229 #, fuzzy msgid "Exhume failed, image file not found: ::1 image file::" msgstr "Le fichier valide d'une tombe a été trouvé : ::1 tomb file::" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. > _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#: tomb:1231 #, fuzzy msgid "Exhume failed: ::1 image file:: is not a jpeg image." msgstr "L'encodage a échoué : ::1 image file:: n'est pas une image JPEG." -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#. TOMBKEY=$(steghide extract -sf $imagefile -p $tombpass -xf -) +#. [[ $? != 0 ]] && { +#. > _failure "Wrong password or no steganographic key found" } +#. +#. recover_key $TOMBKEY +#. +#. return 0 +#: tomb:1238 msgid "Wrong password or no steganographic key found" msgstr "Mot de passe invalide ou clé stéganographique introuvable" -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. } +#. +#. # Ensure we have a valid destination for the key +#. [[ -z $destkey ]] && { option_is_set -k } && destkey=$(option_value -k) +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. > _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#: tomb:1249 msgid "printing exhumed key on stdout" msgstr "Impression de la clé exhumée sur la sortie standard" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. > _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#: tomb:1253 #, fuzzy msgid "File exists: ::1 tomb key::" msgstr "Le fichier existe : ::1 key::" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. > _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#: tomb:1255 +msgid "Use of --force selected: overwriting." +msgstr "L'option --force est sélectionnée : ré-écriture en cours." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. > _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#: tomb:1258 +msgid "Make explicit use of --force to overwrite." +msgstr "Pour l'ignorer et l'écrire de nouveau, utiliser --force." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. > _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#: tomb:1259 #, fuzzy msgid "Refusing to overwrite file. Operation aborted." -msgstr "La création de cette tombe écraserait un fichier existant. Opération annulée." - -#: message +msgstr "" +"La création de cette tombe écraserait un fichier existant. Opération annulée." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. > _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#. tombpass=$(option_value --tomb-pwd) +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpass +#. } || { +#: tomb:1262 msgid "Trying to exhume a key out of image ::1 image file::" msgstr "Tentative d'exhumer une clé de l'image ::1 image file::" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. steghide extract -sf $imagefile -p ${tombpass} -xf $destkey +#. r=$? +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. > _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#: tomb:1283 +msgid "Key succesfully exhumed to ::1 key::." +msgstr "" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. > _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#. return $r +#. } +#: tomb:1285 msgid "Nothing found in ::1 image file::" msgstr "Aucune clé n'a été trouvée dans ::1 image file::" -#: failure +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. local keyname=$(basename $TOMBKEYFILE) +#. local pngname="$keyname.qr.png" +#. +#. > _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#: tomb:1300 +msgid "Rendering a printable QRCode for key: ::1 tomb key file::" +msgstr "" + +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. > _failure "QREncode reported an error." } +#. +#. _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#: tomb:1305 msgid "QREncode reported an error." msgstr "QREncode a retourné une erreur." -#: message +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. _failure "QREncode reported an error." } +#. +#. > _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#. file $pngname +#. } +#: tomb:1307 +msgid "Operation successful:" +msgstr "" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. dig_tomb() { +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. > _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#: tomb:1340 msgid "Commanded to dig tomb ::1 tomb path::" msgstr "L'ordre est de creuser une tombe à ::1 tomb path::" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. > [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#: tomb:1342 msgid "Missing path to tomb" msgstr "Il manque le chemin vers la tombe." -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. > [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#: tomb:1343 +msgid "Size argument missing, use -s" +msgstr "Utiliser -s pour préciser la taille de la tombe en Mo." + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. > [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#: tomb:1344 msgid "Size must be an integer (megabytes)" msgstr "La taille doit être un entier (en megaoctets)" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. > [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#: tomb:1345 msgid "Tombs can't be smaller than 10 megabytes" msgstr "Les tombes ne peuvent être plus petites que 10 Mo" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#. > _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#: tomb:1350 +msgid "A tomb exists already. I'm not digging here:" +msgstr "Une tombe existe déjà à cet endroit. Je n'y creuse pas !" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ -e $TOMBPATH ]] && { +#. _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. > _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#: tomb:1355 +msgid "Creating a new tomb in ::1 tomb path::" +msgstr "" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. > _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#: tomb:1357 msgid "Generating ::1 tomb file:: of ::2 size::MiB" msgstr "Tombe en cours de création ::1 tomb file::, de taille ::2 size::Mo" -#: warning +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#. > _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. chmod 0600 $TOMBPATH +#. +#: tomb:1362 msgid "Error creating the tomb ::1 tomb path::" -msgstr "Une erreur s'est produite lors de la création de la tombe à ::1 tomb path::" +msgstr "" +"Une erreur s'est produite lors de la création de la tombe à ::1 tomb path::" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. > _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#: tomb:1377 +msgid "Done digging ::1 tomb name::" +msgstr "" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. > _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#: tomb:1378 +msgid "Your tomb is not yet ready, you need to forge a key and lock it:" +msgstr "" +"Votre tombe n'est pas encore prête, vous devez en forger la clé et la " +"vérouiller :" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. > _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#: tomb:1379 msgid "tomb forge ::1 tomb path::.key" msgstr "Forge de la clé ::1 tomb path::.key en cours" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. > _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:1380 msgid "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" msgstr "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. local destkey="$1" +#. { option_is_set -k } && { destkey=$(option_value -k) } +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. > _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#: tomb:1401 +msgid "A filename needs to be specified using -k to forge a new key." +msgstr "" +"Pour forger une nouvelle clé, vous devez préciser un nom de fichier avec -k." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. > _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#. +#. # Ensure GnuPG won't exit with an error before first run +#: tomb:1403 msgid "Commanded to forge key ::1 key::" msgstr "Forge de la clé ::1 key::" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. mkdir -m 0700 $HOME/.gnupg +#. touch $HOME/.gnupg/pubring.gpg } +#. +#. # Do not overwrite any files accidentally +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. > _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#: tomb:1415 +msgid "Forging this key would overwrite an existing file. Operation aborted." +msgstr "Forger cette clé détruirait un fichier existant. Opération annulée." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. > _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#: tomb:1419 +msgid "Cannot generate encryption key." +msgstr "La clé de chiffrement ne peut être générée." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && algo=$algopt +#. +#. > _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#: tomb:1427 msgid "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" -msgstr "Forge de la clé ::1 key:: avec l'algorithme de chiffrement ::2 algorithm::" +msgstr "" +"Forge de la clé ::1 key:: avec l'algorithme de chiffrement ::2 algorithm::" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. > _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#: tomb:1432 +msgid "This operation takes time, keep using this computer on other tasks," +msgstr "" +"Cette opération prend du temps, continuez à utiliser l'ordinateur pour " +"d'autres tâches," + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. > _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#: tomb:1433 +msgid "once done you will be asked to choose a password for your tomb." +msgstr "" +"une fois l'opération terminée, vous devrez choisir un mot de passe pour " +"votre tombe." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. > _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#: tomb:1434 +msgid "To make it faster you can move the mouse around." +msgstr "Vous pouvez accélérer l'opération en bougeant la souris." -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. > _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#. { option_is_set --use-urandom } && random_source=/dev/urandom +#: tomb:1435 +msgid "If you are on a server, you can use an Entropy Generation Daemon." +msgstr "" +"Si vous effectuez l'opération sur un serveur, vous pouvez utiliser un démon " +"générateur d'entropie." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. > _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#: tomb:1449 +msgid "Choose the password of your key: ::1 tomb key::" +msgstr "" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. > _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#. # the gen_key() function takes care of the new key's encryption +#: tomb:1450 +msgid "(You can also change it later using 'tomb passwd'.)" +msgstr "" +"(Vous pouvez le modifier ultérieurement avec la commande 'tomb passwd'.)" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. > _warning "The key does not seem to be valid." +#. _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#: tomb:1468 +msgid "The key does not seem to be valid." +msgstr "La clé semble être invalide." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. _warning "The key does not seem to be valid." +#. > _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#: tomb:1469 +msgid "Dumping contents to screen:" +msgstr "Capture des contenus à l'écran :" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. > _message "Done forging ::1 key file::" $TOMBKEYFILE +#. _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#: tomb:1477 msgid "Done forging ::1 key file::" msgstr "La clé est forgée : ::1 key file::" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. _message "Done forging ::1 key file::" $TOMBKEYFILE +#. > _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#. # Step three -- Lock tomb +#: tomb:1478 +msgid "Your key is ready:" +msgstr "" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. # for more alternatives refer to cryptsetup(8) +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. > _warning "No tomb specified for locking." +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#: tomb:1498 +msgid "No tomb specified for locking." +msgstr "Quelle tombe dois-je vérouiller ?" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. _warning "No tomb specified for locking." +#. > _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#: tomb:1499 +msgid "Usage: tomb lock file.tomb file.tomb.key" +msgstr "Usage : tomb lock file.tomb file.tomb.key" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#. +#. > _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. _failure "There is no tomb here. You have to dig it first." } +#. +#: tomb:1505 msgid "Commanded to lock tomb ::1 tomb file::" msgstr "Vérouillage de la tombe ::1 tomb file:: en cours" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _plot $tombpath +#. +#. _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. > _failure "There is no tomb here. You have to dig it first." } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. lo_mount $TOMBPATH +#: tomb:1508 +msgid "There is no tomb here. You have to dig it first." +msgstr "" +"Il n'y a pas de tombe à cet endroit. Vous devez d'abord la creuser ('dig')." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. > _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#: tomb:1517 +msgid "Checking if the tomb is empty (we never step on somebody else's bones)." +msgstr "Sondage de la tombe (nous ne piétinons jamais les os d'autrui)." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. > _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#: tomb:1521 +msgid "The tomb was already locked with another key." +msgstr "La tombe est déjà vérouillée avec une autre clé." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. > _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#. +#: tomb:1522 +msgid "" +"Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +msgstr "" +"Opération abandonnée. Je ne peux pas vérouiller une tombe déjà vérouillée. " +"Vous pouvez en creuser une autre (avec 'dig')." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. > _message "Fine, this tomb seems empty." +#. fi +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#: tomb:1524 +msgid "Fine, this tomb seems empty." +msgstr "Bien, la tombe semble être vide." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. # the encryption cipher for a tomb can be set when locking using -c +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && cipher=$algopt +#. > _message "Locking using cipher: ::1 cipher::" $cipher +#. +#. # get the pass from the user and check it +#. if option_is_set --tomb-pwd; then +#. tomb_pwd="`option_value --tomb-pwd`" +#: tomb:1532 msgid "Locking using cipher: ::1 cipher::" msgstr "Vérouillage avec l'algorithme de chiffrement : ::1 cipher::" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password "$tomb_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #: tomb:1544 +msgid "Locking ::1 tomb file:: with ::2 tomb key file::" +msgstr "" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. > _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#: tomb:1546 +msgid "Formatting Luks mapped device." +msgstr "Formatage du dispositif LUKS désigné." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#: tomb:1551 +msgid "cryptsetup luksFormat returned an error." +msgstr "Une erreur s'est produite à l'exécution de cryptsetup luksFormat" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#: tomb:1556 #, fuzzy msgid "cryptsetup luksOpen returned an error." msgstr "Une erreur s'est produite à l'exécution de cryptsetup luksFormat" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. > _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#: tomb:1559 +msgid "Formatting your Tomb with Ext3/Ext4 filesystem." +msgstr "Formatage de votre tombe avec un système de fichier Ext3/Ext4." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. > _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#: tomb:1563 +msgid "Tomb format returned an error." +msgstr "Une erreur s'est produite à l'exécution du formatage." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#. > _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#: tomb:1564 msgid "Your tomb ::1 tomb file:: may be corrupted." msgstr "Votre tombe ::1 tomb file:: pourrait être corrompu." -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. > _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" #. $TOMBPATH $TOMBKEYFILE +#. +#. } +#: tomb:1569 #, fuzzy msgid "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" -msgstr "Vérouillage accompli de ::1 tomb name:: avec LUKS dm-crypt ::1 cipher::" +msgstr "" +"Vérouillage accompli de ::1 tomb name:: avec LUKS dm-crypt ::1 cipher::" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. > _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" #. $TOMBPATH $TOMBKEYFILE +#. +#. } +#. +#: tomb:1570 +msgid "" +"Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" +msgstr "" -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. # This function changes the key that locks a tomb +#. change_tomb_key() { +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. > _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#: tomb:1580 msgid "Commanded to reset key for tomb ::1 tomb path::" msgstr "L'ordre est de réinitialiser la clé pour la tomb ::1 tomb path::" -#: warning +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. > _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#: tomb:1583 msgid "Command 'setkey' needs two arguments: the old key file and the tomb." -msgstr "La commande 'setkey' requiert deux arguments : le chemin de l'ancienne clé, et celui de la tombe." - -#: warning +msgstr "" +"La commande 'setkey' requiert deux arguments : le chemin de l'ancienne clé, " +"et celui de la tombe." + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. > _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#. _check_swap +#: tomb:1584 msgid "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" msgstr "c-à-d. : tomb -k nouvelle.clé.key ancienne.clé.key mes.secrets.tomb" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. > _failure "Execution aborted." +#. } +#. +#. _check_swap +#. is_valid_tomb $tombpath +#: tomb:1585 #, fuzzy msgid "Execution aborted." msgstr "L'opération est interrompue." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. sudo cryptsetup isLuks ${nstloop} +#. # is it a LUKS encrypted nest? we check one more time +#. [[ $? == 0 ]] || { +#. > _failure "Not a valid LUKS encrypted volume: ::1 volume::" $TOMBPATH } +#. +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#: tomb:1596 #, fuzzy msgid "Not a valid LUKS encrypted volume: ::1 volume::" msgstr "Cette tombe est un dispositif chiffré LUKS valide." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. > _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#: tomb:1604 +msgid "Changing lock on tomb ::1 tomb name::" +msgstr "" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. > _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#. # save date of mount in minutes since 1970 +#: tomb:1605 #, fuzzy msgid "Old key: ::1 old key::" msgstr "Clé précédente : ::1 key::" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomb_old_pwd +#. ask_key_password "$tomb_old_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #: tomb:1621 msgid "No valid password supplied for the old key." msgstr "Aucun mot de passe valide n'a été fourni pour l'ancienne clé." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksOpen ${nstloop} ${mapper} +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. _message "New key: ::1 key file::" $TOMBKEYFILE +#: tomb:1627 msgid "Unexpected error in luksOpen." msgstr "Une erreur inattendue s'est produite lors de luksOpen." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksOpen ${nstloop} ${mapper} +#. [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. > _message "New key: ::1 key file::" $TOMBKEYFILE +#. +#. if option_is_set --tomb-pwd; then +#. tomb_new_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#: tomb:1631 msgid "New key: ::1 key file::" msgstr "Nouvelle clé : ::1 key file::" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#. ask_key_password "$tomb_new_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the new key." } +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#: tomb:1641 msgid "No valid password supplied for the new key." msgstr "Aucun mot de passe n'a été fourni pour la nouvelle clé." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#: tomb:1650 msgid "Unexpected error in luksChangeKey." msgstr "Une erreur inattendue s'est produite lors de luksChangeKey." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. > sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#: tomb:1652 msgid "Unexpected error in luksClose." msgstr "Une erreur inattendue s'est produite lors de luksClose." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. > _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#: tomb:1654 +msgid "Succesfully changed key for tomb: ::1 tomb file::" +msgstr "" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. > _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#. +#: tomb:1655 #, fuzzy msgid "The new key is: ::1 new key::" msgstr "La nouvelle clé est : ::1 key::" -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # {{{ Open +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. > [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#: tomb:1667 #, fuzzy msgid "No tomb name specified for opening." msgstr "Merci de spécifier le nom de la tombe à agrandir." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. > _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#: tomb:1669 #, fuzzy msgid "Commanded to open tomb ::1 tomb name::" msgstr "Ouverture de la tombe ::1 tomb file::" -#: warning +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#. # check file type (if its a Luks fs) +#. [[ "`file $TOMBPATH`" =~ "luks encrypted file" ]] || { +#. > _warning "::1 tomb file:: is not a valid tomb file" $TOMBFILE +#. _failure "Operation aborted." +#. } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#: tomb:1676 msgid "::1 tomb file:: is not a valid tomb file" msgstr "::1 tomb file:: n'est pas un fichier de tombe valide." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. > _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#: tomb:1686 msgid "Mountpoint not specified, using default: ::1 mount point::" -msgstr "Le point de montage n'a pas été précisé, nous utilisons donc ::1 mount point::" - -#: warning +msgstr "" +"Le point de montage n'a pas été précisé, nous utilisons donc ::1 mount " +"point::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. > _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#: tomb:1690 msgid "::1 tomb name:: is already open." msgstr "::1 tomb name:: est déjà ouverte." -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. > _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#: tomb:1691 +msgid "Here below its status is reported:" +msgstr "L'état de la tombe suit :" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. > _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#: tomb:1695 +msgid "Opening ::1 tomb file:: on ::2 mount point::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. > _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#: tomb:1702 msgid "::1 tomb file:: is not a valid Luks encrypted storage file." msgstr "::1 tomb file:: n'est pas un fichier chiffré de stockage LUKS valide." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. > _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#: tomb:1704 +msgid "This tomb is a valid LUKS encrypted device." +msgstr "Cette tombe est un dispositif chiffré LUKS valide." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#. /^Cipher mode/ {print $3} +#. /^Hash spec/ {print $3}'`) +#. > _message "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" $tombdump[1] $tombdump[2] $tombdump[3] +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#: tomb:1711 msgid "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" -msgstr "Algorithme de chiffrement \"::1 cipher::\" en mode \"::2 mode::\" et la fonction de hachage \"::3 hash::\"." +msgstr "" +"Algorithme de chiffrement \"::1 cipher::\" en mode \"::2 mode::\" et la " +"fonction de hachage \"::3 hash::\"." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#. /^Key slot.*ENABLED/ { if(zero==1) print "WARN" }'` +#. [[ "$slotwarn" == "WARN" ]] && { +#. > _warning "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." } +#. +#. # save date of mount in minutes since 1970 +#. mapdate=`date +%s` +#. +#: tomb:1718 +msgid "" +"Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." +msgstr "" +"Plusieurs serrures sont disponibles pour cette tombe. Attention : il " +"pourrait s'agit de portes dérobées." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. ask_key_password +#. } +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} +#. [[ $? = 0 ]] || { +#. > _failure "Failure mounting the encrypted file." } +#. +#. # preserve the loopdev after exit +#. lo_preserve "$nstloop" +#. +#: tomb:1742 +msgid "Failure mounting the encrypted file." +msgstr "Le montage du fichier chiffré a échoué." -#: warning -msgid "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." -msgstr "Plusieurs serrures sont disponibles pour cette tombe. Attention : il pourrait s'agit de portes dérobées." +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # array: [ cipher, keysize, loopdevice ] +#. tombstat=(`sudo cryptsetup status ${mapper} | awk ' +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. > _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#: tomb:1752 +msgid "Success unlocking tomb ::1 tomb name::" +msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. > _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#. _verbose "Tomb engraved as ::1 tomb name::" $TOMBNAME +#. sudo tune2fs -L $TOMBNAME /dev/mapper/${mapper} > /dev/null +#. +#: tomb:1755 msgid "Checking filesystem via ::1::" msgstr "Vérification du système de fichiers avec ::1::" -#: message -msgid "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" -msgstr "Dernière visite par ::1 user::(::2 tomb build) depuis ::3 tty:: sur ::4 host::" +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # TODO: safety check MOUNTOPTS +#. # safe_mount_options && #. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. > _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#: tomb:1773 +msgid "Error mounting ::1 mapper:: on ::2 tombmount::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. # safe_mount_options && #. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. > _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#: tomb:1775 +msgid "Are mount options '::1 mount options::' valid?" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#. > _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#: tomb:1780 +msgid "Cannot mount ::1 tomb name::" +msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#. +#. > _success "Success opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. local tombtty tombhost tombuid tombuser +#. +#. # print out when was opened the last time, by whom and where +#: tomb:1786 +msgid "Success opening ::1 tomb file:: on ::2 mount point::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombuid=$(_cat ${tombmount}/.uid | tr -d ' ') +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. > _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#: tomb:1800 +msgid "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" +msgstr "" +"Dernière visite par ::1 user::(::2 tomb build) depuis ::3 tty:: sur ::4 " +"host::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. > _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#. print $_UID > ${tombmount}/.uid +#: tomb:1801 msgid "on date ::1 date::" msgstr "le ::1 date::" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. +#. # Default mount options are overridden with the -o switch +#. [[ -n ${(k)OPTS[-o]} ]] && MOUNTOPTS=${OPTS[-o]} +#. +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. > _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. _warning "Cannot exec bind hooks without a mounted tomb." +#: tomb:1849 +msgid "How pitiful! A tomb, and no HOME." +msgstr "C'est pitoyable ! Une tombe, mais sans abri (HOME n'est pas défini)." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. > _warning "Cannot exec bind hooks without a mounted tomb." +#. return 1 } +#. +#. [[ -r "$mnt/bind-hooks" ]] || { +#. _verbose "bind-hooks not found in ::1 mount point::" $mnt +#: tomb:1853 +msgid "Cannot exec bind hooks without a mounted tomb." +msgstr "" +"L'exécution des ordres de montage ne peut se faire que si la tombe est " +"montée." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # better parsing for bind hooks checks for two separated words on +#. # each line, using zsh word separator array subscript +#. _bindhooks="${mapfile[${mnt}/bind-hooks]}" +#. for h in ${(f)_bindhooks}; do +#. s="${h[(w)1]}" +#. d="${h[(w)2]}" +#. > [[ "$s" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. [[ "$d" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. maps+=($s $d) +#. _verbose "bind-hook found: $s -> $d" +#. done +#: tomb:1869 msgid "bind-hooks file is broken" msgstr "Le fichier bind-hooks comporte des erreurs." -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. _verbose "bind-hook found: $s -> $d" +#. done +#. unset _bindhooks +#. +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#: tomb:1878 #, fuzzy msgid "bind-hooks map format: local/to/tomb local/to/$HOME" -msgstr "La correspondance de montage suit le format : local/à/la/tombe local/à/HOME" - -#: warning +msgstr "" +"La correspondance de montage suit le format : local/à/la/tombe local/à/HOME" + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#: tomb:1882 #, fuzzy msgid "bind-hooks map format: local/to/tomb local/to/$HOME. Rolling back" -msgstr "Les montages doivent s'annoncer localement : local/à/la/tombe local/à/HOME. Annulation." - -#: warning +msgstr "" +"Les montages doivent s'annoncer localement : local/à/la/tombe local/à/HOME. " +"Annulation." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. > _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} #: tomb:1887 #, fuzzy msgid "bind-hook target not existent, skipping ::1 home::/::2 subdir::" -msgstr "La cible du point de montage n'existe pas. Le chemin ::1 home::/::2 dir:: est ignoré." - -#: warning +msgstr "" +"La cible du point de montage n'existe pas. Le chemin ::1 home::/::2 dir:: " +"est ignoré." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. > _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} #. && mounted+=("$HOME/${maps[$dir]}") +#. fi +#: tomb:1889 #, fuzzy -msgid "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" -msgstr "L'origine du point de montage n'est pas relatif à la tombe : le chemin ::1 mount point::/::2 dir:: est ignoré." +msgid "" +"bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" +msgstr "" +"L'origine du point de montage n'est pas relatif à la tombe : le chemin ::1 " +"mount point::/::2 dir:: est ignoré." + +#. Fold: Open +#. Function: exec_safe_post_hooks +#. +#. Code sample: +#. # Only run if post-hooks has the executable bit set +#. [[ -x $mnt/post-hooks ]] || return +#. +#. # If the file starts with a shebang, run it. +#. cat $mnt/post-hooks | head -n1 | grep '^#!\s*/' &> /dev/null +#. [[ $? == 0 ]] && { +#. > _success "Post hooks found, executing as user ::1 user name::." $USERNAME +#. $mnt/post-hooks $act $mnt +#. } +#. } +#. +#: tomb:1917 +msgid "Post hooks found, executing as user ::1 user name::." +msgstr "" -#: failure +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. local tombname tombmount tombfs tombfsopts tombloop +#. local ts tombtot tombused tombavail tombpercent tombp tombsince +#. local tombtty tombhost tombuid tombuser +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "I can't see any ::1 status:: tomb, may they all rest in peace." ${1:-open} } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:1936 #, fuzzy msgid "I can't see any ::1 status:: tomb, may they all rest in peace." msgstr "Je ne vois aucune tombe ouverte, qu'ils reposent tous en paix." -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. tombuser="${ee[(ws@:@)1]}" } +#. done +#. } +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. > _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#: tomb:1969 msgid "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" -msgstr "La tombe ::1 tombname:: est ouverte sur ::2 tombmount:: avec les options ::3 tombfsopts::" - -#: message +msgstr "" +"La tombe ::1 tombname:: est ouverte sur ::2 tombmount:: avec les options ::3 " +"tombfsopts::" + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. > _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#: tomb:1972 msgid "::1 tombname:: open since ::2 tombsince::" msgstr "La tombe ::1 tombname:: est ouverte depuis ::2 tombsince::" -#: message -msgid "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" -msgstr "La tombe ::1 tombname:: a été ouverte par ::2 tombuser:: depuis ::3 tombtty:: sur ::4 tombhost::" - -#: message -msgid "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " -msgstr "La tombe ::1 tombname:: est de taille ::2 tombtot:: dont ::3 tombused:: (::5 tombpercent::%) sont utilisés. Il reste ::4 tombavail:: libres " - -#: warning +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. > _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #: tomb:1975 +msgid "" +"::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" +msgstr "" +"La tombe ::1 tombname:: a été ouverte par ::2 tombuser:: depuis ::3 " +"tombtty:: sur ::4 tombhost::" + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. > _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#: tomb:1979 +msgid "" +"::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::" +"%) is used: ::4 tombavail:: free " +msgstr "" +"La tombe ::1 tombname:: est de taille ::2 tombtot:: dont ::3 tombused:: (::5 " +"tombpercent::%) sont utilisés. Il reste ::4 tombavail:: libres " + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. > _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#: tomb:1983 msgid "::1 tombname:: warning: your tomb is almost full!" msgstr "::1 tombname:: attention : votre tombe est presque pleine !" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#. for h in ${mounted_hooks}; do +#. > _message "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" #. $tombname "`basename ${h[(ws:;:)1]}`" ${h[(ws:;:)2]} +#. done +#. done +#. } +#: tomb:1989 msgid "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" msgstr "::1 tombname:: montage de ::2 hookname:: sur ::3 hookdest::" -#: failure +#. Fold: List +#. Function: list_tomb_binds +#. +#. Code sample: +#. # list_tomb_binds +#. # print out an array of mounted bind hooks (internal use) +#. # format is semi-colon separated list of attributes +#. # needs an argument: name of tomb whose hooks belong +#. list_tomb_binds() { +#. [[ -z "$1" ]] && { +#. > _failure "Internal error: list_tomb_binds called without argument." } +#. +#. # list bind hooks on util-linux 2.20 (Debian 7) +#. mount -l #. | awk -vtomb="$1" ' +#: tomb:2044 msgid "Internal error: list_tomb_binds called without argument." -msgstr "Erreur interne : la fonction list_tomb_binds a été appelée sans argument." - -#: failure +msgstr "" +"Erreur interne : la fonction list_tomb_binds a été appelée sans argument." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # {{{ Index and search +#. +#. # index files in all tombs for search +#. # $1 is optional, to specify a tomb +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. > _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#: tomb:2076 msgid "Cannot index tombs on this system: updatedb (mlocate) not installed." -msgstr "L'indexation des fichiers de la tombe ne peut se faire sur ce système : updatedb (mlocate) n'est pas installé." - -#: warning +msgstr "" +"L'indexation des fichiers de la tombe ne peut se faire sur ce système : " +"updatedb (mlocate) n'est pas installé." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. > _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#: tomb:2080 msgid "Cannot use GNU findutils for index/search commands." -msgstr "Impossible d'utiliser GNU findutils pour les commandes d'indexation et de recherche." - -#: failure +msgstr "" +"Impossible d'utiliser GNU findutils pour les commandes d'indexation et de " +"recherche." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. > _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#: tomb:2082 msgid "Index command needs 'mlocate' to be installed." -msgstr "La commande d'indexation nécessite que le programme 'mlocate' soit installé." - -#: failure +msgstr "" +"La commande d'indexation nécessite que le programme 'mlocate' soit installé." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. > _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#: tomb:2090 #, fuzzy msgid "There seems to be no open tomb engraved as [::1::]" msgstr "Il ne semble pas y avoir de tombe ouverte comme [::1 tomb name::]" -#: message -msgid "Skipping ::1 tomb name:: (.noindex found)." -msgstr "::1 tomb name:: comporte in fichier .noindex : ses fichiers n'apparaîtront pas dans les résultats de recherche." +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. > _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#: tomb:2092 +msgid "I can't see any open tomb, may they all rest in peace." +msgstr "Je ne vois aucune tombe ouverte, qu'ils reposent tous en paix." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#. { command -v unoconv 1>/dev/null 2>/dev/null } && { +#. unoconv -l 2>/dev/null & +#: tomb:2094 +msgid "Creating and updating search indexes." +msgstr "" + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. > _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#: tomb:2107 +msgid "Skipping ::1 tomb name:: (.noindex found)." +msgstr "" +"::1 tomb name:: comporte in fichier .noindex : ses fichiers n'apparaîtront " +"pas dans les résultats de recherche." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. > _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#: tomb:2109 msgid "Indexing ::1 tomb name:: filenames..." msgstr "Index des fichiers dans ::1 tomb name:: en cours..." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. > _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#: tomb:2114 msgid "Indexing ::1 tomb name:: contents..." msgstr "Index des contenus de ::1 tomb name:: en cours..." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. > _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#. DefaultContents TXT* +#. IndexDir $tombmount +#: tomb:2116 +msgid "Generating a new swish-e configuration file: ::1 swish conf::" +msgstr "" + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. } +#. +#. swish-e -c ${tombmount}/.swishrc -S fs -v3 +#. +#. } +#. +#. > _message "Search index updated." +#. done +#. } +#. search_tombs() { +#. { command -v locate 1>/dev/null 2>/dev/null } || { +#: tomb:2190 +msgid "Search index updated." +msgstr "L'index de recherche a été mis à jour." + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Searching for: ::1::" ${(f)@} +#. for t in ${mounted_tombs}; do +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:2210 +msgid "Searching for: ::1::" +msgstr "" + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. > _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#: tomb:2218 msgid "Searching filenames in tomb ::1 tomb name::" msgstr "Recherche parmi les fichiers dans la tombe ::1 tomb name::" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. > _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#: tomb:2220 msgid "Matches found: ::1 matches::" msgstr "Résultats trouvés : ::1 matches::" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. > _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#: tomb:2225 msgid "Searching contents in tomb ::1 tomb name::" msgstr "Recherche parmi les contenus de la tombe ::1 tomb name::" -#: warning +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. > _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#: tomb:2228 msgid "Skipping tomb ::1 tomb name::: not indexed." msgstr "La tombe ::1 tomb name:: n'est pas indexée, et donc ignorée." -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. > _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#. +#: tomb:2229 +msgid "Run 'tomb index' to create indexes." +msgstr "Exécuter 'tomb index' pour générer les index." + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. > _message "Search completed." +#. } +#. +#. # }}} - Index and search +#. +#: tomb:2231 +msgid "Search completed." +msgstr "La recherche est terminée." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # {{{ Resize +#. +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. > _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#: tomb:2242 #, fuzzy msgid "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." msgstr "Agrandissement de la tombe ::1 tomb file:: ::2 size::s] Mo." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. > [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#: tomb:2244 +msgid "No tomb name specified for resizing." +msgstr "Merci de spécifier le nom de la tombe à agrandir." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. > [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. _failure "Aborting operations: new size was not specified, use -s" } +#: tomb:2245 msgid "Cannot find ::1::" msgstr "::1:: reste introuvable." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. > _failure "Aborting operations: new size was not specified, use -s" } +#. +#. is_valid_tomb $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#: tomb:2249 msgid "Aborting operations: new size was not specified, use -s" msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. local oldtombsize=$(( `stat -c %s "$TOMBPATH" 2>/dev/null` / 1048576 )) +#. local mounted_tomb=`mount -l | +#. awk -vtomb="[$TOMBNAME]" '/^\/dev\/mapper\/tomb/ { if($7==tomb) print $1 }'` +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. > _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#: tomb:2261 msgid "Please close the tomb ::1 tomb name:: before trying to resize it." msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. > _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#: tomb:2264 msgid "You must specify the new size of ::1 tomb name::" msgstr "Vous devez spécifier la nouvelle taille de ::1 tomb name::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. > [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. _failure "The new size must be greater then old tomb size." } +#. +#: tomb:2266 +msgid "Size is not an integer." +msgstr "La taille doit être un nombre entier." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. > _failure "The new size must be greater then old tomb size." } +#. +#. delta="$(( $newtombsize - $oldtombsize ))" +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#: tomb:2269 +msgid "The new size must be greater then old tomb size." +msgstr "La nouvelle taille doit être supérieure à l'ancienne." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#. +#. _verbose "Data dump using ::1:: from /dev/urandom" ${DD[1]} +#. ${=DD} if=/dev/urandom bs=1048576 count=${delta} >> $TOMBPATH +#. +#. [[ $? == 0 ]] || { +#. > _failure "Error creating the extra resize ::1 size::, operation aborted." $tmp_resize } +#. +#. { option_is_set --tomb-pwd } && { +#. tomb_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_pwd +#: tomb:2279 #, fuzzy msgid "Error creating the extra resize ::1 size::, operation aborted." -msgstr "Erreur lors de la création de la tombe ::1 dir::/::2 tomb file::. Opération annulée." - -#: failure +msgstr "" +"Erreur lors de la création de la tombe ::1 dir::/::2 tomb file::. Opération " +"annulée." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. mapper="tomb.$TOMBNAME.$mapdate.$(basename $nstloop)" +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} || { +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. > _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#: tomb:2300 #, fuzzy msgid "cryptsetup failed to resize ::1 mapper::" msgstr "resize2fs n'a pas pu redimensionner ::1 mapper::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. > _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#: tomb:2303 msgid "e2fsck failed to check ::1 mapper::" msgstr "e2fsck n'a pas pu vérifier ::1 mapper::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. > _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#. # close and free the loop device +#. sudo cryptsetup luksClose "${mapper}" +#. +#: tomb:2306 msgid "resize2fs failed to resize ::1 mapper::" msgstr "resize2fs n'a pas pu redimensionner ::1 mapper::" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts`) +#. else +#. mounted_tombs=(`list_tomb_mounts $1`) +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#: tomb:2330 +msgid "There is no open tomb to be closed." +msgstr "Il n'y a pas de tombe à fermer." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. > _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#: tomb:2333 +msgid "Too many tombs mounted, please specify one (see tomb list)" +msgstr "Trop de tombes sont montées, merci d'en choisir une (voir 'tomb list')" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. > _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#: tomb:2334 +msgid "or issue the command 'tomb close all' to close them all." +msgstr "ou bien exécuter 'tomb close all' pour les fermer toutes." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. > _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#: tomb:2350 #, fuzzy msgid "Tomb not found: ::1 tomb file::" msgstr "Tombe introuvable : ::1 tomb name::" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. > _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #: tomb:2351 +msgid "Please specify an existing tomb." +msgstr "Merci d'indiquer une tombe existante." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#: tomb:2355 +msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" +msgstr "" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. > _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #: tomb:2357 +msgid "Kill all processes busy inside the tomb." +msgstr "Exécution (sommaire) de tous les processus en cours dans la tombe." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. > _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount } +#. +#: tomb:2359 msgid "Cannot slam the tomb ::1 tomb name::" msgstr "La tombe ::1 tomb name:: ne peut pas être fermée !" -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. > _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount } +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#: tomb:2361 msgid "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" msgstr "Fermeture de la tombe ::1 tomb name:: montée sur ::2 mount point::." -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. > _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#: tomb:2369 msgid "Closing tomb bind hook: ::1 hook::" msgstr "Retrait du point de montage : ::1 hook::" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#: tomb:2372 +msgid "Slamming tomb: killing all processes using this hook." +msgstr "" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. > _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#: tomb:2375 #, fuzzy msgid "Cannot slam the bind hook ::1 hook::" msgstr "Quelque chose coince à ::1 mount point::." -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. > _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#. done +#. +#. # Execute post-hooks for eventual cleanup +#: tomb:2378 #, fuzzy msgid "Tomb bind hook ::1 hook:: is busy, cannot close tomb." -msgstr "Le point de montage ::1 mount point:: est occupé et ne peut pas être fermé." +msgstr "" +"Le point de montage ::1 mount point:: est occupé et ne peut pas être fermé." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. # Execute post-hooks for eventual cleanup +#. { option_is_set -n } || { +#. exec_safe_post_hooks ${tombmount%%/} close } +#. +#. _verbose "Performing umount of ::1 mount point::" $tombmount +#. sudo umount ${tombmount} +#. > [[ $? = 0 ]] || { _warning "Tomb is busy, cannot umount!"; return 1 } +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#: tomb:2388 +msgid "Tomb is busy, cannot umount!" +msgstr "La tombe est occupée et ne peut pas être démontée !" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#. sudo cryptsetup luksClose $mapper +#. [[ $? == 0 ]] || { +#. > _failure "Error occurred in cryptsetup luksClose ::1 mapper::" $mapper } +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#: tomb:2395 msgid "Error occurred in cryptsetup luksClose ::1 mapper::" -msgstr "Une erreur s'est produite lors de l'exécution de cryptsetup luksClose ::1 mapper::." +msgstr "" +"Une erreur s'est produite lors de l'exécution de cryptsetup luksClose ::1 " +"mapper::." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#. _verbose "/dev/$tombloop was already closed." } +#. +#. > _success "Tomb ::1 tomb name:: closed: your bones will rest in peace." $tombname +#. +#. done # loop across mounted tombs +#. +#. return 0 +#: tomb:2402 +msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." +msgstr "" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. return 1 +#. fi +#. return 0 +#. fi +#. unset discardme +#. if ! zparseopts -M -E -D -Adiscardme ${every_opts}; then +#. > _failure "Error parsing." +#. return 127 +#. fi +#. unset discardme +#. subcommand=$1 +#: tomb:2522 +msgid "Error parsing." +msgstr "Erreur de syntaxe." -#: warning +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. subcommand=$1 +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. > _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#: tomb:2532 msgid "There's no such command \"::1 subcommand::\"." msgstr "La commande \"::1 subcommand::\" n'est pas implémentée." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. > exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#. +#: tomb:2533 #, fuzzy msgid "Please try -h for help." msgstr "Essayer -h pour obtenir l'aide." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # zsh magic: ${=string} will split to multiple arguments when spaces occur +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. > _warning "Some error occurred during option processing." +#. exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#: tomb:2545 +msgid "Some error occurred during option processing." +msgstr "L'interprétation des options a échoué." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. _warning "Some error occurred during option processing." +#. > exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#. ok=0 +#: tomb:2546 msgid "See \"tomb help\" for more info." msgstr "Voir \"tomb help\" pour plus d'info" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. for arg in $*; do +#. if [[ $arg == '--' || $arg == '-' ]]; then +#. ok=1 +#. continue #it shouldnt be appended to PARAM +#. elif [[ $arg[1] == '-' ]]; then +#. if [[ $ok == 0 ]]; then +#. > exitv=127 _failure "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" $arg $subcommand +#. fi +#. fi +#. PARAM+=$arg +#. done +#: tomb:2558 msgid "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" msgstr "" -#: failure -msgid "Resize2fs not installed: cannot resize tombs." -msgstr "Resize2fs n'est pas installé: impossible de changer la taille d'une tombe" +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Use colors unless told not to +#. { ! option_is_set --no-color } && { autoload -Uz colors && colors } +#. # Some options are only available during insecure mode +#. { ! option_is_set --unsafe } && { +#. for opt in --tomb-pwd --use-urandom --tomb-old-pwd; do +#. { option_is_set $opt } && { +#. > exitv=127 _failure "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\nIf you really want so, add --unsafe" $opt } +#. done +#. } +#. # read -t or --tmp flags to set a custom temporary directory +#. option_is_set --tmp && TMPPREFIX=$(option_value --tmp) +#: tomb:2574 +msgid "" +"You specified option ::1 option::, which is DANGEROUS and should only be " +"used for testing\n" +"If you really want so, add --unsafe" +msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. help) +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. > _warning "The create command is deprecated, please use dig, forge and lock instead." +#. _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#: tomb:2608 +msgid "" +"The create command is deprecated, please use dig, forge and lock instead." +msgstr "" +"La commande \"create\" est obsolète : il convient à présent d'utiliser \"dig" +"\", \"forge\", et \"lock\"." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. _warning "The create command is deprecated, please use dig, forge and lock instead." +#. > _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#. # CREATE Step 1: dig -s NN file.tomb +#: tomb:2609 +msgid "For more informations see Tomb's manual page (man tomb)." +msgstr "" +"Pour de plus amples informations, se référer au manuel de Tomb (man tomb)." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. umount_tomb $PARAM[1] +#. ;; +#. +#. # Grow tomb's size +#. resize) +#. [[ $RESIZER == 0 ]] && { +#. > _failure "Resize2fs not installed: cannot resize tombs." } +#. resize_tomb $PARAM[1] +#. ;; +#. +#. ## Contents manipulation +#: tomb:2643 +msgid "Resize2fs not installed: cannot resize tombs." +msgstr "" +"Resize2fs n'est pas installé: impossible de changer la taille d'une tombe" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. ## Locking operations +#. +#. # Export key to QR Code +#. engrave) +#. [[ $QRENCODE == 0 ]] && { +#. > _failure "QREncode not installed: cannot engrave keys on paper." } +#. engrave_key ${=PARAM} +#. ;; +#. +#. # Change password on existing key +#: tomb:2669 msgid "QREncode not installed: cannot engrave keys on paper." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. change_tomb_key ${=PARAM} +#. ;; +#. +#. # STEGANOGRAPHY: hide key inside an image +#. bury) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot bury keys into images." } +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#: tomb:2686 msgid "Steghide not installed: cannot bury keys into images." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#. exhume) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot exhume keys from images." } +#. exhume_key $PARAM[1] +#. ;; +#. +#. ## Internal commands useful to developers +#: tomb:2693 msgid "Steghide not installed: cannot exhume keys from images." msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Ask user for a password interactively +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. > _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#: tomb:2707 msgid "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" msgstr "" -#: print -msgid " Copyright (C) 2007-2014 Dyne.org Foundation, License GNU GPL v3+" +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. > _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#: tomb:2709 +msgid " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. > _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#: tomb:2710 msgid " This is free software: you are free to change and redistribute it" msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. > _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#: tomb:2711 +msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" +msgstr "" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. > _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#: tomb:2716 msgid " This source code is distributed in the hope that it will be useful," msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. > _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#: tomb:2717 msgid " but WITHOUT ANY WARRANTY; without even the implied warranty of" msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. > _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#: tomb:2718 msgid " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." msgstr "" -#: print -msgid "System utils:" -msgstr "" - -#: warning -msgid "Command \"::1 subcommand::\" not recognized." -msgstr "La command \"::1 subcommand::\" n'est pas reconnue." - -#: print -msgid " passwd change the password of a KEY (needs old pass)" -msgstr "" - -#: print -msgid " setkey change the KEY locking a TOMB (needs old key and pass)" -msgstr "" - -#: print -msgid " // Backup on paper:" -msgstr "" - -#: print -msgid " // Steganography:" -msgstr "" - -#: print -msgid " bury hide a KEY inside a JPEG image (for use with -k)" -msgstr "" - -#: print -msgid " exhume extract a KEY from a JPEG image (prints to stdout)" -msgstr "" - -#: failure -msgid "Exhume failed, no image specified" -msgstr "" - -#: print -msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" -msgstr "" - -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. > _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#. _print "\000" +#. cat <<EOF +#: tomb:2720 msgid " When in need please refer to <http://dyne.org/support>." msgstr "" -#: print -msgid "Optional utils:" -msgstr "" - -#: failure -msgid "Fatal error setting the permission umask for temporary files" -msgstr "" - -#: failure -msgid "Fatal error setting ownership on temporary file: ::1 temp file::" -msgstr "" - -#: warning -msgid "cleartext key from stdin selected: this is unsafe." -msgstr "" - -#: failure -msgid "please use --unsafe if you really want to do this." -msgstr "" - -#: warning -msgid "received key in cleartext from stdin (unsafe mode)" -msgstr "" - -#: failure -msgid "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\n" -"If you really want so, add --unsafe" -msgstr "" - -#: failure -msgid "Failing to identify the user who is calling us" -msgstr "" - -#: failure -msgid "Fatal error creating the temporary directory: ::1 temp dir::" -msgstr "" - -#: failure -msgid "Someone is messing up with us trying to hijack temporary files." -msgstr "" - -#: success -msgid "All your swaps are belong to crypt. Good." -msgstr "" - -#: success -msgid "Changing password for ::1 key file::" -msgstr "" - -#: success -msgid "Your passphrase was successfully updated." -msgstr "" - -#: success -msgid "Using KDF, iterations: ::1 microseconds::" -msgstr "" - -#: success -msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" -msgstr "" - -#: success -msgid "Tomb key encoded succesfully into image ::1 image file::" -msgstr "" - -#: success -msgid "Key succesfully exhumed to ::1 key::." -msgstr "" - -#: success -msgid "Rendering a printable QRCode for key: ::1 tomb key file::" -msgstr "" - -#: success -msgid "Operation successful:" -msgstr "" - -#: success -msgid "Creating a new tomb in ::1 tomb path::" -msgstr "" - -#: success -msgid "Done digging ::1 tomb name::" -msgstr "" - -#: success -msgid "Choose the password of your key: ::1 tomb key::" -msgstr "" - -#: success -msgid "Your key is ready:" -msgstr "" - -#: success -msgid "Locking ::1 tomb file:: with ::2 tomb key file::" -msgstr "" - -#: success -msgid "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" -msgstr "" - -#: success -msgid "Changing lock on tomb ::1 tomb name::" -msgstr "" - -#: success -msgid "Succesfully changed key for tomb: ::1 tomb file::" -msgstr "" - -#: success -msgid "Opening ::1 tomb file:: on ::2 mount point::" -msgstr "" - -#: success -msgid "Success unlocking tomb ::1 tomb name::" -msgstr "" - -#: success -msgid "Success opening ::1 tomb file:: on ::2 mount point::" -msgstr "" - -#: success -msgid "Post hooks found, executing as user ::1 user name::." -msgstr "" - -#: success -msgid "Creating and updating search indexes." -msgstr "" - -#: message -msgid "Generating a new swish-e configuration file: ::1 swish conf::" -msgstr "" - -#: success -msgid "Searching for: ::1::" -msgstr "" - -#: success -msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" -msgstr "" - -#: success -msgid "Slamming tomb: killing all processes using this hook." -msgstr "" - -#: success -msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." -msgstr "" - -#: warning -msgid "Pinentry error: ::1 error::" -msgstr "" - -#: warning -msgid "Empty password" +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. > _print "System utils:" +#. _print "\000" +#. cat <<EOF +#. `sudo -V | head -n1` +#. `cryptsetup --version` +#: tomb:2722 +msgid "System utils:" msgstr "" -#: failure -msgid "Cannot find pinentry-curses and no DISPLAY detected." +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. `cryptsetup --version` +#. `pinentry --version` +#. `gpg --version | head -n1` - key forging algorithms (GnuPG symmetric ciphers): +#. `list_gnupg_ciphers` +#. EOF +#. _print "\000" +#. > _print "Optional utils:" +#. _print "\000" +#. _list_optional_tools version +#. return 0 +#. } +#: tomb:2732 +msgid "Optional utils:" msgstr "" -#: warning -msgid "Detected DISPLAY, but only pinentry-curses is found." -msgstr "" +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. } +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. > _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#: tomb:2742 +msgid "Command \"::1 subcommand::\" not recognized." +msgstr "La command \"::1 subcommand::\" n'est pas reconnue." -#: failure -msgid "Cannot find any pinentry: impossible to ask for password." -msgstr "" +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. > _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#. return $? +#: tomb:2743 +msgid "Try -h for help." +msgstr "Essayer -h pour obtenir l'aide." +#~ msgid " -o mount options used to open (default: rw,noatime,nodev)" +#~ msgstr "" +#~ " -o options de montage à l'ouverture (par défaut : rw,noatime," +#~ "nodev)" diff --git a/extras/po/ru.po b/extras/po/ru.po @@ -1,1128 +1,5477 @@ msgid "" msgstr "" +"Project-Id-Version: Tomb the Crypto Undertaker\n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: POEditor.com\n" -"Project-Id-Version: Tomb the Crypto Undertaker\n" -"Language: ru\n" - -#: failure -msgid "Operation aborted." -msgstr "Операция отменена." - -#: warning -msgid "often occurs on VPS and kernels that don't provide the loop module." -msgstr "часто возникает на VPS и ядрах, которые не имеют модуля loop." - -#: warning -msgid "It is impossible to use Tomb on this machine at this conditions." -msgstr "Невозможно использовать Tomb на этой машине при таких условиях." - -#: message -msgid "Waiting for the key to be piped from stdin... " -msgstr "Ожидание передачи ключа через стандартный ввод..." - -#: failure -msgid "This operation requires a key file to be specified using the -k option." -msgstr "Эта операция требует указания файла ключа с помощью опции -k." - -#: failure -msgid "Key not found, specify one using -k." -msgstr "Ключ не найден, укажите его с помощью опции -k." - -#: warning -msgid "User aborted password dialog." -msgstr "Пользователь отменил диалог пароля." - -#: message -msgid "Password OK." -msgstr "Верный пароль." - -#: failure -msgid "Error: the newly generated keyfile does not seem valid." -msgstr "Ошибка: сгенерированный файл ключа неверен." - -#: failure -msgid "User aborted." -msgstr "Отменено пользователем." - -#: failure -msgid "You set empty password, which is not possible." -msgstr "Вы указали пустой пароль, так нельзя." - -#: failure -msgid "Wrong argument for --kdf: must be an integer number (iteration seconds)." -msgstr "Неверный аргумент для --kdf: должно быть указано целое число (секунд итерации)." - -#: failure -msgid "gpg (GnuPG) is not found, Tomb cannot function without it." -msgstr "gpg (GnuPG) не найден, Tomb не может работать без него." - -#: message -msgid "Please confirm the key password for the encoding" -msgstr "Пожалуйста, подтвердите пароль ключа для шифрования" - -#: warning -msgid "Wrong password supplied." -msgstr "Указан неверный пароль." - -#: failure -msgid "You shall not bury a key whose password is unknown to you." -msgstr "Вам не захоронить ключ, чей пароль не известен Вам." - -#: warning -msgid "Encoding error: steghide reports problems." -msgstr "Ошибка шифрования: steghide сообщает о проблемах." - -#: warning -msgid "Make explicit use of --force to overwrite." -msgstr "Явно укажите опцию --force для перезаписи." - -#: warning -msgid "Use of --force selected: overwriting." -msgstr "Указана опция --force: перезаписываю." - -#: failure -msgid "A filename needs to be specified using -k to forge a new key." -msgstr "Необходимо указать имя файла через опцию -k, чтобы выковать новый ключ." - -#: failure -msgid "Forging this key would overwrite an existing file. Operation aborted." -msgstr "Выковка этого ключа перезапишет существующий файл. Операция отменена." - -#: message -msgid "This operation takes time, keep using this computer on other tasks," -msgstr "Эта операция займет некоторое время, выполняйте пока другие задачи," - -#: message -msgid "once done you will be asked to choose a password for your tomb." -msgstr "по завершении Вас вопросят ввести пароль для гробницы." - -#: message -msgid "To make it faster you can move the mouse around." -msgstr "Чтобы ускорить операцию, подвигайте мышку." - -#: message -msgid "If you are on a server, you can use an Entropy Generation Daemon." -msgstr "Если Вы на сервере, можно использовать демон генерации энтропии." - -#: warning -msgid "Cannot generate encryption key." -msgstr "Не могу сгенерировать ключ шифрования." - -#: message -msgid "(You can also change it later using 'tomb passwd'.)" -msgstr "(Его можно потом изменить с помощью 'tomb passwd'.)" - -#: warning -msgid "The key does not seem to be valid." -msgstr "Ключ неверен." - -#: warning -msgid "Dumping contents to screen:" -msgstr "Выгрузка содержимого на экран:" - -#: failure -msgid "Size argument missing, use -s" -msgstr "Отсутствует размер, укажите его с помощью -s" - -#: warning -msgid "A tomb exists already. I'm not digging here:" -msgstr "Гробница существует. Я не буду копать здесь:" - -#: message -msgid "Your tomb is not yet ready, you need to forge a key and lock it:" -msgstr "Ваша гробница пока не готова, необходимо выковать ключ и запереть ее:" - -#: warning -msgid "No tomb specified for locking." -msgstr "Не указана гробница для запирания." - -#: warning -msgid "Usage: tomb lock file.tomb file.tomb.key" -msgstr "Использование: tomb lock file.tomb file.tomb.key" - -#: failure -msgid "There is no tomb here. You have to it dig first." -msgstr "Здесь нет гробницы. Сначала выкопайте ее." - -#: message -msgid "Checking if the tomb is empty (we never step on somebody else's bones)." -msgstr "Проверяю, пуста ли гробница (мы никогда не ходим по чужим костям)." - -#: warning -msgid "The tomb was already locked with another key." -msgstr "Гробница уже заперта другим ключом." - -#: failure -msgid "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." -msgstr "Операция отменена. Я не могу запереть уже запертую гробницу. Выкопайте новую." -#: message -msgid "Fine, this tomb seems empty." -msgstr "Так, эта гробница, вроде как, пуста." - -#: message -msgid "Formatting Luks mapped device." -msgstr "Форматирую устройство LUKS." - -#: warning -msgid "cryptsetup luksFormat returned an error." -msgstr "cryptsetup luksFormat вернул ошибку." - -#: message -msgid "Formatting your Tomb with Ext3/Ext4 filesystem." -msgstr "Форматирую Вашу гробницу в файловую систему Ext3/Ext4." - -#: warning -msgid "Tomb format returned an error." -msgstr "Tomb format вернул ошибку." - -#: message -msgid "Here below its status is reported:" -msgstr "Ниже назодится отчет о его статусе:" - -#: message -msgid "This tomb is a valid LUKS encrypted device." -msgstr "Эта гробница - верное зашифрованное устройство LUKS." - -#: failure -msgid "Failure mounting the encrypted file." -msgstr "Не удалось примонтировать зашифрованный файл." - -#: warning -msgid "How pitiful! A tomb, and no HOME." -msgstr "Как жаль! Гробница есть, но нет HOME." - -#. Don't know how to correctly translate "bind hook". -#: warning -#, fuzzy -msgid "Cannot exec bind hooks without a mounted tomb." -msgstr "Невозможно совершить привязки без примонтированной гробницы." - -#: failure -msgid "I can't see any open tomb, may they all rest in peace." -msgstr "Я не вижу открытых гробниц, да упокоятся они все с миром." - -#: message -msgid "Search index updated." -msgstr "Поисковый индекс обновлен." - -#: warning -msgid "Run 'tomb index' to create indexes." -msgstr "Запустите 'tomb index' для создания индексов." - -#: message -msgid "Search completed." -msgstr "Поиск завершен." - -#: failure -msgid "No tomb name specified for resizing." -msgstr "Не указано имя гробницы для изменения размера." - -#: failure -msgid "Size is not an integer." -msgstr "Размер не целое число." - -#: failure -msgid "The new size must be greater then old tomb size." -msgstr "Новый размер гробницы должен быть больше старого." - -#: failure -msgid "There is no open tomb to be closed." -msgstr "Нет открытой гробницы для закрытия." - -#: warning -msgid "Too many tombs mounted, please specify one (see tomb list)" -msgstr "Примонтировано слишком много гробниц, пожалуйста, укажите точнее (см. tomb list)" - -#: warning -msgid "or issue the command 'tomb close all' to close them all." -msgstr "или выполните команду 'tomb close all', чтобы закрыть их все." - -#: warning -msgid "Please specify an existing tomb." -msgstr "Пожалуйста, укажите существующую гробницу." - -#: message -msgid "Kill all processes busy inside the tomb." -msgstr "Убиваю все процессы, занятые в гробнице" +#. Fold: Safety functions +#. Function: _whoami +#. +#. Code sample: +#. +#. # Set username from UID or environment +#. _USER=$SUDO_USER +#. [[ "$_USER" = "" ]] && { _USER=$USERNAME } +#. [[ "$_USER" = "" ]] && { _USER=$(id -u) } +#. [[ "$_USER" = "" ]] && { +#. > _failure "Failing to identify the user who is calling us" } +#. +#. # Get GID from option -G or the environment +#. option_is_set -G #. && _GID=$(option_value -G) || _GID=$(id -g $_USER) +#: tomb:189 +msgid "Failing to identify the user who is calling us" +msgstr "Не удалось определить пользователя, вызвавшего меня" -#: warning -msgid "Tomb is busy, cannot umount!" -msgstr "Гробница занята, не могу отмонтировать!" +#. Fold: Safety functions +#. Function: _plot +#. +#. Code sample: +#. TOMBFILE=$(basename $TOMBPATH) +#. +#. # The tomb name is TOMBFILE without an extension. +#. # It can start with dots: ..foo.tomb -> ..foo +#. TOMBNAME="${TOMBFILE%\.[^\.]*}" +#. [[ -z $TOMBNAME ]] && { +#. > _failure "Tomb won't work without a TOMBNAME." } +#. +#. # Normalize tomb name +#. TOMBFILE="$TOMBNAME.tomb" +#. +#: tomb:237 +msgid "Tomb won't work without a TOMBNAME." +msgstr "Tomb не будет работать без ИМЕНИ_ГРОБНИЦЫ." -#: failure -msgid "Error parsing." -msgstr "Ошибка парсинга." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # Provide a random filename in shared memory +#. _tmp_create() { +#. [[ -d "$TMPPREFIX" ]] || { +#. # we create the tempdir with the sticky bit on +#. sudo mkdir -m 1777 "$TMPPREFIX" +#. > [[ $? == 0 ]] || _failure "Fatal error creating the temporary directory: ::1 temp dir::" "$TMPPREFIX" +#. } +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#: tomb:252 +msgid "Fatal error creating the temporary directory: ::1 temp dir::" +msgstr "Критическая ошибка при создании временной директории: ::1 temp dir::" -#: warning -msgid "Some error occurred during option processing." -msgstr "Произошла какая-то ошибка при обработке опций." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#: tomb:260 +msgid "Fatal error setting the permission umask for temporary files" +msgstr "Критическая ошибка при задании маски прав для временных файлов" -#: warning -msgid "The create command is deprecated, please use dig, forge and lock instead." -msgstr "Команда create устарела, пожалуйста, используйте dig, forge и lock." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. > _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#: tomb:263 +msgid "Someone is messing up with us trying to hijack temporary files." +msgstr "Кто-то наглый пытается похитить наши временные файлы." -#: warning -msgid "For more informations see Tomb's manual page (man tomb)." -msgstr "Для большей информации обратитесь к руководству Tomb (man tomb)." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#: tomb:267 +msgid "Fatal error creating a temporary file: ::1 temp file::" +msgstr "Критическая ошибка при создании временного файла ::1 temp file::" -#: message -msgid "Try -h for help." -msgstr "Используйте -h для вызова справки." +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#. _verbose "Created tempfile: ::1 temp file::" "$tfile" +#. TOMBTMP="$tfile" +#. TOMBTMPFILES+=("$tfile") +#: tomb:270 +msgid "Fatal error setting ownership on temporary file: ::1 temp file::" +msgstr "" +"Критическая ошибка при задании владельца временного файла ::1 temp file::" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. r=1 +#. is_crypt=`sudo dmsetup status "$s" | awk '/crypt/ {print $3}'` +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. > _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#: tomb:316 +msgid "An active swap partition is detected..." +msgstr "" -#: failure -msgid "Tomb won't work without a TOMBNAME." -msgstr "Tomb не будет работать без ИМЕНИ_ГРОБНИЦЫ." +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. > _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#: tomb:318 +msgid "All your swaps are belong to crypt. Good." +msgstr "All your swaps are belong to crypt. Хорошо." -#: failure -msgid "Fatal error creating a temporary file: ::1 temp file::" -msgstr "Критическая ошибка при создании временного файла ::1 temp file::" +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. > _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#: tomb:320 +msgid "This poses a security risk." +msgstr "" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. > _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#: tomb:321 msgid "You can deactivate all swap partitions using the command:" msgstr "Вы можете отключить все разделы подкачки с помощью этой команды:" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. > _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#: tomb:322 msgid " swapoff -a" msgstr " swapoff -a" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. > _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#. } +#: tomb:323 msgid "But if you want to proceed like this, use the -f (force) flag." -msgstr "Но если Вы все равно хотите продолжить работу, используйте флаг -f (force)." +msgstr "" +"Но если Вы все равно хотите продолжить работу, используйте флаг -f (force)." + +#. Fold: Safety functions +#. Function: _check_swap +#. +#. Code sample: +#. _ensure_safe_swap +#. case $? in +#. 0|2) # No, or encrypted swap +#. return 0 +#. ;; +#. *) # Unencrypted swap +#. > _failure "Operation aborted." +#. ;; +#. esac +#. fi +#. } +#: tomb:342 +msgid "Operation aborted." +msgstr "Операция отменена." + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find pinentry-curses and no DISPLAY detected." +#. fi +#. +#. else # a DISPLAY is found to be active +#. +#: tomb:379 +msgid "Cannot find pinentry-curses and no DISPLAY detected." +msgstr "" + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. EOF` +#. +#. else +#. +#. if _is_found "pinentry-curses"; then +#. +#. > _warning "Detected DISPLAY, but only pinentry-curses is found." +#. output=`cat <<EOF | pinentry-curses +#. OPTION ttyname=$TTY +#. OPTION lc-ctype=$LANG +#. SETTITLE $title +#: tomb:432 +msgid "Detected DISPLAY, but only pinentry-curses is found." +msgstr "" + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find any pinentry: impossible to ask for password." +#. fi +#. +#. fi +#. +#: tomb:442 +msgid "Cannot find any pinentry: impossible to ask for password." +msgstr "" + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. fi # end of DISPLAY block +#. +#. # parse the pinentry output +#. for i in ${(f)output}; do +#. [[ "$i" =~ "^ERR.*" ]] && { +#. > _warning "Pinentry error: ::1 error::" ${i[(w)3]} +#. print "canceled" +#. return 1 } +#. +#. # here the password is found +#: tomb:452 +msgid "Pinentry error: ::1 error::" +msgstr "Ошибка pinentry: ::1 error::" + +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. # here the password is found +#. [[ "$i" =~ "^D .*" ]] && password="${i##D }" +#. done +#. +#. [[ "$password" = "" ]] && { +#. > _warning "Empty password" +#. print "empty" +#. return 1 } +#. +#. print "$password" +#: tomb:461 +msgid "Empty password" +msgstr "Пустой пароль" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Check if a filename is a valid tomb +#. is_valid_tomb() { +#. _verbose "is_valid_tomb ::1 tomb file::" $1 +#. +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. > _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#: tomb:477 msgid "Tomb file is missing from arguments." msgstr "В аргументах отсутствует файл гробницы." -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. > _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#: tomb:481 msgid "Tomb file not found: ::1 tomb file::" msgstr "Не найден файл гробницы: ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. > _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#: tomb:483 msgid "Tomb file is not a regular file: ::1 tomb file::" msgstr "Файл гробницы не является обычным файлом: ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. > _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#: tomb:485 msgid "Tomb file is empty (zero length): ::1 tomb file::" msgstr "Файл гробницы пуст (нулевая длина): ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. > _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#: tomb:487 msgid "Tomb file is not writable: ::1 tomb file::" msgstr "Файл гробницы недоступен для записи: ::1 tomb file::" -#: warning +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#. +#. # Tomb file may be a LUKS FS (or we are creating it) +#. [[ "`file $1`" =~ "luks encrypted file" ]] || { +#. > _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#: tomb:495 msgid "File is not yet a tomb: ::1 tomb file::" msgstr "Файл пока не является гробницей: ::1 tomb file::" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. > _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#: tomb:501 msgid "Tomb is currently in use: ::1 tomb name::" msgstr "Гробница на данный момент используется: ::1 tomb name::" -#: message +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. > _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:504 msgid "Valid tomb file found: ::1 tomb path::" msgstr "Найден верный файл гробницы: ::1 tomb path::" -#: warning +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. lo_mount() { +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. > _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#: tomb:516 msgid "Loop mount of volumes is not possible on this machine, this error" msgstr "Loop-монтирование томов не поддерживается на этой машине, эта ошибка" -#: print +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. > _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#: tomb:517 +msgid "often occurs on VPS and kernels that don't provide the loop module." +msgstr "часто возникает на VPS и ядрах, которые не имеют модуля loop." + +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. > _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#. sudo losetup -f "$tpath" # allocates the next loopback for our file +#: tomb:518 +msgid "It is impossible to use Tomb on this machine at this conditions." +msgstr "Невозможно использовать Tomb на этой машине при таких условиях." + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # }}} +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. > _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#: tomb:558 msgid "Syntax: tomb [options] command [arguments]" msgstr "Синтаксис: tomb [опции] команда [аргументы]" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. > _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#: tomb:560 msgid "Commands:" msgstr "Команды:" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. > _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#: tomb:562 msgid " // Creation:" msgstr " // Создание: " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. > _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#: tomb:563 msgid " dig create a new empty TOMB file of size -s in MB" msgstr " dig создать новый пустой файл ГРОБНИЦЫ размером -s Мб " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. > _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#: tomb:564 msgid " forge create a new KEY file and set its password" msgstr " forge создать новый файл КЛЮЧА и задать его пароль " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. > _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#: tomb:565 msgid " lock installs a lock on a TOMB to use it with KEY" msgstr " lock установить замок на ГРОБНИЦУ, используя КЛЮЧ " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. > _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#: tomb:567 msgid " // Operations on tombs:" msgstr " // Операции над гробницами: " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. > _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#: tomb:568 msgid " open open an existing TOMB" msgstr " open открыть существующую ГРОБНИЦУ " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. > _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#: tomb:569 msgid " index update the search indexes of tombs" msgstr " index обновить поисковый индекс гробниц " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. > _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#: tomb:570 msgid " search looks for filenames matching text patterns" msgstr " search ищет имена файлов, соответствующие шаблону " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. > _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#: tomb:571 msgid " list list of open TOMBs and information on them" msgstr " list список открытых ГРОБНИЦ и информация о них " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. > _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#: tomb:572 msgid " close close a specific TOMB (or 'all')" msgstr " close закрыть определенную ГРОБНИЦУ (или 'all' для всех) " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. > _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#: tomb:573 msgid " slam slam a TOMB killing all programs using it" msgstr " slam захлопнуть ГРОБНИЦУ, убив все программы, использующие ее " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. > _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#: tomb:575 msgid " resize resize a TOMB to a new size -s (can only grow)" msgstr " resize привести размер гробницы к -s Мб (можно только увеличить) " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. > _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#: tomb:578 msgid " // Operations on keys:" msgstr " // Операции с ключами: " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. > _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#: tomb:579 +msgid " passwd change the password of a KEY (needs old pass)" +msgstr " passwd изменить пароль КЛЮЧА (требуется старый пароль)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. > _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#: tomb:580 +msgid " setkey change the KEY locking a TOMB (needs old key and pass)" +msgstr "" +" setkey изменить КЛЮЧ, запирающий ГРОБНИЦУ (требуется старый ключ и пароль)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. > _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#: tomb:583 +msgid " // Backup on paper:" +msgstr " // Резервная копия на бумаге:" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. > _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#: tomb:584 msgid " engrave makes a QR code of a KEY to be saved on paper" msgstr " engrave создает штрих-код для хранения КЛЮЧА на бумаге " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. > _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#: tomb:588 +msgid " // Steganography:" +msgstr " // Стеганография:" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. > _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#: tomb:589 +msgid " bury hide a KEY inside a JPEG image (for use with -k)" +msgstr " bury спрятать КЛЮЧ внутри изображения JPEG (для использования с -k)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. > _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#: tomb:590 +msgid " exhume extract a KEY from a JPEG image (prints to stdout)" +msgstr "" +" exhume извлечь КЛЮЧ из изображения JPEG (выводится в стандартный вывод)" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. > _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#: tomb:593 msgid "Options:" msgstr "Опции: " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. > _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#: tomb:595 msgid " -s size of the tomb file when creating/resizing one (in MB)" msgstr " -s размер файла гробницы при создании/изменении размера (в Мб) " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. > _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#: tomb:596 msgid " -k path to the key to be used ('-k -' to read from stdin)" msgstr " -k путь к ключу ('-k -' для чтения из стандартного ввода) " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. > _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#: tomb:597 msgid " -n don't process the hooks found in tomb" msgstr " -n не обрабатывать привязки, найденные в гробнице " -#: print -msgid " -o mount options used to open (default: rw,noatime,nodev)" -msgstr " -o параметры монтирования при открытии (по умолчанию rw,noatime,nodev) " +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. > _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#: tomb:598 +msgid " -o options passed to local command, e.g.:" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. > _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#: tomb:599 +msgid " - mount options used to open (default: rw,noatime,nodev)" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. > _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#: tomb:600 +msgid " - an alternate cipher to forge and lock" +msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. > _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#: tomb:601 msgid " -f force operation (i.e. even if swap is active)" msgstr " -f форсировать операцию (например, даже при активном swap) " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. > _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#: tomb:603 msgid " --kdf generate passwords armored against dictionary attacks" msgstr " --kdf сгенерировать пароли, устойчивые к атакам по словарю " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. > _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#: tomb:607 msgid " -h print this help" msgstr " -h показать эту справку " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. > _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#: tomb:608 msgid " -v print version, license and list of available ciphers" msgstr " -v показать версию, лицензию и доступные шифры " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. > _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#: tomb:609 msgid " -q run quietly without printing informations" msgstr " -q выполнение без вывода информации на экран " -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. > _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#: tomb:610 msgid " -D print debugging information at runtime" msgstr " -D вывести отладочную информацию при запуске" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. > _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#: tomb:612 msgid "For more informations on Tomb read the manual: man tomb" msgstr "Больше информации по Tomb Вы можете найти в руководстве: man tomb" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. > _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#. # Check whether a commandline option is set. +#: tomb:613 msgid "Please report bugs on <http://github.com/dyne/tomb/issues>." -msgstr "Пожалуйста, сообщайте о найденных ошибках на <http://github.com/dyne/tomb/issues>." - -#: failure +msgstr "" +"Пожалуйста, сообщайте о найденных ошибках на <http://github.com/dyne/tomb/" +"issues>." + +#. Fold: Commandline interaction +#. Function: _ensure_dependencies +#. +#. Code sample: +#. # missing, bail out. +#. _ensure_dependencies() { +#. +#. # Check for required programs +#. for req in cryptsetup pinentry sudo gpg mkfs.ext4 e2fsck; do +#. command -v $req 1>/dev/null 2>/dev/null || { +#. > _failure "Missing required dependency ::1 command::. Please install it." $req } +#. done +#. +#. # Ensure system binaries are available in the PATH +#. path+=(/sbin /usr/sbin) # zsh magic +#: tomb:748 msgid "Missing required dependency ::1 command::. Please install it." -msgstr "Отсутствует необходимая зависимость: ::1 command::. Пожалуйста, установите ее." +msgstr "" +"Отсутствует необходимая зависимость: ::1 command::. Пожалуйста, установите " +"ее." + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. > _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#: tomb:785 +msgid "cleartext key from stdin selected: this is unsafe." +msgstr "выбран ключ, явно указанный через стандартный ввод: это небезопасно." + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. > exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#: tomb:786 +msgid "please use --unsafe if you really want to do this." +msgstr "пожалуйчтв, используйте --unsafe, если Вы действительно этого хотите." + +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. > _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. _warning "is_valid_key() called without an argument." +#: tomb:788 +msgid "received key in cleartext from stdin (unsafe mode)" +msgstr "получен ключ в явном виде через стандартный ввод (небезопасный режим)" -#: warning +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. > _warning "is_valid_key() called without an argument." +#. return 1 +#. } +#. +#. # If the key file is an image don't check file header +#: tomb:792 msgid "is_valid_key() called without an argument." msgstr "is_valid_key() вызвана без аргумента." -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. } +#. +#. # If the key file is an image don't check file header +#. [[ -r $TOMBKEYFILE ]] #. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] #. && { +#. > _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. _message "Key is valid." +#: tomb:800 msgid "Key is an image, it might be valid." msgstr "Ключ - изображение, может подойти." -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] #. && { +#. _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. > _message "Key is valid." +#. return 0 } +#. +#. return 1 +#. } +#: tomb:804 msgid "Key is valid." msgstr "Верный ключ." -#: warning +#. Fold: Key operations +#. Function: _tomb_key_recover recover_key +#. +#. Code sample: +#. } +#. +#. # $1 is a string containing an encrypted key +#. _tomb_key_recover recover_key() { +#. local key="${1}" # Unique argument is an encrypted key +#. +#. > _warning "Attempting key recovery." +#. +#. _head="${key[(f)1]}" # take the first line +#. +#. TOMBKEY="" # Reset global variable +#: tomb:814 msgid "Attempting key recovery." msgstr "Попытка восстановления ключа." -#: warning -msgid "The key seems invalid or its format is not known by this version of Tomb." +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. # Set global variables TOMBKEY and TOMBKEYFILE. +#. _load_key() { +#. local keyfile="$1" # Unique argument is an optional keyfile +#. +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. > _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. _message "Waiting for the key to be piped from stdin... " +#: tomb:838 +msgid "This operation requires a key file to be specified using the -k option." +msgstr "Эта операция требует указания файла ключа с помощью опции -k." + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. > _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=stdin +#. TOMBKEY=$(cat) +#. elif [[ $keyfile == "cleartext" ]]; then +#. _verbose "load_key reading SECRET from stdin" +#: tomb:842 +msgid "Waiting for the key to be piped from stdin... " +msgstr "Ожидание передачи ключа через стандартный ввод..." + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=cleartext +#. TOMBKEY=cleartext +#. TOMBSECRET=$(cat) +#. else +#. _verbose "load_key argument: ::1 key file::" $keyfile +#. > [[ -r $keyfile ]] || _failure "Key not found, specify one using -k." +#. TOMBKEYFILE=$keyfile +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#: tomb:853 +msgid "Key not found, specify one using -k." +msgstr "Ключ не найден, укажите его с помощью опции -k." + +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#. _verbose "load_key: ::1 key::" $TOMBKEYFILE +#. +#. is_valid_key $TOMBKEY || { +#. > _warning "The key seems invalid or its format is not known by this version of Tomb." +#. _tomb_key_recover $TOMBKEY +#. } +#. +#. # Declared TOMBKEYFILE (path) +#: tomb:861 +msgid "" +"The key seems invalid or its format is not known by this version of Tomb." msgstr "Похоже, ключ неверен, либо его формат неизвестен этой версии Tomb." -#: failure +#. Fold: Key operations +#. Function: get_lukskey +#. +#. Code sample: +#. _verbose "KDF salt: $kdf_salt" +#. _verbose "KDF ic: $kdf_ic" +#. _verbose "KDF len: $kdf_len" +#. _password=$(tomb-kdb-pbkdf2 $kdf_salt $kdf_ic $kdf_len 2>/dev/null <<<$_password) +#. ;; +#. *) +#. > _failure "No suitable program for KDF ::1 program::." $pbkdf_hash +#. unset _password +#. return 1 +#. ;; +#. esac +#: tomb:936 msgid "No suitable program for KDF ::1 program::." msgstr "Нет подходящей программы для KDF ::1 program::." -#: failure +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. +#. # This function asks the user for the password to use the key it tests +#. # it against the return code of gpg on success returns 0 and saves +#. # the password in the global variable $TOMBPASSWORD +#. ask_key_password() { +#. [[ -z "$TOMBKEYFILE" ]] && { +#. > _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#: tomb:962 msgid "Internal error: ask_key_password() called before _load_key()." msgstr "Внутренняя ошибка: ask_key_password() вызвана перед _load_key()." -#: message +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#. +#. > _message "A password is required to use key ::1 key::" $TOMBKEYFILE +#. passok=0 +#. tombpass="" +#. if [[ "$1" = "" ]]; then +#. +#: tomb:968 msgid "A password is required to use key ::1 key::" msgstr "Для использования ключа ::1 key:: требуется пароль" -#: message +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. if [[ $c == 1 ]]; then +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE") +#. else +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE (attempt $c)") +#. fi +#. [[ $? = 0 ]] || { +#. > _warning "User aborted password dialog." +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#: tomb:980 +msgid "User aborted password dialog." +msgstr "Пользователь отменил диалог пароля." + +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#. +#. [[ $? = 0 ]] && { +#. > passok=1; _message "Password OK." +#. break; +#. } +#. done +#. +#: tomb:987 +msgid "Password OK." +msgstr "Верный пароль." + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. change_passwd() { +#. local tmpnewkey lukskey c tombpass tombpasstmp +#. +#. _check_swap # Ensure swap is secure, if any +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. > _message "Commanded to change password for tomb key ::1 key::" $TOMBKEYFILE +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. +#: tomb:1025 msgid "Commanded to change password for tomb key ::1 key::" msgstr "Приказано изменить пароль для ключа ::1 key::" -#: failure +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. local tomboldpwd="`option_value --tomb-old-pwd`" +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomboldpwd +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. > [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#: tomb:1037 msgid "No valid password supplied." msgstr "Не предоставлен верный пароль." -#: message +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#. +#. { option_is_set --tomb-pwd } && { +#: tomb:1039 +msgid "Changing password for ::1 key file::" +msgstr "Меняю пароль для ::1 key file::" + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. gen_key "$tombpwd" >> "$tmpnewkey" +#. } || { +#. gen_key >> "$tmpnewkey" +#. } +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. > _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. _success "Your passphrase was successfully updated." +#: tomb:1052 +msgid "Error: the newly generated keyfile does not seem valid." +msgstr "Ошибка: сгенерированный файл ключа неверен." + +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. > _success "Your passphrase was successfully updated." +#. +#. return 0 +#. } +#. +#: tomb:1056 +msgid "Your passphrase was successfully updated." +msgstr "Ваш пароль успешно обновлен." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. +#. if [ "$1" = "" ]; then +#. while true; do +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. > _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. _failure "You set empty password, which is not possible." +#. fi +#: tomb:1078 +msgid "User aborted." +msgstr "Отменено пользователем." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. > _failure "You set empty password, which is not possible." +#. fi +#. tombpasstmp=$tombpass +#. tombpass=`ask_password "Type the new password to secure your key (again)"` +#. if [[ $? != 0 ]]; then +#: tomb:1081 +msgid "You set empty password, which is not possible." +msgstr "Вы указали пустой пароль, так нельзя." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # see: https://github.com/dyne/Tomb/issues/82 +#. itertime="`option_value --kdf`" +#. # removing support of floating points because they can't be type checked well +#. if [[ "$itertime" != <-> ]]; then +#. unset tombpass +#. unset tombpasstmp +#. > _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#: tomb:1109 +msgid "" +"Wrong argument for --kdf: must be an integer number (iteration seconds)." +msgstr "" +"Неверный аргумент для --kdf: должно быть указано целое число (секунд " +"итерации)." + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. unset tombpasstmp +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. > _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#: tomb:1114 +msgid "Using KDF, iterations: ::1 microseconds::" +msgstr "Использую KDF, итераций: ::1 microseconds::" + +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. > _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#: tomb:1115 msgid "generating salt" msgstr "генерирую соль" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. > _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#: tomb:1117 msgid "calculating iterations" msgstr "вычисляю итерации" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. > _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#. +#. header="_KDF_pbkdf2sha1_${pbkdf2_salt}_${pbkdf2_iter}_64\n" +#: tomb:1119 msgid "encoding the password" msgstr "кодирую пароль" -#: warning +#. Fold: Key operations +#. Function: list_gnupg_ciphers +#. +#. Code sample: +#. unset tombpasstmp +#. } +#. +#. # prints an array of ciphers available in gnupg (to encrypt keys) +#. list_gnupg_ciphers() { +#. # prints an error if GnuPG is not found +#. > which gpg 2>/dev/null || _failure "gpg (GnuPG) is not found, Tomb cannot function without it." +#. +#. ciphers=(`gpg --version | awk ' +#. BEGIN { ciphers=0 } +#. /^Cipher:/ { gsub(/,/,""); sub(/^Cipher:/,""); print; ciphers=1; next } +#: tomb:1150 +msgid "gpg (GnuPG) is not found, Tomb cannot function without it." +msgstr "gpg (GnuPG) не найден, Tomb не может работать без него." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEY +#. +#. imagefile=$PARAM +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. > _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#: tomb:1171 msgid "Encode failed: ::1 image file:: is not a jpeg image." msgstr "Шифрование не удалось: ::1 image file:: не jpeg-изображение." -#: failure +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. > _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#: tomb:1175 +msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" +msgstr "Кодирую ключ ::1 tomb key:: в изображение ::2 image file::" + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. > _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#. # by Tomb, but its not strictly necessary (and having different +#: tomb:1176 +msgid "Please confirm the key password for the encoding" +msgstr "Пожалуйста, подтвердите пароль ключа для шифрования" + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpwd +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. > _warning "Wrong password supplied." +#. _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#: tomb:1192 +msgid "Wrong password supplied." +msgstr "Указан неверный пароль." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. _warning "Wrong password supplied." +#. > _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#. print - "$TOMBKEY" | awk ' +#: tomb:1193 +msgid "You shall not bury a key whose password is unknown to you." +msgstr "Вам не захоронить ключ, чей пароль не известен Вам." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. /^-----/ {next} +#. /^Version/ {next} +#. {print $0}' #. | steghide embed --embedfile - --coverfile ${imagefile} #. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. > _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#: tomb:1204 +msgid "Encoding error: steghide reports problems." +msgstr "Ошибка шифрования: steghide сообщает о проблемах." + +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. | steghide embed --embedfile - --coverfile ${imagefile} #. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. > _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#. fi +#. +#. return $res +#: tomb:1207 +msgid "Tomb key encoded succesfully into image ::1 image file::" +msgstr "Ключ от гробницы успешно закодирован в изображение ::1 image file::" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # mandatory 1st arg: the image file where key is supposed to be +#. # optional 2nd arg: the password to use (same as key, internal use) +#. # optional 3rd arg: the key where to save the result (- for stdout) +#. exhume_key() { +#. [[ "$1" = "" ]] && { +#. > _failure "Exhume failed, no image specified" } +#. +#. local imagefile="$1" # The image file where to look for the key +#. local tombpass="$2" # (Optional) the password to use (internal use) +#. local destkey="$3" # (Optional) the key file where to save the +#: tomb:1219 +msgid "Exhume failed, no image specified" +msgstr "Эксгумация не удалась, не указано изображения" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local destkey="$3" # (Optional) the key file where to save the +#. # result (- for stdout) +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. > _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#: tomb:1229 msgid "Exhume failed, image file not found: ::1 image file::" msgstr "Эксгумация неудачна, файл изображения не найден: ::1 image file::" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. > _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#: tomb:1231 msgid "Exhume failed: ::1 image file:: is not a jpeg image." msgstr "Эксгумация не удалась: ::1 image file:: не jpeg изображение." -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#. TOMBKEY=$(steghide extract -sf $imagefile -p $tombpass -xf -) +#. [[ $? != 0 ]] && { +#. > _failure "Wrong password or no steganographic key found" } +#. +#. recover_key $TOMBKEY +#. +#. return 0 +#: tomb:1238 msgid "Wrong password or no steganographic key found" msgstr "Неверный пароль или не найден стеганографический ключ" -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. } +#. +#. # Ensure we have a valid destination for the key +#. [[ -z $destkey ]] && { option_is_set -k } && destkey=$(option_value -k) +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. > _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#: tomb:1249 msgid "printing exhumed key on stdout" msgstr "вывод эксгумированного ключа в стандарный вывод" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. > _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#: tomb:1253 msgid "File exists: ::1 tomb key::" msgstr "Файл существует: ::1 tomb key::" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. > _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#: tomb:1255 +msgid "Use of --force selected: overwriting." +msgstr "Указана опция --force: перезаписываю." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. > _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#: tomb:1258 +msgid "Make explicit use of --force to overwrite." +msgstr "Явно укажите опцию --force для перезаписи." + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. > _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#: tomb:1259 msgid "Refusing to overwrite file. Operation aborted." msgstr "Отказываюсь перезаписывать файл. Операция отменена." -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. > _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#. tombpass=$(option_value --tomb-pwd) +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpass +#. } || { +#: tomb:1262 msgid "Trying to exhume a key out of image ::1 image file::" msgstr "Пытаюсь эксгумировать ключ из изображения ::1 image file::" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. steghide extract -sf $imagefile -p ${tombpass} -xf $destkey +#. r=$? +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. > _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#: tomb:1283 +msgid "Key succesfully exhumed to ::1 key::." +msgstr "Ключ успешно эксгумирован в ::1 key::" + +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. > _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#. return $r +#. } +#: tomb:1285 msgid "Nothing found in ::1 image file::" msgstr "В ::1 image file:: ничего не найдено" -#: failure +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. local keyname=$(basename $TOMBKEYFILE) +#. local pngname="$keyname.qr.png" +#. +#. > _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#: tomb:1300 +msgid "Rendering a printable QRCode for key: ::1 tomb key file::" +msgstr "Рендерю готовый для печати штрих-код для ключа: ::1 tomb key file::" + +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. > _failure "QREncode reported an error." } +#. +#. _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#: tomb:1305 msgid "QREncode reported an error." msgstr "QREncode сообщил об ошибке." -#: message +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE #. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. _failure "QREncode reported an error." } +#. +#. > _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#. file $pngname +#. } +#: tomb:1307 +msgid "Operation successful:" +msgstr "Операция успешна." + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. dig_tomb() { +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. > _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#: tomb:1340 msgid "Commanded to dig tomb ::1 tomb path::" msgstr "Приказано выкопать гробницу ::1 tomb path::" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. > [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#: tomb:1342 msgid "Missing path to tomb" msgstr "Отсутствует путь к гробнице" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. > [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#: tomb:1343 +msgid "Size argument missing, use -s" +msgstr "Отсутствует размер, укажите его с помощью -s" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. > [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#: tomb:1344 msgid "Size must be an integer (megabytes)" msgstr "Размер должен быть целым числом (в мегабатах)" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. > [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#: tomb:1345 msgid "Tombs can't be smaller than 10 megabytes" msgstr "Гробницы не могут быть меньше 10 мегабайт" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#. > _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#: tomb:1350 +msgid "A tomb exists already. I'm not digging here:" +msgstr "Гробница существует. Я не буду копать здесь:" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ -e $TOMBPATH ]] && { +#. _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. > _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#: tomb:1355 +msgid "Creating a new tomb in ::1 tomb path::" +msgstr "Создаю новую гробницу в ::1 tomb path::" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. > _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#: tomb:1357 msgid "Generating ::1 tomb file:: of ::2 size::MiB" msgstr "Генерирую ::1 tomb file:: размером ::2 size::Мб" -#: warning +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#. > _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. chmod 0600 $TOMBPATH +#. +#: tomb:1362 msgid "Error creating the tomb ::1 tomb path::" msgstr "Ошибка при создании гробницы ::1 tomb path::" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. > _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#: tomb:1377 +msgid "Done digging ::1 tomb name::" +msgstr "::1 tomb name:: выкопана" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. > _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#: tomb:1378 +msgid "Your tomb is not yet ready, you need to forge a key and lock it:" +msgstr "Ваша гробница пока не готова, необходимо выковать ключ и запереть ее:" + +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. > _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#: tomb:1379 msgid "tomb forge ::1 tomb path::.key" msgstr "tomb forge ::1 tomb path::.key" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. > _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:1380 msgid "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" msgstr "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. local destkey="$1" +#. { option_is_set -k } && { destkey=$(option_value -k) } +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. > _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#: tomb:1401 +msgid "A filename needs to be specified using -k to forge a new key." +msgstr "" +"Необходимо указать имя файла через опцию -k, чтобы выковать новый ключ." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. > _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#. +#. # Ensure GnuPG won't exit with an error before first run +#: tomb:1403 msgid "Commanded to forge key ::1 key::" msgstr "Приказано выковать ключ ::1 key::" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. mkdir -m 0700 $HOME/.gnupg +#. touch $HOME/.gnupg/pubring.gpg } +#. +#. # Do not overwrite any files accidentally +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. > _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#: tomb:1415 +msgid "Forging this key would overwrite an existing file. Operation aborted." +msgstr "Выковка этого ключа перезапишет существующий файл. Операция отменена." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. > _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#: tomb:1419 +msgid "Cannot generate encryption key." +msgstr "Не могу сгенерировать ключ шифрования." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && algo=$algopt +#. +#. > _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#: tomb:1427 msgid "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" -msgstr "Приказано выковать ключ ::1 key:: с алгоритмом шифрования ::2 algorithm::" +msgstr "" +"Приказано выковать ключ ::1 key:: с алгоритмом шифрования ::2 algorithm::" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. > _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#: tomb:1432 +msgid "This operation takes time, keep using this computer on other tasks," +msgstr "Эта операция займет некоторое время, выполняйте пока другие задачи," -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" #. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. > _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#: tomb:1433 +msgid "once done you will be asked to choose a password for your tomb." +msgstr "по завершении Вас вопросят ввести пароль для гробницы." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. > _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#: tomb:1434 +msgid "To make it faster you can move the mouse around." +msgstr "Чтобы ускорить операцию, подвигайте мышку." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. > _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#. { option_is_set --use-urandom } && random_source=/dev/urandom +#: tomb:1435 +msgid "If you are on a server, you can use an Entropy Generation Daemon." +msgstr "Если Вы на сервере, можно использовать демон генерации энтропии." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. > _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#: tomb:1449 +msgid "Choose the password of your key: ::1 tomb key::" +msgstr "Выберите пароль для вашего ключа: ::1 tomb key::" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. > _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#. # the gen_key() function takes care of the new key's encryption +#: tomb:1450 +msgid "(You can also change it later using 'tomb passwd'.)" +msgstr "(Его можно потом изменить с помощью 'tomb passwd'.)" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. > _warning "The key does not seem to be valid." +#. _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#: tomb:1468 +msgid "The key does not seem to be valid." +msgstr "Ключ неверен." + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. _warning "The key does not seem to be valid." +#. > _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#: tomb:1469 +msgid "Dumping contents to screen:" +msgstr "Выгрузка содержимого на экран:" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. > _message "Done forging ::1 key file::" $TOMBKEYFILE +#. _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#: tomb:1477 msgid "Done forging ::1 key file::" msgstr "Выкован ключ ::1 key file::" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. _message "Done forging ::1 key file::" $TOMBKEYFILE +#. > _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#. # Step three -- Lock tomb +#: tomb:1478 +msgid "Your key is ready:" +msgstr "Ваш ключ готов:" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. # for more alternatives refer to cryptsetup(8) +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. > _warning "No tomb specified for locking." +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#: tomb:1498 +msgid "No tomb specified for locking." +msgstr "Не указана гробница для запирания." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. _warning "No tomb specified for locking." +#. > _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#: tomb:1499 +msgid "Usage: tomb lock file.tomb file.tomb.key" +msgstr "Использование: tomb lock file.tomb file.tomb.key" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#. +#. > _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. _failure "There is no tomb here. You have to dig it first." } +#. +#: tomb:1505 msgid "Commanded to lock tomb ::1 tomb file::" msgstr "Приказано запереть гробницу ::1 tomb file::" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _plot $tombpath +#. +#. _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. > _failure "There is no tomb here. You have to dig it first." } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. lo_mount $TOMBPATH +#: tomb:1508 +msgid "There is no tomb here. You have to dig it first." +msgstr "Здесь нет гробницы. Сначала выкопайте ее." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. > _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#: tomb:1517 +msgid "Checking if the tomb is empty (we never step on somebody else's bones)." +msgstr "Проверяю, пуста ли гробница (мы никогда не ходим по чужим костям)." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. > _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#: tomb:1521 +msgid "The tomb was already locked with another key." +msgstr "Гробница уже заперта другим ключом." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. > _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#. +#: tomb:1522 +msgid "" +"Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +msgstr "" +"Операция отменена. Я не могу запереть уже запертую гробницу. Выкопайте новую." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. > _message "Fine, this tomb seems empty." +#. fi +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#: tomb:1524 +msgid "Fine, this tomb seems empty." +msgstr "Так, эта гробница, вроде как, пуста." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. # the encryption cipher for a tomb can be set when locking using -c +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && cipher=$algopt +#. > _message "Locking using cipher: ::1 cipher::" $cipher +#. +#. # get the pass from the user and check it +#. if option_is_set --tomb-pwd; then +#. tomb_pwd="`option_value --tomb-pwd`" +#: tomb:1532 msgid "Locking using cipher: ::1 cipher::" msgstr "Запираю, используя шифр ::1 cipher::" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password "$tomb_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #: tomb:1544 +msgid "Locking ::1 tomb file:: with ::2 tomb key file::" +msgstr "Запираю ::1 tomb file:: с помощью ::2 tomb key file::" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. > _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#: tomb:1546 +msgid "Formatting Luks mapped device." +msgstr "Форматирую устройство LUKS." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode #. --cipher ${cipher} --key-size 256 --key-slot 0 #. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#: tomb:1551 +msgid "cryptsetup luksFormat returned an error." +msgstr "cryptsetup luksFormat вернул ошибку." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#: tomb:1556 msgid "cryptsetup luksOpen returned an error." msgstr "cryptsetup luksOpen возвратил ошибку." -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. > _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#: tomb:1559 +msgid "Formatting your Tomb with Ext3/Ext4 filesystem." +msgstr "Форматирую Вашу гробницу в файловую систему Ext3/Ext4." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. > _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#: tomb:1563 +msgid "Tomb format returned an error." +msgstr "Tomb format вернул ошибку." + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#. > _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#: tomb:1564 msgid "Your tomb ::1 tomb file:: may be corrupted." msgstr "Ваша гробница ::1 tomb file:: может быть повреждена." -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. > _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" #. $TOMBPATH $TOMBKEYFILE +#. +#. } +#: tomb:1569 msgid "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" msgstr "Запер ::1 tomb name:: с помощью LUKS dm-crypt ::2 cipher::" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. > _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" #. $TOMBPATH $TOMBKEYFILE +#. +#. } +#. +#: tomb:1570 +msgid "" +"Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" +msgstr "" +"Ваша гробница готова в ::1 tomb path:: и защищена ключом ::2 tomb key::" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. # This function changes the key that locks a tomb +#. change_tomb_key() { +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. > _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#: tomb:1580 msgid "Commanded to reset key for tomb ::1 tomb path::" msgstr "Приказано сбросить ключ для гробницы ::1 tomb path::" -#: warning +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. > _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#: tomb:1583 msgid "Command 'setkey' needs two arguments: the old key file and the tomb." msgstr "Команда 'setkey' требует два аргумента: старый файл ключа и гробницу." -#: warning +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. > _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#. _check_swap +#: tomb:1584 msgid "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" msgstr "Например: tomb -k new.tomb.key old.tomb.key secret.tomb" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. > _failure "Execution aborted." +#. } +#. +#. _check_swap +#. is_valid_tomb $tombpath +#: tomb:1585 msgid "Execution aborted." msgstr "Операция отменена." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. sudo cryptsetup isLuks ${nstloop} +#. # is it a LUKS encrypted nest? we check one more time +#. [[ $? == 0 ]] || { +#. > _failure "Not a valid LUKS encrypted volume: ::1 volume::" $TOMBPATH } +#. +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#: tomb:1596 msgid "Not a valid LUKS encrypted volume: ::1 volume::" msgstr "Неверный зашифрованный том LUKS: ::1 volume::" -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. > _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#: tomb:1604 +msgid "Changing lock on tomb ::1 tomb name::" +msgstr "Меняю замок на гробнице ::1 tomb name::" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. > _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#. # save date of mount in minutes since 1970 +#: tomb:1605 msgid "Old key: ::1 old key::" msgstr "Старый ключ: ::1 old key::" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomb_old_pwd +#. ask_key_password "$tomb_old_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #: tomb:1621 msgid "No valid password supplied for the old key." msgstr "Не указан верный пароль для старого ключа." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksOpen ${nstloop} ${mapper} +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. _message "New key: ::1 key file::" $TOMBKEYFILE +#: tomb:1627 msgid "Unexpected error in luksOpen." msgstr "Неожиданная ошибка в luksOpen." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksOpen ${nstloop} ${mapper} +#. [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. > _message "New key: ::1 key file::" $TOMBKEYFILE +#. +#. if option_is_set --tomb-pwd; then +#. tomb_new_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#: tomb:1631 msgid "New key: ::1 key file::" msgstr "Новый ключ: ::1 key file::" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#. ask_key_password "$tomb_new_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the new key." } +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#: tomb:1641 msgid "No valid password supplied for the new key." msgstr "Не узкана верный пароль для нового ключа." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#: tomb:1650 msgid "Unexpected error in luksChangeKey." msgstr "Неожиданная ошибка в luksChangeKey." -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - #. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. > sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#: tomb:1652 msgid "Unexpected error in luksClose." msgstr "Неожиданная ошибка в luksClose." -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. > _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#: tomb:1654 +msgid "Succesfully changed key for tomb: ::1 tomb file::" +msgstr "Ключ для гробницы ::1 tomb file:: успешно изменен" + +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. > _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#. +#: tomb:1655 msgid "The new key is: ::1 new key::" msgstr "Новый ключ: ::1 new key::" -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # {{{ Open +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. > [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#: tomb:1667 msgid "No tomb name specified for opening." msgstr "Не указано имя гробницы для открытия." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. > _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#: tomb:1669 msgid "Commanded to open tomb ::1 tomb name::" msgstr "Приказано открыть гробницу ::1 tomb name::" -#: warning +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#. # check file type (if its a Luks fs) +#. [[ "`file $TOMBPATH`" =~ "luks encrypted file" ]] || { +#. > _warning "::1 tomb file:: is not a valid tomb file" $TOMBFILE +#. _failure "Operation aborted." +#. } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#: tomb:1676 msgid "::1 tomb file:: is not a valid tomb file" msgstr "::1 tomb file:: неверный файл гробницы" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. > _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#: tomb:1686 msgid "Mountpoint not specified, using default: ::1 mount point::" -msgstr "Не указана точка монтирования, использую точку по умолчанию: ::1 mount point::" - -#: warning +msgstr "" +"Не указана точка монтирования, использую точку по умолчанию: ::1 mount " +"point::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. > _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#: tomb:1690 msgid "::1 tomb name:: is already open." msgstr "::1 tomb name:: уже открыт." -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. > _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#: tomb:1691 +msgid "Here below its status is reported:" +msgstr "Ниже назодится отчет о его статусе:" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. > _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#: tomb:1695 +msgid "Opening ::1 tomb file:: on ::2 mount point::" +msgstr "Открываю ::1 tomb file:: в ::2 mount point::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. > _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#: tomb:1702 msgid "::1 tomb file:: is not a valid Luks encrypted storage file." msgstr "::1 tomb file:: - неверное зашифрованное устройство LUSK." -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. > _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#: tomb:1704 +msgid "This tomb is a valid LUKS encrypted device." +msgstr "Эта гробница - верное зашифрованное устройство LUKS." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#. /^Cipher mode/ {print $3} +#. /^Hash spec/ {print $3}'`) +#. > _message "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" $tombdump[1] $tombdump[2] $tombdump[3] +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#: tomb:1711 msgid "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" msgstr "Шифр \"::1 cipher::\", режим \"::2 mode::\", хеш \"::3 hash::\"" -#: warning -msgid "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." -msgstr "Для этой гробницы разрешено использование нескольких ключей. Будьте осторожны: там может быть бэкдор." +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#. /^Key slot.*ENABLED/ { if(zero==1) print "WARN" }'` +#. [[ "$slotwarn" == "WARN" ]] && { +#. > _warning "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." } +#. +#. # save date of mount in minutes since 1970 +#. mapdate=`date +%s` +#. +#: tomb:1718 +msgid "" +"Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." +msgstr "" +"Для этой гробницы разрешено использование нескольких ключей. Будьте " +"осторожны: там может быть бэкдор." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. ask_key_password +#. } +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} +#. [[ $? = 0 ]] || { +#. > _failure "Failure mounting the encrypted file." } +#. +#. # preserve the loopdev after exit +#. lo_preserve "$nstloop" +#. +#: tomb:1742 +msgid "Failure mounting the encrypted file." +msgstr "Не удалось примонтировать зашифрованный файл." + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # array: [ cipher, keysize, loopdevice ] +#. tombstat=(`sudo cryptsetup status ${mapper} | awk ' +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. > _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#: tomb:1752 +msgid "Success unlocking tomb ::1 tomb name::" +msgstr "Успешно отпер гробницу ::1 tomb name::" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. > _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#. _verbose "Tomb engraved as ::1 tomb name::" $TOMBNAME +#. sudo tune2fs -L $TOMBNAME /dev/mapper/${mapper} > /dev/null +#. +#: tomb:1755 msgid "Checking filesystem via ::1::" msgstr "Проверка файловой системы через ::1::" -#: message -msgid "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" -msgstr "Последний визит нанес ::1 user::(::2 tomb build::) из ::3 tty:: на ::4 host::" +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # TODO: safety check MOUNTOPTS +#. # safe_mount_options && #. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. > _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#: tomb:1773 +msgid "Error mounting ::1 mapper:: on ::2 tombmount::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. # safe_mount_options && #. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. > _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#: tomb:1775 +msgid "Are mount options '::1 mount options::' valid?" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ $oldmountopts != $MOUNTOPTS ]] && #. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#. > _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#: tomb:1780 +msgid "Cannot mount ::1 tomb name::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#. +#. > _success "Success opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. local tombtty tombhost tombuid tombuser +#. +#. # print out when was opened the last time, by whom and where +#: tomb:1786 +msgid "Success opening ::1 tomb file:: on ::2 mount point::" +msgstr "Успешно открыл ::1 tomb file:: в ::2 mount point::" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombuid=$(_cat ${tombmount}/.uid | tr -d ' ') +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. > _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#: tomb:1800 +msgid "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" +msgstr "" +"Последний визит нанес ::1 user::(::2 tomb build::) из ::3 tty:: на ::4 host::" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. > _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#. print $_UID > ${tombmount}/.uid +#: tomb:1801 msgid "on date ::1 date::" msgstr "дата: ::1 date::" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. +#. # Default mount options are overridden with the -o switch +#. [[ -n ${(k)OPTS[-o]} ]] && MOUNTOPTS=${OPTS[-o]} +#. +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. > _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. _warning "Cannot exec bind hooks without a mounted tomb." +#: tomb:1849 +msgid "How pitiful! A tomb, and no HOME." +msgstr "Как жаль! Гробница есть, но нет HOME." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. > _warning "Cannot exec bind hooks without a mounted tomb." +#. return 1 } +#. +#. [[ -r "$mnt/bind-hooks" ]] || { +#. _verbose "bind-hooks not found in ::1 mount point::" $mnt +#: tomb:1853 +#, fuzzy +msgid "Cannot exec bind hooks without a mounted tomb." +msgstr "Невозможно совершить привязки без примонтированной гробницы." + +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # better parsing for bind hooks checks for two separated words on +#. # each line, using zsh word separator array subscript +#. _bindhooks="${mapfile[${mnt}/bind-hooks]}" +#. for h in ${(f)_bindhooks}; do +#. s="${h[(w)1]}" +#. d="${h[(w)2]}" +#. > [[ "$s" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. [[ "$d" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. maps+=($s $d) +#. _verbose "bind-hook found: $s -> $d" +#. done +#: tomb:1869 #, fuzzy msgid "bind-hooks file is broken" msgstr "файл bind-hooks битый" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. _verbose "bind-hook found: $s -> $d" +#. done +#. unset _bindhooks +#. +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#: tomb:1878 #, fuzzy msgid "bind-hooks map format: local/to/tomb local/to/$HOME" msgstr "Формат bind-hooks: local/to/tomb local/to/HOME" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#: tomb:1882 #, fuzzy msgid "bind-hooks map format: local/to/tomb local/to/$HOME. Rolling back" msgstr "Формат bind-hooks: local/to/tomb local/to/HOME. Откат" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. > _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} #: tomb:1887 #, fuzzy msgid "bind-hook target not existent, skipping ::1 home::/::2 subdir::" msgstr "Цель bind-hook не существует, пропускаю ::1 home::/::2 dir::" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. > _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} #. && mounted+=("$HOME/${maps[$dir]}") +#. fi +#: tomb:1889 #, fuzzy -msgid "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" -msgstr "Источник bind-hook не найден в гробнице, пропускаю ::1 mount point::/::2 subdir::" +msgid "" +"bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" +msgstr "" +"Источник bind-hook не найден в гробнице, пропускаю ::1 mount point::/::2 " +"subdir::" + +#. Fold: Open +#. Function: exec_safe_post_hooks +#. +#. Code sample: +#. # Only run if post-hooks has the executable bit set +#. [[ -x $mnt/post-hooks ]] || return +#. +#. # If the file starts with a shebang, run it. +#. cat $mnt/post-hooks | head -n1 | grep '^#!\s*/' &> /dev/null +#. [[ $? == 0 ]] && { +#. > _success "Post hooks found, executing as user ::1 user name::." $USERNAME +#. $mnt/post-hooks $act $mnt +#. } +#. } +#. +#: tomb:1917 +msgid "Post hooks found, executing as user ::1 user name::." +msgstr "Найдены пост-обработчики, выполняю как пользователь ::1 user name::." -#: failure +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. local tombname tombmount tombfs tombfsopts tombloop +#. local ts tombtot tombused tombavail tombpercent tombp tombsince +#. local tombtty tombhost tombuid tombuser +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "I can't see any ::1 status:: tomb, may they all rest in peace." ${1:-open} } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:1936 msgid "I can't see any ::1 status:: tomb, may they all rest in peace." msgstr "Я не вижу ::1 status:: гробниц, да упокоятся они все с миром." -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. tombuser="${ee[(ws@:@)1]}" } +#. done +#. } +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. > _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#: tomb:1969 msgid "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" -msgstr "::1 tombname:: открыта на ::2 tombmount:: с параметрами ::3 tombfsopts::" - -#: message +msgstr "" +"::1 tombname:: открыта на ::2 tombmount:: с параметрами ::3 tombfsopts::" + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. > _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#: tomb:1972 msgid "::1 tombname:: open since ::2 tombsince::" msgstr "::1 tombname:: открыта с ::2 tombsince::" -#: message -msgid "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" -msgstr "::1 tombname:: открыл ::2 tombuser:: из ::3 tombtty:: на ::4 tombhost::" - -#: message -msgid "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " -msgstr "::1 tombname:: размер ::2 tombtot:: из которых ::3 tombused:: (::5 tombpercent::%) использовано: ::4 tombavail:: свободно " - -#: warning +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" #. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. > _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #: tomb:1975 +msgid "" +"::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" +msgstr "" +"::1 tombname:: открыл ::2 tombuser:: из ::3 tombtty:: на ::4 tombhost::" + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" #. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. > _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#: tomb:1979 +msgid "" +"::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::" +"%) is used: ::4 tombavail:: free " +msgstr "" +"::1 tombname:: размер ::2 tombtot:: из которых ::3 tombused:: (::5 " +"tombpercent::%) использовано: ::4 tombavail:: свободно " + +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " #. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. > _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#: tomb:1983 msgid "::1 tombname:: warning: your tomb is almost full!" msgstr "::1 tombname:: предупреждает: Ваша гробница почти заполнена!" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#. for h in ${mounted_hooks}; do +#. > _message "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" #. $tombname "`basename ${h[(ws:;:)1]}`" ${h[(ws:;:)2]} +#. done +#. done +#. } +#: tomb:1989 msgid "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" msgstr "::1 tombname:: прицепила ::2 hookname:: к ::3 hookdest::" -#: failure +#. Fold: List +#. Function: list_tomb_binds +#. +#. Code sample: +#. # list_tomb_binds +#. # print out an array of mounted bind hooks (internal use) +#. # format is semi-colon separated list of attributes +#. # needs an argument: name of tomb whose hooks belong +#. list_tomb_binds() { +#. [[ -z "$1" ]] && { +#. > _failure "Internal error: list_tomb_binds called without argument." } +#. +#. # list bind hooks on util-linux 2.20 (Debian 7) +#. mount -l #. | awk -vtomb="$1" ' +#: tomb:2044 msgid "Internal error: list_tomb_binds called without argument." msgstr "Внутренняя ошибка: list_tomb_binds вызвана без аргумента." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # {{{ Index and search +#. +#. # index files in all tombs for search +#. # $1 is optional, to specify a tomb +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. > _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#: tomb:2076 msgid "Cannot index tombs on this system: updatedb (mlocate) not installed." -msgstr "Не могу проиндексировать гробницы на этой системе: updatedb (mlocate) не установлен." - -#: warning +msgstr "" +"Не могу проиндексировать гробницы на этой системе: updatedb (mlocate) не " +"установлен." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. > _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#: tomb:2080 msgid "Cannot use GNU findutils for index/search commands." msgstr "Не могу использовать GNU findutils для команд index/search." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. > _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#: tomb:2082 msgid "Index command needs 'mlocate' to be installed." msgstr "Для использования команды index необходимо установить 'mlocate'." -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. > _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#: tomb:2090 msgid "There seems to be no open tomb engraved as [::1::]" msgstr "Не похоже, что открыта гробница, гравированная как [::1::]" -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. > _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#: tomb:2092 +msgid "I can't see any open tomb, may they all rest in peace." +msgstr "Я не вижу открытых гробниц, да упокоятся они все с миром." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#. { command -v unoconv 1>/dev/null 2>/dev/null } && { +#. unoconv -l 2>/dev/null & +#: tomb:2094 +msgid "Creating and updating search indexes." +msgstr "Создаю и обновляю индексы поиска." + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. > _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#: tomb:2107 msgid "Skipping ::1 tomb name:: (.noindex found)." msgstr "Пропускаю ::1 tomb name:: (найден файл .noindex)." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. > _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#: tomb:2109 msgid "Indexing ::1 tomb name:: filenames..." msgstr "Индексирую имена в ::1 tomb name::..." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. > _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#: tomb:2114 msgid "Indexing ::1 tomb name:: contents..." msgstr "Индексирую содержимое ::1 tomb name::..." -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. > _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#. DefaultContents TXT* +#. IndexDir $tombmount +#: tomb:2116 +msgid "Generating a new swish-e configuration file: ::1 swish conf::" +msgstr "Генерирую новый файл конфигурации swish-e: ::1 swish conf::" + +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. } +#. +#. swish-e -c ${tombmount}/.swishrc -S fs -v3 +#. +#. } +#. +#. > _message "Search index updated." +#. done +#. } +#. search_tombs() { +#. { command -v locate 1>/dev/null 2>/dev/null } || { +#: tomb:2190 +msgid "Search index updated." +msgstr "Поисковый индекс обновлен." + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Searching for: ::1::" ${(f)@} +#. for t in ${mounted_tombs}; do +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:2210 +msgid "Searching for: ::1::" +msgstr "Ищу: ::1::" + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. > _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#: tomb:2218 msgid "Searching filenames in tomb ::1 tomb name::" msgstr "Ищу в именах файлов гробницы ::1 tomb name::" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. > _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#: tomb:2220 msgid "Matches found: ::1 matches::" msgstr "Найдены совпадения: ::1 matches::" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" #. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. > _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#: tomb:2225 msgid "Searching contents in tomb ::1 tomb name::" msgstr "Ищу в содержимом гробницы ::1 tomb name::" -#: warning +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. > _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#: tomb:2228 msgid "Skipping tomb ::1 tomb name::: not indexed." msgstr "Пропускаю гробницу ::1 tomb name::: она не индексирована." -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. > _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#. +#: tomb:2229 +msgid "Run 'tomb index' to create indexes." +msgstr "Запустите 'tomb index' для создания индексов." + +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. > _message "Search completed." +#. } +#. +#. # }}} - Index and search +#. +#: tomb:2231 +msgid "Search completed." +msgstr "Поиск завершен." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # {{{ Resize +#. +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. > _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#: tomb:2242 msgid "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." -msgstr "Приказано изменить размер гробницы ::1 tomb name::. Новый размер: ::2 size:: мегабайт." +msgstr "" +"Приказано изменить размер гробницы ::1 tomb name::. Новый размер: ::2 size:: " +"мегабайт." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. > [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#: tomb:2244 +msgid "No tomb name specified for resizing." +msgstr "Не указано имя гробницы для изменения размера." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. > [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. _failure "Aborting operations: new size was not specified, use -s" } +#: tomb:2245 msgid "Cannot find ::1::" msgstr "Не могу найти ::1::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. > _failure "Aborting operations: new size was not specified, use -s" } +#. +#. is_valid_tomb $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#: tomb:2249 msgid "Aborting operations: new size was not specified, use -s" msgstr "Отмена операций: не указан новый размер, используйте -s" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. local oldtombsize=$(( `stat -c %s "$TOMBPATH" 2>/dev/null` / 1048576 )) +#. local mounted_tomb=`mount -l | +#. awk -vtomb="[$TOMBNAME]" '/^\/dev\/mapper\/tomb/ { if($7==tomb) print $1 }'` +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. > _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#: tomb:2261 msgid "Please close the tomb ::1 tomb name:: before trying to resize it." -msgstr "Пожалуйста, закройте гробницу ::1 tomb name::, прежде чем менять ее размер." - -#: failure +msgstr "" +"Пожалуйста, закройте гробницу ::1 tomb name::, прежде чем менять ее размер." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. > _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#: tomb:2264 msgid "You must specify the new size of ::1 tomb name::" msgstr "Вы должны указать новый размер для ::1 tomb name::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. > [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. _failure "The new size must be greater then old tomb size." } +#. +#: tomb:2266 +msgid "Size is not an integer." +msgstr "Размер не целое число." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. > _failure "The new size must be greater then old tomb size." } +#. +#. delta="$(( $newtombsize - $oldtombsize ))" +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#: tomb:2269 +msgid "The new size must be greater then old tomb size." +msgstr "Новый размер гробницы должен быть больше старого." + +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#. +#. _verbose "Data dump using ::1:: from /dev/urandom" ${DD[1]} +#. ${=DD} if=/dev/urandom bs=1048576 count=${delta} >> $TOMBPATH +#. +#. [[ $? == 0 ]] || { +#. > _failure "Error creating the extra resize ::1 size::, operation aborted." $tmp_resize } +#. +#. { option_is_set --tomb-pwd } && { +#. tomb_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_pwd +#: tomb:2279 msgid "Error creating the extra resize ::1 size::, operation aborted." msgstr "Ошибка создания дополнительного размера ::1 size::, операция отменена." -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. mapper="tomb.$TOMBNAME.$mapdate.$(basename $nstloop)" +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} || { +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. > _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#: tomb:2300 msgid "cryptsetup failed to resize ::1 mapper::" msgstr "cryptsetup не смог изменить размер ::1 mapper::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. > _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#: tomb:2303 msgid "e2fsck failed to check ::1 mapper::" msgstr "e2fsck не смог проверить ::1 mapper::" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. > _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#. # close and free the loop device +#. sudo cryptsetup luksClose "${mapper}" +#. +#: tomb:2306 msgid "resize2fs failed to resize ::1 mapper::" msgstr "resize2fs не смог изменить размер ::1 mapper::" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts`) +#. else +#. mounted_tombs=(`list_tomb_mounts $1`) +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#: tomb:2330 +msgid "There is no open tomb to be closed." +msgstr "Нет открытой гробницы для закрытия." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. > _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#: tomb:2333 +msgid "Too many tombs mounted, please specify one (see tomb list)" +msgstr "" +"Примонтировано слишком много гробниц, пожалуйста, укажите точнее (см. tomb " +"list)" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. > _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#: tomb:2334 +msgid "or issue the command 'tomb close all' to close them all." +msgstr "или выполните команду 'tomb close all', чтобы закрыть их все." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. > _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#: tomb:2350 msgid "Tomb not found: ::1 tomb file::" msgstr "Гробница не найдена: ::1 tomb file::" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. > _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #: tomb:2351 +msgid "Please specify an existing tomb." +msgstr "Пожалуйста, укажите существующую гробницу." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#: tomb:2355 +msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" +msgstr "" +"Захлопываю гробницу ::1 tomb name::, примонтированную на ::2 mount point::" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. > _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #: tomb:2357 +msgid "Kill all processes busy inside the tomb." +msgstr "Убиваю все процессы, занятые в гробнице" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. > _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount } +#. +#: tomb:2359 msgid "Cannot slam the tomb ::1 tomb name::" msgstr "Не могу захлопнуть гробницу ::1 tomb name::" -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. > _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" #. $tombname $tombmount } +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#: tomb:2361 msgid "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" -msgstr "Закрываю гробницу ::1 tomb name::, примонтированную на ::2 mount point::" - -#: message +msgstr "" +"Закрываю гробницу ::1 tomb name::, примонтированную на ::2 mount point::" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. > _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#: tomb:2369 #, fuzzy msgid "Closing tomb bind hook: ::1 hook::" msgstr "Закрываю привязку гробницы: ::1 hook::" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#: tomb:2372 +#, fuzzy +msgid "Slamming tomb: killing all processes using this hook." +msgstr "Захлопываю гробницу: убиваю все процессы, использующие эту привязку." + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. > _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#: tomb:2375 msgid "Cannot slam the bind hook ::1 hook::" msgstr "Не могу захлопнуть обработчик ::1 hook::" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. > _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#. done +#. +#. # Execute post-hooks for eventual cleanup +#: tomb:2378 msgid "Tomb bind hook ::1 hook:: is busy, cannot close tomb." msgstr "Обработчик гробницы ::1 hook:: занят, не могу закрыть гробницу." -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. # Execute post-hooks for eventual cleanup +#. { option_is_set -n } || { +#. exec_safe_post_hooks ${tombmount%%/} close } +#. +#. _verbose "Performing umount of ::1 mount point::" $tombmount +#. sudo umount ${tombmount} +#. > [[ $? = 0 ]] || { _warning "Tomb is busy, cannot umount!"; return 1 } +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#: tomb:2388 +msgid "Tomb is busy, cannot umount!" +msgstr "Гробница занята, не могу отмонтировать!" + +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#. sudo cryptsetup luksClose $mapper +#. [[ $? == 0 ]] || { +#. > _failure "Error occurred in cryptsetup luksClose ::1 mapper::" $mapper } +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#: tomb:2395 msgid "Error occurred in cryptsetup luksClose ::1 mapper::" msgstr "Произошла ошибка cryptsetup luksClose ::1 mapper::" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#. _verbose "/dev/$tombloop was already closed." } +#. +#. > _success "Tomb ::1 tomb name:: closed: your bones will rest in peace." $tombname +#. +#. done # loop across mounted tombs +#. +#. return 0 +#: tomb:2402 +msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." +msgstr "Гробница ::1 tomb name:: закрыта: да упокоятся с миром Ваши кости." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. return 1 +#. fi +#. return 0 +#. fi +#. unset discardme +#. if ! zparseopts -M -E -D -Adiscardme ${every_opts}; then +#. > _failure "Error parsing." +#. return 127 +#. fi +#. unset discardme +#. subcommand=$1 +#: tomb:2522 +msgid "Error parsing." +msgstr "Ошибка парсинга." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. subcommand=$1 +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. > _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#: tomb:2532 msgid "There's no such command \"::1 subcommand::\"." msgstr "Нет такой команды \"::1 subcommand::\"." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. > exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#. +#: tomb:2533 msgid "Please try -h for help." msgstr "Используйте -h для вызова справки." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # zsh magic: ${=string} will split to multiple arguments when spaces occur +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. > _warning "Some error occurred during option processing." +#. exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#: tomb:2545 +msgid "Some error occurred during option processing." +msgstr "Произошла какая-то ошибка при обработке опций." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. _warning "Some error occurred during option processing." +#. > exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#. ok=0 +#: tomb:2546 msgid "See \"tomb help\" for more info." msgstr "Для дополнительной информации выполните \"tomb help\"." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. for arg in $*; do +#. if [[ $arg == '--' || $arg == '-' ]]; then +#. ok=1 +#. continue #it shouldnt be appended to PARAM +#. elif [[ $arg[1] == '-' ]]; then +#. if [[ $ok == 0 ]]; then +#. > exitv=127 _failure "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" $arg $subcommand +#. fi +#. fi +#. PARAM+=$arg +#. done +#: tomb:2558 msgid "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" msgstr "Не распознана опция ::1 arg:: для подкоманды ::2 subcommand::" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Use colors unless told not to +#. { ! option_is_set --no-color } && { autoload -Uz colors && colors } +#. # Some options are only available during insecure mode +#. { ! option_is_set --unsafe } && { +#. for opt in --tomb-pwd --use-urandom --tomb-old-pwd; do +#. { option_is_set $opt } && { +#. > exitv=127 _failure "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\nIf you really want so, add --unsafe" $opt } +#. done +#. } +#. # read -t or --tmp flags to set a custom temporary directory +#. option_is_set --tmp && TMPPREFIX=$(option_value --tmp) +#: tomb:2574 +msgid "" +"You specified option ::1 option::, which is DANGEROUS and should only be " +"used for testing\n" +"If you really want so, add --unsafe" +msgstr "" +"Вы указали опцию ::1 option::, которая ОПАСНА и должна быть использована " +"только для тестирования\n" +"Если Вы и правда этого хотите, добавьте параметр --unsafe" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. help) +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. > _warning "The create command is deprecated, please use dig, forge and lock instead." +#. _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#: tomb:2608 +msgid "" +"The create command is deprecated, please use dig, forge and lock instead." +msgstr "Команда create устарела, пожалуйста, используйте dig, forge и lock." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. _warning "The create command is deprecated, please use dig, forge and lock instead." +#. > _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#. # CREATE Step 1: dig -s NN file.tomb +#: tomb:2609 +msgid "For more informations see Tomb's manual page (man tomb)." +msgstr "Для большей информации обратитесь к руководству Tomb (man tomb)." + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. umount_tomb $PARAM[1] +#. ;; +#. +#. # Grow tomb's size +#. resize) +#. [[ $RESIZER == 0 ]] && { +#. > _failure "Resize2fs not installed: cannot resize tombs." } +#. resize_tomb $PARAM[1] +#. ;; +#. +#. ## Contents manipulation +#: tomb:2643 msgid "Resize2fs not installed: cannot resize tombs." msgstr "Resize2fs не установлен: не могу менять размер гробниц." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. ## Locking operations +#. +#. # Export key to QR Code +#. engrave) +#. [[ $QRENCODE == 0 ]] && { +#. > _failure "QREncode not installed: cannot engrave keys on paper." } +#. engrave_key ${=PARAM} +#. ;; +#. +#. # Change password on existing key +#: tomb:2669 msgid "QREncode not installed: cannot engrave keys on paper." msgstr "QREncode не установлен: не могу выгравировывать ключи на бумаге." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. change_tomb_key ${=PARAM} +#. ;; +#. +#. # STEGANOGRAPHY: hide key inside an image +#. bury) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot bury keys into images." } +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#: tomb:2686 msgid "Steghide not installed: cannot bury keys into images." msgstr "Steghide не установлен: не могу прятать ключи в изображениях." -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#. exhume) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot exhume keys from images." } +#. exhume_key $PARAM[1] +#. ;; +#. +#. ## Internal commands useful to developers +#: tomb:2693 msgid "Steghide not installed: cannot exhume keys from images." msgstr "Steghide не установлен: не могу эксгумировать ключи из изображений." -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Ask user for a password interactively +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. > _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#: tomb:2707 msgid "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" msgstr "Tomb ::1 version:: - стойкий и аккуратный хранитель Ваших секретов" -#: print -msgid " Copyright (C) 2007-2014 Dyne.org Foundation, License GNU GPL v3+" -msgstr " Все права защищены (C) 2007-2014 Dyne.org Foundation, Лицензия GNU GPL v3+" +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. > _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#: tomb:2709 +msgid " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. > _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#: tomb:2710 msgid " This is free software: you are free to change and redistribute it" -msgstr " Это свободное программное обеспечение: Вы в праве изменять и распространять его" - -#: print +msgstr "" +" Это свободное программное обеспечение: Вы в праве изменять и распространять " +"его" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. > _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#: tomb:2711 +msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" +msgstr "" +" За последним исходным кодом зайдите на <http://dyne.org/software/tomb>" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. > _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#: tomb:2716 msgid " This source code is distributed in the hope that it will be useful," msgstr " Этот исходный код распространяется с надежной, что он будет полезен," -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. > _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#: tomb:2717 msgid " but WITHOUT ANY WARRANTY; without even the implied warranty of" msgstr " но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ; даже без предполагаемой" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. > _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#: tomb:2718 msgid " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." msgstr " ТОВАРОПРИГОДНОСТИ или ПОЛЕЗНОСТИ ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ." -#: print -msgid "System utils:" -msgstr "Системные утилиты:" - -#: warning -msgid "Command \"::1 subcommand::\" not recognized." -msgstr "Команда \"::1 subcommand::\" не распознана." - -#: print -msgid " passwd change the password of a KEY (needs old pass)" -msgstr " passwd изменить пароль КЛЮЧА (требуется старый пароль)" - -#: print -msgid " setkey change the KEY locking a TOMB (needs old key and pass)" -msgstr " setkey изменить КЛЮЧ, запирающий ГРОБНИЦУ (требуется старый ключ и пароль)" - -#: print -msgid " // Backup on paper:" -msgstr " // Резервная копия на бумаге:" - -#: print -msgid " // Steganography:" -msgstr " // Стеганография:" - -#: print -msgid " bury hide a KEY inside a JPEG image (for use with -k)" -msgstr " bury спрятать КЛЮЧ внутри изображения JPEG (для использования с -k)" - -#: print -msgid " exhume extract a KEY from a JPEG image (prints to stdout)" -msgstr " exhume извлечь КЛЮЧ из изображения JPEG (выводится в стандартный вывод)" - -#: failure -msgid "Exhume failed, no image specified" -msgstr "Эксгумация не удалась, не указано изображения" - -#: print -msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" -msgstr " За последним исходным кодом зайдите на <http://dyne.org/software/tomb>" - -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. > _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#. _print "\000" +#. cat <<EOF +#: tomb:2720 msgid " When in need please refer to <http://dyne.org/support>." msgstr " Если Вам нужна помощь, обращайтесь к <http://dyne.org/support>." -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. > _print "System utils:" +#. _print "\000" +#. cat <<EOF +#. `sudo -V | head -n1` +#. `cryptsetup --version` +#: tomb:2722 +msgid "System utils:" +msgstr "Системные утилиты:" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. `cryptsetup --version` +#. `pinentry --version` +#. `gpg --version | head -n1` - key forging algorithms (GnuPG symmetric ciphers): +#. `list_gnupg_ciphers` +#. EOF +#. _print "\000" +#. > _print "Optional utils:" +#. _print "\000" +#. _list_optional_tools version +#. return 0 +#. } +#: tomb:2732 msgid "Optional utils:" msgstr "Дополнительные утилиты:" -#: failure -msgid "Fatal error setting the permission umask for temporary files" -msgstr "Критическая ошибка при задании маски прав для временных файлов" - -#: failure -msgid "Fatal error setting ownership on temporary file: ::1 temp file::" -msgstr "Критическая ошибка при задании владельца временного файла ::1 temp file::" - -#: warning -msgid "cleartext key from stdin selected: this is unsafe." -msgstr "выбран ключ, явно указанный через стандартный ввод: это небезопасно." - -#: failure -msgid "please use --unsafe if you really want to do this." -msgstr "пожалуйчтв, используйте --unsafe, если Вы действительно этого хотите." - -#: warning -msgid "received key in cleartext from stdin (unsafe mode)" -msgstr "получен ключ в явном виде через стандартный ввод (небезопасный режим)" - -#: failure -msgid "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\n" -"If you really want so, add --unsafe" -msgstr "Вы указали опцию ::1 option::, которая ОПАСНА и должна быть использована только для тестирования\n" -"Если Вы и правда этого хотите, добавьте параметр --unsafe" - -#: failure -msgid "Failing to identify the user who is calling us" -msgstr "Не удалось определить пользователя, вызвавшего меня" - -#: failure -msgid "Fatal error creating the temporary directory: ::1 temp dir::" -msgstr "Критическая ошибка при создании временной директории: ::1 temp dir::" - -#: failure -msgid "Someone is messing up with us trying to hijack temporary files." -msgstr "Кто-то наглый пытается похитить наши временные файлы." - -#: success -msgid "All your swaps are belong to crypt. Good." -msgstr "All your swaps are belong to crypt. Хорошо." - -#: success -msgid "Changing password for ::1 key file::" -msgstr "Меняю пароль для ::1 key file::" - -#: success -msgid "Your passphrase was successfully updated." -msgstr "Ваш пароль успешно обновлен." - -#: success -msgid "Using KDF, iterations: ::1 microseconds::" -msgstr "Использую KDF, итераций: ::1 microseconds::" - -#: success -msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" -msgstr "Кодирую ключ ::1 tomb key:: в изображение ::2 image file::" - -#: success -msgid "Tomb key encoded succesfully into image ::1 image file::" -msgstr "Ключ от гробницы успешно закодирован в изображение ::1 image file::" - -#: success -msgid "Key succesfully exhumed to ::1 key::." -msgstr "Ключ успешно эксгумирован в ::1 key::" - -#: success -msgid "Rendering a printable QRCode for key: ::1 tomb key file::" -msgstr "Рендерю готовый для печати штрих-код для ключа: ::1 tomb key file::" - -#: success -msgid "Operation successful:" -msgstr "Операция успешна." - -#: success -msgid "Creating a new tomb in ::1 tomb path::" -msgstr "Создаю новую гробницу в ::1 tomb path::" - -#: success -msgid "Done digging ::1 tomb name::" -msgstr "::1 tomb name:: выкопана" - -#: success -msgid "Choose the password of your key: ::1 tomb key::" -msgstr "Выберите пароль для вашего ключа: ::1 tomb key::" - -#: success -msgid "Your key is ready:" -msgstr "Ваш ключ готов:" - -#: success -msgid "Locking ::1 tomb file:: with ::2 tomb key file::" -msgstr "Запираю ::1 tomb file:: с помощью ::2 tomb key file::" - -#: success -msgid "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" -msgstr "Ваша гробница готова в ::1 tomb path:: и защищена ключом ::2 tomb key::" - -#: success -msgid "Changing lock on tomb ::1 tomb name::" -msgstr "Меняю замок на гробнице ::1 tomb name::" - -#: success -msgid "Succesfully changed key for tomb: ::1 tomb file::" -msgstr "Ключ для гробницы ::1 tomb file:: успешно изменен" - -#: success -msgid "Opening ::1 tomb file:: on ::2 mount point::" -msgstr "Открываю ::1 tomb file:: в ::2 mount point::" - -#: success -msgid "Success unlocking tomb ::1 tomb name::" -msgstr "Успешно отпер гробницу ::1 tomb name::" - -#: success -msgid "Success opening ::1 tomb file:: on ::2 mount point::" -msgstr "Успешно открыл ::1 tomb file:: в ::2 mount point::" - -#: success -msgid "Post hooks found, executing as user ::1 user name::." -msgstr "Найдены пост-обработчики, выполняю как пользователь ::1 user name::." - -#: success -msgid "Creating and updating search indexes." -msgstr "Создаю и обновляю индексы поиска." - -#: message -msgid "Generating a new swish-e configuration file: ::1 swish conf::" -msgstr "Генерирую новый файл конфигурации swish-e: ::1 swish conf::" - -#: success -msgid "Searching for: ::1::" -msgstr "Ищу: ::1::" - -#: success -msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" -msgstr "Захлопываю гробницу ::1 tomb name::, примонтированную на ::2 mount point::" - -#: success -#, fuzzy -msgid "Slamming tomb: killing all processes using this hook." -msgstr "Захлопываю гробницу: убиваю все процессы, использующие эту привязку." - -#: success -msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." -msgstr "Гробница ::1 tomb name:: закрыта: да упокоятся с миром Ваши кости." +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. } +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. > _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#: tomb:2742 +msgid "Command \"::1 subcommand::\" not recognized." +msgstr "Команда \"::1 subcommand::\" не распознана." -#: warning -msgid "Pinentry error: ::1 error::" -msgstr "Ошибка pinentry: ::1 error::" +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. > _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#. return $? +#: tomb:2743 +msgid "Try -h for help." +msgstr "Используйте -h для вызова справки." -#: warning -msgid "Empty password" -msgstr "Пустой пароль" +#~ msgid " -o mount options used to open (default: rw,noatime,nodev)" +#~ msgstr "" +#~ " -o параметры монтирования при открытии (по умолчанию rw,noatime," +#~ "nodev) " +#~ msgid " Copyright (C) 2007-2014 Dyne.org Foundation, License GNU GPL v3+" +#~ msgstr "" +#~ " Все права защищены (C) 2007-2014 Dyne.org Foundation, Лицензия GNU GPL " +#~ "v3+" diff --git a/extras/po/tomb.pot b/extras/po/tomb.pot @@ -1,12 +1,12 @@ + # Tomb - The Crypto Undertaker. -# Copyright (C) 2007-2013 Dyne.org Foundation +# Copyright (C) 2007-2014 Dyne.org Foundation # Denis Roio <jaromil@dyne.org>, 2013. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Tomb \n" -"PO-Revision-Date: Wed Nov 26 17:50:10 CET 2014\n" +"PO-Revision-Date: Fri Jan 9 17:08:25 2015\n" "Last-Translator: Denis Roio <jaromil@dyne.org>\n" "Language: English\n" "Language-Team: Tomb developers <crypto@lists.dyne.org>\n" @@ -14,1123 +14,5456 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: failure +#. Fold: Safety functions +#. Function: _whoami +#. +#. Code sample: +#. +#. # Set username from UID or environment +#. _USER=$SUDO_USER +#. [[ "$_USER" = "" ]] && { _USER=$USERNAME } +#. [[ "$_USER" = "" ]] && { _USER=$(id -u) } +#. [[ "$_USER" = "" ]] && { +#. > _failure "Failing to identify the user who is calling us" } +#. +#. # Get GID from option -G or the environment +#. option_is_set -G \ +#. && _GID=$(option_value -G) || _GID=$(id -g $_USER) +#: tomb:189 msgid "Failing to identify the user who is calling us" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: _plot +#. +#. Code sample: +#. TOMBFILE=$(basename $TOMBPATH) +#. +#. # The tomb name is TOMBFILE without an extension. +#. # It can start with dots: ..foo.tomb -> ..foo +#. TOMBNAME="${TOMBFILE%\.[^\.]*}" +#. [[ -z $TOMBNAME ]] && { +#. > _failure "Tomb won't work without a TOMBNAME." } +#. +#. # Normalize tomb name +#. TOMBFILE="$TOMBNAME.tomb" +#. +#: tomb:237 msgid "Tomb won't work without a TOMBNAME." msgstr "" -#: failure +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # Provide a random filename in shared memory +#. _tmp_create() { +#. [[ -d "$TMPPREFIX" ]] || { +#. # we create the tempdir with the sticky bit on +#. sudo mkdir -m 1777 "$TMPPREFIX" +#. > [[ $? == 0 ]] || _failure "Fatal error creating the temporary directory: ::1 temp dir::" "$TMPPREFIX" +#. } +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#: tomb:252 msgid "Fatal error creating the temporary directory: ::1 temp dir::" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. # We're going to add one more $RANDOM for each time someone complain +#. # about this being too weak of a random. +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#: tomb:260 msgid "Fatal error setting the permission umask for temporary files" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. tfile="${TMPPREFIX}/$RANDOM$RANDOM$RANDOM$RANDOM" # Temporary file +#. umask 066 +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting the permission umask for temporary files" } +#. +#. [[ -r "$tfile" ]] && { +#. > _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#: tomb:263 msgid "Someone is messing up with us trying to hijack temporary files." msgstr "" -#: failure +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. [[ -r "$tfile" ]] && { +#. _failure "Someone is messing up with us trying to hijack temporary files." } +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#: tomb:267 msgid "Fatal error creating a temporary file: ::1 temp file::" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: _tmp_create +#. +#. Code sample: +#. +#. touch "$tfile" +#. [[ $? == 0 ]] || { +#. _failure "Fatal error creating a temporary file: ::1 temp file::" "$tfile" } +#. +#. [[ $? == 0 ]] || { +#. > _failure "Fatal error setting ownership on temporary file: ::1 temp file::" "$tfile" } +#. +#. _verbose "Created tempfile: ::1 temp file::" "$tfile" +#. TOMBTMP="$tfile" +#. TOMBTMPFILES+=("$tfile") +#: tomb:270 msgid "Fatal error setting ownership on temporary file: ::1 temp file::" msgstr "" -#: success +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. r=1 +#. is_crypt=`sudo dmsetup status "$s" | awk '/crypt/ {print $3}'` +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. > _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#: tomb:316 +msgid "An active swap partition is detected..." +msgstr "" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. [[ $is_crypt == "crypt" ]] && { r=2 } || { break } +#. +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. > _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#: tomb:318 msgid "All your swaps are belong to crypt. Good." msgstr "" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. fi +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. > _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#: tomb:320 +msgid "This poses a security risk." +msgstr "" + +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. done +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. > _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#: tomb:321 msgid "You can deactivate all swap partitions using the command:" msgstr "" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. _message "An active swap partition is detected..." +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. > _warning " swapoff -a" +#. _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#: tomb:322 msgid " swapoff -a" msgstr "" -#: warning +#. Fold: Safety functions +#. Function: _ensure_safe_swap +#. +#. Code sample: +#. if [[ $r -eq 2 ]]; then +#. _success "All your swaps are belong to crypt. Good." +#. else +#. _warning "This poses a security risk." +#. _warning "You can deactivate all swap partitions using the command:" +#. _warning " swapoff -a" +#. > _warning "But if you want to proceed like this, use the -f (force) flag." +#. fi +#. return $r +#. +#. } +#: tomb:323 msgid "But if you want to proceed like this, use the -f (force) flag." msgstr "" -#: failure +#. Fold: Safety functions +#. Function: _check_swap +#. +#. Code sample: +#. _ensure_safe_swap +#. case $? in +#. 0|2) # No, or encrypted swap +#. return 0 +#. ;; +#. *) # Unencrypted swap +#. > _failure "Operation aborted." +#. ;; +#. esac +#. fi +#. } +#: tomb:342 msgid "Operation aborted." msgstr "" -#: failure +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find pinentry-curses and no DISPLAY detected." +#. fi +#. +#. else # a DISPLAY is found to be active +#. +#: tomb:379 msgid "Cannot find pinentry-curses and no DISPLAY detected." msgstr "" -#: warning +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. EOF` +#. +#. else +#. +#. if _is_found "pinentry-curses"; then +#. +#. > _warning "Detected DISPLAY, but only pinentry-curses is found." +#. output=`cat <<EOF | pinentry-curses +#. OPTION ttyname=$TTY +#. OPTION lc-ctype=$LANG +#. SETTITLE $title +#: tomb:432 msgid "Detected DISPLAY, but only pinentry-curses is found." msgstr "" -#: failure +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. SETTITLE $title +#. SETDESC $description +#. SETPROMPT Password: +#. GETPIN +#. EOF` +#. else +#. > _failure "Cannot find any pinentry: impossible to ask for password." +#. fi +#. +#. fi +#. +#: tomb:442 msgid "Cannot find any pinentry: impossible to ask for password." msgstr "" -#: warning +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. fi # end of DISPLAY block +#. +#. # parse the pinentry output +#. for i in ${(f)output}; do +#. [[ "$i" =~ "^ERR.*" ]] && { +#. > _warning "Pinentry error: ::1 error::" ${i[(w)3]} +#. print "canceled" +#. return 1 } +#. +#. # here the password is found +#: tomb:452 msgid "Pinentry error: ::1 error::" msgstr "" -#: warning +#. Fold: Safety functions +#. Function: ask_password +#. +#. Code sample: +#. +#. # here the password is found +#. [[ "$i" =~ "^D .*" ]] && password="${i##D }" +#. done +#. +#. [[ "$password" = "" ]] && { +#. > _warning "Empty password" +#. print "empty" +#. return 1 } +#. +#. print "$password" +#: tomb:461 msgid "Empty password" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Check if a filename is a valid tomb +#. is_valid_tomb() { +#. _verbose "is_valid_tomb ::1 tomb file::" $1 +#. +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. > _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#: tomb:477 msgid "Tomb file is missing from arguments." msgstr "" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # First argument must be the path to a tomb +#. [[ -z "$1" ]] && { +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. > _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#: tomb:481 msgid "Tomb file not found: ::1 tomb file::" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file is missing from arguments." } +#. +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. > _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#: tomb:483 msgid "Tomb file is not a regular file: ::1 tomb file::" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # Tomb file must be a readable, writable, not-empty regular file. +#. [[ ! -r "$1" ]] && { +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. > _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#: tomb:485 msgid "Tomb file is empty (zero length): ::1 tomb file::" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _failure "Tomb file not found: ::1 tomb file::" $1 } +#. [[ ! -f "$1" ]] && { +#. _failure "Tomb file is not a regular file: ::1 tomb file::" $1 } +#. [[ ! -s "$1" ]] && { +#. _failure "Tomb file is empty (zero length): ::1 tomb file::" $1 } +#. [[ ! -w "$1" ]] && { +#. > _failure "Tomb file is not writable: ::1 tomb file::" $1 } +#. +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#: tomb:487 msgid "Tomb file is not writable: ::1 tomb file::" msgstr "" -#: warning +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. # TODO: split the rest of that function out. +#. # We already have a valid tomb, now we're checking +#. # whether we can alter it. +#. +#. # Tomb file may be a LUKS FS (or we are creating it) +#. [[ "`file $1`" =~ "luks encrypted file" ]] || { +#. > _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#: tomb:495 msgid "File is not yet a tomb: ::1 tomb file::" msgstr "" -#: failure +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. _warning "File is not yet a tomb: ::1 tomb file::" $1 } +#. +#. _plot $1 # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. > _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#: tomb:501 msgid "Tomb is currently in use: ::1 tomb name::" msgstr "" -#: message +#. Fold: Safety functions +#. Function: is_valid_tomb +#. +#. Code sample: +#. +#. # Tomb cannot be already mounted (or we cannot alter it) +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]$" ]] && { +#. _failure "Tomb is currently in use: ::1 tomb name::" $TOMBNAME +#. } +#. +#. > _message "Valid tomb file found: ::1 tomb path::" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:504 msgid "Valid tomb file found: ::1 tomb path::" msgstr "" -#: warning +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. lo_mount() { +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. > _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#: tomb:516 msgid "Loop mount of volumes is not possible on this machine, this error" msgstr "" -#: warning +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. tpath="$1" +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. > _warning "often occurs on VPS and kernels that don't provide the loop module." +#. _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#: tomb:517 msgid "often occurs on VPS and kernels that don't provide the loop module." msgstr "" -#: warning +#. Fold: Safety functions +#. Function: lo_mount +#. +#. Code sample: +#. +#. # check if we have support for loop mounting +#. _nstloop=`sudo losetup -f` +#. [[ $? = 0 ]] || { +#. _warning "Loop mount of volumes is not possible on this machine, this error" +#. _warning "often occurs on VPS and kernels that don't provide the loop module." +#. > _warning "It is impossible to use Tomb on this machine at this conditions." +#. _failure "Operation aborted." +#. } +#. +#. sudo losetup -f "$tpath" # allocates the next loopback for our file +#: tomb:518 msgid "It is impossible to use Tomb on this machine at this conditions." msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # }}} +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. > _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#: tomb:558 msgid "Syntax: tomb [options] command [arguments]" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. # {{{ Commandline interaction +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. > _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#: tomb:560 msgid "Commands:" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. > _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#: tomb:562 msgid " // Creation:" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. usage() { +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. > _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#: tomb:563 msgid " dig create a new empty TOMB file of size -s in MB" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Syntax: tomb [options] command [arguments]" +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. > _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#: tomb:564 msgid " forge create a new KEY file and set its password" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Commands:" +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. > _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#: tomb:565 msgid " lock installs a lock on a TOMB to use it with KEY" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. > _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#: tomb:567 msgid " // Operations on tombs:" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Creation:" +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. > _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#: tomb:568 msgid " open open an existing TOMB" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " dig create a new empty TOMB file of size -s in MB" +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. > _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#: tomb:569 msgid " index update the search indexes of tombs" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " forge create a new KEY file and set its password" +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. > _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#: tomb:570 msgid " search looks for filenames matching text patterns" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " lock installs a lock on a TOMB to use it with KEY" +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. > _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#: tomb:571 msgid " list list of open TOMBs and information on them" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. > _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#: tomb:572 msgid " close close a specific TOMB (or 'all')" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on tombs:" +#. _print " open open an existing TOMB" +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. > _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#: tomb:573 msgid " slam slam a TOMB killing all programs using it" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " index update the search indexes of tombs" +#. _print " search looks for filenames matching text patterns" +#. _print " list list of open TOMBs and information on them" +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. > _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#: tomb:575 msgid " resize resize a TOMB to a new size -s (can only grow)" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " close close a specific TOMB (or 'all')" +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. > _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#: tomb:578 msgid " // Operations on keys:" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " slam slam a TOMB killing all programs using it" +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. > _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#: tomb:579 msgid " passwd change the password of a KEY (needs old pass)" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $RESIZER == 1 ]] && { +#. _print " resize resize a TOMB to a new size -s (can only grow)" +#. } +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. > _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#: tomb:580 msgid " setkey change the KEY locking a TOMB (needs old key and pass)" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. > _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#: tomb:583 msgid " // Backup on paper:" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Operations on keys:" +#. _print " passwd change the password of a KEY (needs old pass)" +#. _print " setkey change the KEY locking a TOMB (needs old key and pass)" +#. _print "\000" +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. > _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#: tomb:584 msgid " engrave makes a QR code of a KEY to be saved on paper" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $QRENCODE == 1 ]] && { +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. > _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#: tomb:588 msgid " // Steganography:" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " // Backup on paper:" +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. > _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#: tomb:589 msgid " bury hide a KEY inside a JPEG image (for use with -k)" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " engrave makes a QR code of a KEY to be saved on paper" +#. } +#. _print "\000" +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. > _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#: tomb:590 msgid " exhume extract a KEY from a JPEG image (prints to stdout)" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $STEGHIDE == 1 ]] && { +#. _print " // Steganography:" +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. > _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#: tomb:593 msgid "Options:" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " bury hide a KEY inside a JPEG image (for use with -k)" +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. > _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#: tomb:595 msgid " -s size of the tomb file when creating/resizing one (in MB)" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " exhume extract a KEY from a JPEG image (prints to stdout)" +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. > _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#: tomb:596 msgid " -k path to the key to be used ('-k -' to read from stdin)" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. > _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#: tomb:597 msgid " -n don't process the hooks found in tomb" msgstr "" -#: print -msgid " -o mount options used to open (default: rw,noatime,nodev)" -msgstr "" - -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. > _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#: tomb:598 +msgid " -o options passed to local command, e.g.:" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "Options:" +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. > _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#: tomb:599 +msgid " - mount options used to open (default: rw,noatime,nodev)" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. > _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#: tomb:600 +msgid " - an alternate cipher to forge and lock" +msgstr "" + +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -s size of the tomb file when creating/resizing one (in MB)" +#. _print " -k path to the key to be used ('-k -' to read from stdin)" +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. > _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#: tomb:601 msgid " -f force operation (i.e. even if swap is active)" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -n don't process the hooks found in tomb" +#. _print " -o options passed to local command, e.g.:" +#. _print " - mount options used to open (default: rw,noatime,nodev)" +#. _print " - an alternate cipher to forge and lock" +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. > _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#: tomb:603 msgid " --kdf generate passwords armored against dictionary attacks" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -f force operation (i.e. even if swap is active)" +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. > _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#: tomb:607 msgid " -h print this help" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. [[ $KDF == 1 ]] && { +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. > _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#: tomb:608 msgid " -v print version, license and list of available ciphers" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " --kdf generate passwords armored against dictionary attacks" +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. > _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#: tomb:609 msgid " -q run quietly without printing informations" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. } +#. +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. > _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#: tomb:610 msgid " -D print debugging information at runtime" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print "\000" +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. > _print "For more informations on Tomb read the manual: man tomb" +#. _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#: tomb:612 msgid "For more informations on Tomb read the manual: man tomb" msgstr "" -#: print +#. Fold: Commandline interaction +#. Function: usage +#. +#. Code sample: +#. _print " -h print this help" +#. _print " -v print version, license and list of available ciphers" +#. _print " -q run quietly without printing informations" +#. _print " -D print debugging information at runtime" +#. _print "\000" +#. _print "For more informations on Tomb read the manual: man tomb" +#. > _print "Please report bugs on <http://github.com/dyne/tomb/issues>." +#. } +#. +#. +#. # Check whether a commandline option is set. +#: tomb:613 msgid "Please report bugs on <http://github.com/dyne/tomb/issues>." msgstr "" -#: failure +#. Fold: Commandline interaction +#. Function: _ensure_dependencies +#. +#. Code sample: +#. # missing, bail out. +#. _ensure_dependencies() { +#. +#. # Check for required programs +#. for req in cryptsetup pinentry sudo gpg mkfs.ext4 e2fsck; do +#. command -v $req 1>/dev/null 2>/dev/null || { +#. > _failure "Missing required dependency ::1 command::. Please install it." $req } +#. done +#. +#. # Ensure system binaries are available in the PATH +#. path+=(/sbin /usr/sbin) # zsh magic +#: tomb:748 msgid "Missing required dependency ::1 command::. Please install it." msgstr "" -#: warning +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. > _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#: tomb:785 msgid "cleartext key from stdin selected: this is unsafe." msgstr "" -#: failure +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. _verbose "is_valid_key" +#. +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. > exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#: tomb:786 msgid "please use --unsafe if you really want to do this." msgstr "" -#: warning +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. [[ -z $key ]] && key=$TOMBKEY +#. [[ "$key" = "cleartext" ]] && { +#. { option_is_set --unsafe } || { +#. _warning "cleartext key from stdin selected: this is unsafe." +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. > _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. _warning "is_valid_key() called without an argument." +#: tomb:788 msgid "received key in cleartext from stdin (unsafe mode)" msgstr "" -#: warning +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. exitv=127 _failure "please use --unsafe if you really want to do this." +#. } +#. _warning "received key in cleartext from stdin (unsafe mode)" +#. return 0 } +#. +#. [[ -z $key ]] && { +#. > _warning "is_valid_key() called without an argument." +#. return 1 +#. } +#. +#. # If the key file is an image don't check file header +#: tomb:792 msgid "is_valid_key() called without an argument." msgstr "" -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. } +#. +#. # If the key file is an image don't check file header +#. [[ -r $TOMBKEYFILE ]] \ +#. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] \ +#. && { +#. > _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. _message "Key is valid." +#: tomb:800 msgid "Key is an image, it might be valid." msgstr "" -#: message +#. Fold: Key operations +#. Function: is_valid_key +#. +#. Code sample: +#. && [[ $(file $TOMBKEYFILE) =~ "JP.G" ]] \ +#. && { +#. _message "Key is an image, it might be valid." +#. return 0 } +#. +#. [[ $key =~ "BEGIN PGP" ]] && { +#. > _message "Key is valid." +#. return 0 } +#. +#. return 1 +#. } +#: tomb:804 msgid "Key is valid." msgstr "" -#: warning +#. Fold: Key operations +#. Function: _tomb_key_recover recover_key +#. +#. Code sample: +#. } +#. +#. # $1 is a string containing an encrypted key +#. _tomb_key_recover recover_key() { +#. local key="${1}" # Unique argument is an encrypted key +#. +#. > _warning "Attempting key recovery." +#. +#. _head="${key[(f)1]}" # take the first line +#. +#. TOMBKEY="" # Reset global variable +#: tomb:814 msgid "Attempting key recovery." msgstr "" -#: failure +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. # Set global variables TOMBKEY and TOMBKEYFILE. +#. _load_key() { +#. local keyfile="$1" # Unique argument is an optional keyfile +#. +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. > _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. _message "Waiting for the key to be piped from stdin... " +#: tomb:838 msgid "This operation requires a key file to be specified using the -k option." msgstr "" -#: message +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. [[ -z $keyfile ]] && keyfile=$(option_value -k) +#. [[ -z $keyfile ]] && { +#. _failure "This operation requires a key file to be specified using the -k option." } +#. +#. if [[ $keyfile == "-" ]]; then +#. _verbose "load_key reading from stdin." +#. > _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=stdin +#. TOMBKEY=$(cat) +#. elif [[ $keyfile == "cleartext" ]]; then +#. _verbose "load_key reading SECRET from stdin" +#: tomb:842 msgid "Waiting for the key to be piped from stdin... " msgstr "" -#: failure +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. _message "Waiting for the key to be piped from stdin... " +#. TOMBKEYFILE=cleartext +#. TOMBKEY=cleartext +#. TOMBSECRET=$(cat) +#. else +#. _verbose "load_key argument: ::1 key file::" $keyfile +#. > [[ -r $keyfile ]] || _failure "Key not found, specify one using -k." +#. TOMBKEYFILE=$keyfile +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#: tomb:853 msgid "Key not found, specify one using -k." msgstr "" -#: warning +#. Fold: Key operations +#. Function: _load_key +#. +#. Code sample: +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. fi +#. +#. _verbose "load_key: ::1 key::" $TOMBKEYFILE +#. +#. is_valid_key $TOMBKEY || { +#. > _warning "The key seems invalid or its format is not known by this version of Tomb." +#. _tomb_key_recover $TOMBKEY +#. } +#. +#. # Declared TOMBKEYFILE (path) +#: tomb:861 msgid "The key seems invalid or its format is not known by this version of Tomb." msgstr "" -#: failure +#. Fold: Key operations +#. Function: get_lukskey +#. +#. Code sample: +#. _verbose "KDF salt: $kdf_salt" +#. _verbose "KDF ic: $kdf_ic" +#. _verbose "KDF len: $kdf_len" +#. _password=$(tomb-kdb-pbkdf2 $kdf_salt $kdf_ic $kdf_len 2>/dev/null <<<$_password) +#. ;; +#. *) +#. > _failure "No suitable program for KDF ::1 program::." $pbkdf_hash +#. unset _password +#. return 1 +#. ;; +#. esac +#: tomb:936 msgid "No suitable program for KDF ::1 program::." msgstr "" -#: failure +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. +#. # This function asks the user for the password to use the key it tests +#. # it against the return code of gpg on success returns 0 and saves +#. # the password in the global variable $TOMBPASSWORD +#. ask_key_password() { +#. [[ -z "$TOMBKEYFILE" ]] && { +#. > _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#: tomb:962 msgid "Internal error: ask_key_password() called before _load_key()." msgstr "" -#: message +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. _failure "Internal error: ask_key_password() called before _load_key()." } +#. +#. [[ "$TOMBKEYFILE" = "cleartext" ]] && { +#. _verbose "no password needed, using secret bytes from stdin" +#. return 0 } +#. +#. > _message "A password is required to use key ::1 key::" $TOMBKEYFILE +#. passok=0 +#. tombpass="" +#. if [[ "$1" = "" ]]; then +#. +#: tomb:968 msgid "A password is required to use key ::1 key::" msgstr "" -#: warning +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. if [[ $c == 1 ]]; then +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE") +#. else +#. tombpass=$(ask_password "Insert password to: $TOMBKEYFILE (attempt $c)") +#. fi +#. [[ $? = 0 ]] || { +#. > _warning "User aborted password dialog." +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#: tomb:980 msgid "User aborted password dialog." msgstr "" -#: message +#. Fold: Key operations +#. Function: ask_key_password +#. +#. Code sample: +#. return 1 +#. } +#. +#. get_lukskey "$tombpass" +#. +#. [[ $? = 0 ]] && { +#. > passok=1; _message "Password OK." +#. break; +#. } +#. done +#. +#: tomb:987 msgid "Password OK." msgstr "" -#: message +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. change_passwd() { +#. local tmpnewkey lukskey c tombpass tombpasstmp +#. +#. _check_swap # Ensure swap is secure, if any +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. > _message "Commanded to change password for tomb key ::1 key::" $TOMBKEYFILE +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. +#: tomb:1025 msgid "Commanded to change password for tomb key ::1 key::" msgstr "" -#: failure +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. local tomboldpwd="`option_value --tomb-old-pwd`" +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomboldpwd +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. > [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#: tomb:1037 msgid "No valid password supplied." msgstr "" -#: success +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. ask_key_password "$tomboldpwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Changing password for ::1 key file::" $TOMBKEYFILE +#. +#. # Here $TOMBSECRET contains the key material in clear +#. +#. { option_is_set --tomb-pwd } && { +#: tomb:1039 msgid "Changing password for ::1 key file::" msgstr "" -#: failure +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. gen_key "$tombpwd" >> "$tmpnewkey" +#. } || { +#. gen_key >> "$tmpnewkey" +#. } +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. > _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. _success "Your passphrase was successfully updated." +#: tomb:1052 msgid "Error: the newly generated keyfile does not seem valid." msgstr "" -#: success +#. Fold: Key operations +#. Function: change_passwd +#. +#. Code sample: +#. +#. { is_valid_key "${mapfile[$tmpnewkey]}" } || { +#. _failure "Error: the newly generated keyfile does not seem valid." } +#. +#. # Copy the new key as the original keyfile name +#. cp -f "${tmpnewkey}" $TOMBKEYFILE +#. > _success "Your passphrase was successfully updated." +#. +#. return 0 +#. } +#. +#: tomb:1056 msgid "Your passphrase was successfully updated." msgstr "" -#: failure +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. +#. if [ "$1" = "" ]; then +#. while true; do +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. > _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. _failure "You set empty password, which is not possible." +#. fi +#: tomb:1078 msgid "User aborted." msgstr "" -#: failure +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # 3 tries to write two times a matching password +#. tombpass=`ask_password "Type the new password to secure your key"` +#. if [[ $? != 0 ]]; then +#. _failure "User aborted." +#. fi +#. if [ -z $tombpass ]; then +#. > _failure "You set empty password, which is not possible." +#. fi +#. tombpasstmp=$tombpass +#. tombpass=`ask_password "Type the new password to secure your key (again)"` +#. if [[ $? != 0 ]]; then +#: tomb:1081 msgid "You set empty password, which is not possible." msgstr "" -#: failure +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # see: https://github.com/dyne/Tomb/issues/82 +#. itertime="`option_value --kdf`" +#. # removing support of floating points because they can't be type checked well +#. if [[ "$itertime" != <-> ]]; then +#. unset tombpass +#. unset tombpasstmp +#. > _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#: tomb:1109 msgid "Wrong argument for --kdf: must be an integer number (iteration seconds)." msgstr "" -#: success +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. unset tombpasstmp +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. > _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#: tomb:1114 msgid "Using KDF, iterations: ::1 microseconds::" msgstr "" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. _failure "Wrong argument for --kdf: must be an integer number (iteration seconds)." +#. fi +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. > _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#: tomb:1115 msgid "generating salt" msgstr "" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. # --kdf takes one parameter: iter time (on present machine) in seconds +#. local -i microseconds +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. > _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#: tomb:1117 msgid "calculating iterations" msgstr "" -#: message +#. Fold: Key operations +#. Function: gen_key +#. +#. Code sample: +#. microseconds=$(( itertime * 10000 )) +#. _success "Using KDF, iterations: ::1 microseconds::" $microseconds +#. _message "generating salt" +#. pbkdf2_salt=`tomb-kdb-pbkdf2-gensalt` +#. _message "calculating iterations" +#. pbkdf2_iter=`tomb-kdb-pbkdf2-getiter $microseconds` +#. > _message "encoding the password" +#. # We use a length of 64bytes = 512bits (more than needed!?) +#. tombpass=`tomb-kdb-pbkdf2 $pbkdf2_salt $pbkdf2_iter 64 <<<"${tombpass}"` +#. +#. header="_KDF_pbkdf2sha1_${pbkdf2_salt}_${pbkdf2_iter}_64\n" +#: tomb:1119 msgid "encoding the password" msgstr "" -#: failure +#. Fold: Key operations +#. Function: list_gnupg_ciphers +#. +#. Code sample: +#. unset tombpasstmp +#. } +#. +#. # prints an array of ciphers available in gnupg (to encrypt keys) +#. list_gnupg_ciphers() { +#. # prints an error if GnuPG is not found +#. > which gpg 2>/dev/null || _failure "gpg (GnuPG) is not found, Tomb cannot function without it." +#. +#. ciphers=(`gpg --version | awk ' +#. BEGIN { ciphers=0 } +#. /^Cipher:/ { gsub(/,/,""); sub(/^Cipher:/,""); print; ciphers=1; next } +#: tomb:1150 msgid "gpg (GnuPG) is not found, Tomb cannot function without it." msgstr "" -#: warning +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEY +#. +#. imagefile=$PARAM +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. > _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#: tomb:1171 msgid "Encode failed: ::1 image file:: is not a jpeg image." msgstr "" -#: success +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. > _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#: tomb:1175 msgid "Encoding key ::1 tomb key:: inside image ::2 image file::" msgstr "" -#: message +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. [[ "`file $imagefile`" =~ "JPEG" ]] || { +#. _warning "Encode failed: ::1 image file:: is not a jpeg image." $imagefile +#. return 1 +#. } +#. +#. _success "Encoding key ::1 tomb key:: inside image ::2 image file::" $TOMBKEY $imagefile +#. > _message "Please confirm the key password for the encoding" +#. # We ask the password and test if it is the same encoding the +#. # base key, to insure that the same password is used for the +#. # encryption and the steganography. This is a standard enforced +#. # by Tomb, but its not strictly necessary (and having different +#: tomb:1176 msgid "Please confirm the key password for the encoding" msgstr "" -#: warning +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpwd +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. > _warning "Wrong password supplied." +#. _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#: tomb:1192 msgid "Wrong password supplied." msgstr "" -#: failure +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. ask_key_password "$tombpwd" +#. } || { +#. ask_key_password +#. } +#. [[ $? != 0 ]] && { +#. _warning "Wrong password supplied." +#. > _failure "You shall not bury a key whose password is unknown to you." } +#. +#. # We omit armor strings since having them as constants can give +#. # ground to effective attacks on steganography +#. print - "$TOMBKEY" | awk ' +#: tomb:1193 msgid "You shall not bury a key whose password is unknown to you." msgstr "" -#: warning +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. /^-----/ {next} +#. /^Version/ {next} +#. {print $0}' \ +#. | steghide embed --embedfile - --coverfile ${imagefile} \ +#. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. > _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#: tomb:1204 msgid "Encoding error: steghide reports problems." msgstr "" -#: success +#. Fold: Key operations +#. Function: bury_key +#. +#. Code sample: +#. | steghide embed --embedfile - --coverfile ${imagefile} \ +#. -p $TOMBPASSWORD -z 9 -e serpent cbc +#. if [ $? != 0 ]; then +#. _warning "Encoding error: steghide reports problems." +#. res=1 +#. else +#. > _success "Tomb key encoded succesfully into image ::1 image file::" $imagefile +#. res=0 +#. fi +#. +#. return $res +#: tomb:1207 msgid "Tomb key encoded succesfully into image ::1 image file::" msgstr "" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # mandatory 1st arg: the image file where key is supposed to be +#. # optional 2nd arg: the password to use (same as key, internal use) +#. # optional 3rd arg: the key where to save the result (- for stdout) +#. exhume_key() { +#. [[ "$1" = "" ]] && { +#. > _failure "Exhume failed, no image specified" } +#. +#. local imagefile="$1" # The image file where to look for the key +#. local tombpass="$2" # (Optional) the password to use (internal use) +#. local destkey="$3" # (Optional) the key file where to save the +#: tomb:1219 msgid "Exhume failed, no image specified" msgstr "" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local destkey="$3" # (Optional) the key file where to save the +#. # result (- for stdout) +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. > _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#: tomb:1229 msgid "Exhume failed, image file not found: ::1 image file::" msgstr "" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. local r=1 # Return code (default: fail) +#. +#. # Ensure the image file is a readable JPEG +#. [[ ! -r $imagefile ]] && { +#. _failure "Exhume failed, image file not found: ::1 image file::" "${imagefile:-none}" } +#. [[ ! $(file "$imagefile") =~ "JP.G" ]] && { +#. > _failure "Exhume failed: ::1 image file:: is not a jpeg image." $imagefile } +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#: tomb:1231 msgid "Exhume failed: ::1 image file:: is not a jpeg image." msgstr "" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # When a password is passed as argument then always print out +#. # the exhumed key on stdout without further checks (internal use) +#. [[ -n "$tombpass" ]] && { +#. TOMBKEY=$(steghide extract -sf $imagefile -p $tombpass -xf -) +#. [[ $? != 0 ]] && { +#. > _failure "Wrong password or no steganographic key found" } +#. +#. recover_key $TOMBKEY +#. +#. return 0 +#: tomb:1238 msgid "Wrong password or no steganographic key found" msgstr "" -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. } +#. +#. # Ensure we have a valid destination for the key +#. [[ -z $destkey ]] && { option_is_set -k } && destkey=$(option_value -k) +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. > _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#: tomb:1249 msgid "printing exhumed key on stdout" msgstr "" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ -z $destkey ]] && { +#. destkey="-" # No key was specified: fallback to stdout +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. > _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#: tomb:1253 msgid "File exists: ::1 tomb key::" msgstr "" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _message "printing exhumed key on stdout" } +#. +#. # Bail out if destination exists, unless -f (force) was passed +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. > _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#: tomb:1255 msgid "Use of --force selected: overwriting." msgstr "" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. [[ $destkey != "-" && -s $destkey ]] && { +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. > _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#: tomb:1258 msgid "Make explicit use of --force to overwrite." msgstr "" -#: failure +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. _warning "File exists: ::1 tomb key::" $destkey +#. { option_is_set -f } && { +#. _warning "Use of --force selected: overwriting." +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. > _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#: tomb:1259 msgid "Refusing to overwrite file. Operation aborted." msgstr "" -#: message +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. rm -f $destkey +#. } || { +#. _warning "Make explicit use of --force to overwrite." +#. _failure "Refusing to overwrite file. Operation aborted." } +#. } +#. +#. > _message "Trying to exhume a key out of image ::1 image file::" $imagefile +#. { option_is_set --tomb-pwd } && { +#. tombpass=$(option_value --tomb-pwd) +#. _verbose "tomb-pwd = ::1 tomb pass::" $tombpass +#. } || { +#: tomb:1262 msgid "Trying to exhume a key out of image ::1 image file::" msgstr "" -#: success +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. steghide extract -sf $imagefile -p ${tombpass} -xf $destkey +#. r=$? +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. > _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#: tomb:1283 msgid "Key succesfully exhumed to ::1 key::." msgstr "" -#: warning +#. Fold: Key operations +#. Function: exhume_key +#. +#. Code sample: +#. +#. # Report to the user +#. [[ "$destkey" = "-" ]] && destkey="stdout" +#. [[ $r == 0 ]] && { +#. _success "Key succesfully exhumed to ::1 key::." $destkey +#. } || { +#. > _warning "Nothing found in ::1 image file::" $imagefile +#. } +#. +#. return $r +#. } +#: tomb:1285 msgid "Nothing found in ::1 image file::" msgstr "" -#: success +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. local keyname=$(basename $TOMBKEYFILE) +#. local pngname="$keyname.qr.png" +#. +#. > _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE \ +#. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#: tomb:1300 msgid "Rendering a printable QRCode for key: ::1 tomb key file::" msgstr "" -#: failure +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. +#. _success "Rendering a printable QRCode for key: ::1 tomb key file::" $TOMBKEYFILE +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE \ +#. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. > _failure "QREncode reported an error." } +#. +#. _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#: tomb:1305 msgid "QREncode reported an error." msgstr "" -#: success +#. Fold: Key operations +#. Function: engrave_key +#. +#. Code sample: +#. # we omit armor strings to save space +#. awk '/^-----/ {next}; /^Version/ {next}; {print $0}' $TOMBKEYFILE \ +#. | qrencode --size 4 --level H --casesensitive -o $pngname +#. [[ $? != 0 ]] && { +#. _failure "QREncode reported an error." } +#. +#. > _success "Operation successful:" +#. # TODO: only if verbose and/or not silent +#. ls -lh $pngname +#. file $pngname +#. } +#: tomb:1307 msgid "Operation successful:" msgstr "" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. dig_tomb() { +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. > _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#: tomb:1340 msgid "Commanded to dig tomb ::1 tomb path::" msgstr "" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local tombpath="$1" # Path to tomb +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. > [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#: tomb:1342 msgid "Missing path to tomb" msgstr "" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. # Require the specification of the size of the tomb (-s) in MB +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. > [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#: tomb:1343 msgid "Size argument missing, use -s" msgstr "" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. local -i tombsize=$(option_value -s) +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. > [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#: tomb:1344 msgid "Size must be an integer (megabytes)" msgstr "" -#: failure +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Commanded to dig tomb ::1 tomb path::" $tombpath +#. +#. [[ -n "$tombpath" ]] || _failure "Missing path to tomb" +#. [[ -n "$tombsize" ]] || _failure "Size argument missing, use -s" +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. > [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#: tomb:1345 msgid "Tombs can't be smaller than 10 megabytes" msgstr "" -#: warning +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ $tombsize == <-> ]] || _failure "Size must be an integer (megabytes)" +#. [[ $tombsize -ge 10 ]] || _failure "Tombs can't be smaller than 10 megabytes" +#. +#. _plot $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. [[ -e $TOMBPATH ]] && { +#. > _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#: tomb:1350 msgid "A tomb exists already. I'm not digging here:" msgstr "" -#: success +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. [[ -e $TOMBPATH ]] && { +#. _warning "A tomb exists already. I'm not digging here:" +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. > _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#: tomb:1355 msgid "Creating a new tomb in ::1 tomb path::" msgstr "" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. return 1 +#. } +#. +#. _success "Creating a new tomb in ::1 tomb path::" $TOMBPATH +#. +#. > _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#: tomb:1357 msgid "Generating ::1 tomb file:: of ::2 size::MiB" msgstr "" -#: warning +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $tombsize +#. +#. # Ensure that file permissions are safe even if interrupted +#. touch $TOMBPATH +#. [[ $? = 0 ]] || { +#. > _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. chmod 0600 $TOMBPATH +#. +#: tomb:1362 msgid "Error creating the tomb ::1 tomb path::" msgstr "" -#: success +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. ls -lh $TOMBPATH +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. > _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#: tomb:1377 msgid "Done digging ::1 tomb name::" msgstr "" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. } || { +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. > _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#: tomb:1378 msgid "Your tomb is not yet ready, you need to forge a key and lock it:" msgstr "" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _warning "Error creating the tomb ::1 tomb path::" $TOMBPATH +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. > _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#: tomb:1379 msgid "tomb forge ::1 tomb path::.key" msgstr "" -#: message +#. Fold: Create +#. Function: dig_tomb +#. +#. Code sample: +#. _failure "Operation aborted." +#. } +#. +#. _success "Done digging ::1 tomb name::" $TOMBNAME +#. _message "Your tomb is not yet ready, you need to forge a key and lock it:" +#. _message "tomb forge ::1 tomb path::.key" $TOMBPATH +#. > _message "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" $TOMBPATH +#. +#. return 0 +#. } +#. +#: tomb:1380 msgid "tomb lock ::1 tomb path:: -k ::1 tomb path::.key" msgstr "" -#: failure +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. local destkey="$1" +#. { option_is_set -k } && { destkey=$(option_value -k) } +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. > _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#: tomb:1401 msgid "A filename needs to be specified using -k to forge a new key." msgstr "" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. local algo="AES256" # Default encryption algorithm +#. +#. [[ -z "$destkey" ]] && { +#. _failure "A filename needs to be specified using -k to forge a new key." } +#. +#. > _message "Commanded to forge key ::1 key::" $destkey +#. +#. _check_swap # Ensure the available memory is safe to use +#. +#. # Ensure GnuPG won't exit with an error before first run +#: tomb:1403 msgid "Commanded to forge key ::1 key::" msgstr "" -#: failure +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. mkdir -m 0700 $HOME/.gnupg +#. touch $HOME/.gnupg/pubring.gpg } +#. +#. # Do not overwrite any files accidentally +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. > _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#: tomb:1415 msgid "Forging this key would overwrite an existing file. Operation aborted." msgstr "" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ -r "$destkey" ]] && { +#. ls -lh $destkey +#. _failure "Forging this key would overwrite an existing file. Operation aborted." } +#. +#. touch $destkey +#. [[ $? == 0 ]] || { +#. > _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#: tomb:1419 +msgid "Cannot generate encryption key." +msgstr "" + +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. chmod 0600 $destkey +#. +#. # Update algorithm if it was passed on the command line with -o +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && algo=$algopt +#. +#. > _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" \ +#. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#: tomb:1427 msgid "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" msgstr "" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" \ +#. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. > _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#: tomb:1432 msgid "This operation takes time, keep using this computer on other tasks," msgstr "" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _message "Commanded to forge key ::1 key:: with cipher algorithm ::2 algorithm::" \ +#. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. > _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#: tomb:1433 msgid "once done you will be asked to choose a password for your tomb." msgstr "" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. $destkey $algo +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. > _message "To make it faster you can move the mouse around." +#. _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#: tomb:1434 msgid "To make it faster you can move the mouse around." msgstr "" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. TOMBKEYFILE="$destkey" # Set global variable +#. +#. _message "This operation takes time, keep using this computer on other tasks," +#. _message "once done you will be asked to choose a password for your tomb." +#. _message "To make it faster you can move the mouse around." +#. > _message "If you are on a server, you can use an Entropy Generation Daemon." +#. +#. # Use /dev/random as the entropy source, unless --use-random is specified +#. local random_source=/dev/random +#. { option_is_set --use-urandom } && random_source=/dev/urandom +#: tomb:1435 msgid "If you are on a server, you can use an Entropy Generation Daemon." msgstr "" -#: warning -msgid "Cannot generate encryption key." -msgstr "" - -#: success +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. > _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#: tomb:1449 msgid "Choose the password of your key: ::1 tomb key::" msgstr "" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "Cannot generate encryption key." +#. _failure "Operation aborted." } +#. +#. # Here the global variable TOMBSECRET contains the naked secret +#. +#. _success "Choose the password of your key: ::1 tomb key::" $TOMBKEYFILE +#. > _message "(You can also change it later using 'tomb passwd'.)" +#. # _user_file $TOMBKEYFILE +#. +#. tombname="$TOMBKEYFILE" # XXX ??? +#. # the gen_key() function takes care of the new key's encryption +#: tomb:1450 msgid "(You can also change it later using 'tomb passwd'.)" msgstr "" -#: warning +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. > _warning "The key does not seem to be valid." +#. _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#: tomb:1468 msgid "The key does not seem to be valid." msgstr "" -#: warning +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. # load the key contents (set global variable) +#. TOMBKEY="${mapfile[$TOMBKEYFILE]}" +#. +#. # this does a check on the file header +#. is_valid_key $TOMBKEY || { +#. _warning "The key does not seem to be valid." +#. > _warning "Dumping contents to screen:" +#. print "${mapfile[$TOMBKEY]}" +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#: tomb:1469 msgid "Dumping contents to screen:" msgstr "" -#: message +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. _warning "--" +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. > _message "Done forging ::1 key file::" $TOMBKEYFILE +#. _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#: tomb:1477 msgid "Done forging ::1 key file::" msgstr "" -#: success +#. Fold: Create +#. Function: forge_key +#. +#. Code sample: +#. sudo umount ${keytmp} +#. rm -r $keytmp +#. _failure "Operation aborted." +#. } +#. +#. _message "Done forging ::1 key file::" $TOMBKEYFILE +#. > _success "Your key is ready:" +#. ls -lh $TOMBKEYFILE +#. } +#. +#. # Step three -- Lock tomb +#: tomb:1478 msgid "Your key is ready:" msgstr "" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. # for more alternatives refer to cryptsetup(8) +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. > _warning "No tomb specified for locking." +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#: tomb:1498 msgid "No tomb specified for locking." msgstr "" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. local cipher="aes-xts-plain64:sha256" +#. +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. [[ -n $tombpath ]] || { +#. _warning "No tomb specified for locking." +#. > _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#: tomb:1499 msgid "Usage: tomb lock file.tomb file.tomb.key" msgstr "" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Usage: tomb lock file.tomb file.tomb.key" +#. return 1 +#. } +#. +#. _plot $tombpath +#. +#. > _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. _failure "There is no tomb here. You have to dig it first." } +#. +#: tomb:1505 msgid "Commanded to lock tomb ::1 tomb file::" msgstr "" -#: failure -msgid "There is no tomb here. You have to it dig first." -msgstr "" - -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _plot $tombpath +#. +#. _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE +#. +#. [[ -f $TOMBPATH ]] || { +#. > _failure "There is no tomb here. You have to dig it first." } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. lo_mount $TOMBPATH +#: tomb:1508 +msgid "There is no tomb here. You have to dig it first." +msgstr "" + +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. > _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#: tomb:1517 msgid "Checking if the tomb is empty (we never step on somebody else's bones)." msgstr "" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _verbose "Loop mounted on ::1 mount point::" $nstloop +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. > _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#: tomb:1521 msgid "The tomb was already locked with another key." msgstr "" -#: failure +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Checking if the tomb is empty (we never step on somebody else's bones)." +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. > _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. _message "Fine, this tomb seems empty." +#. fi +#. +#: tomb:1522 msgid "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." msgstr "" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. sudo cryptsetup isLuks ${nstloop} +#. if [ $? = 0 ]; then +#. # is it a LUKS encrypted nest? then bail out and avoid reformatting it +#. _warning "The tomb was already locked with another key." +#. _failure "Operation aborted. I cannot lock an already locked tomb. Go dig a new one." +#. else +#. > _message "Fine, this tomb seems empty." +#. fi +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#: tomb:1524 msgid "Fine, this tomb seems empty." msgstr "" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _load_key # Try loading key from option -k and set TOMBKEYFILE +#. +#. # the encryption cipher for a tomb can be set when locking using -c +#. { option_is_set -o } && algopt="$(option_value -o)" +#. [[ -n "$algopt" ]] && cipher=$algopt +#. > _message "Locking using cipher: ::1 cipher::" $cipher +#. +#. # get the pass from the user and check it +#. if option_is_set --tomb-pwd; then +#. tomb_pwd="`option_value --tomb-pwd`" +#: tomb:1532 msgid "Locking using cipher: ::1 cipher::" msgstr "" -#: success +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password "$tomb_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. > _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode \ +#. --cipher ${cipher} --key-size 256 --key-slot 0 \ +#: tomb:1544 msgid "Locking ::1 tomb file:: with ::2 tomb key file::" msgstr "" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _success "Locking ::1 tomb file:: with ::2 tomb key file::" $TOMBFILE $TOMBKEYFILE +#. +#. > _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode \ +#. --cipher ${cipher} --key-size 256 --key-slot 0 \ +#. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#: tomb:1546 msgid "Formatting Luks mapped device." msgstr "" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting Luks mapped device." +#. _cryptsetup --batch-mode \ +#. --cipher ${cipher} --key-size 256 --key-slot 0 \ +#. luksFormat ${nstloop} +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#: tomb:1551 msgid "cryptsetup luksFormat returned an error." msgstr "" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksFormat returned an error." +#. _failure "Operation aborted." } +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. > _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#: tomb:1556 msgid "cryptsetup luksOpen returned an error." msgstr "" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _cryptsetup --cipher ${cipher} luksOpen ${nstloop} tomb.tmp +#. [[ $? == 0 ]] || { +#. _warning "cryptsetup luksOpen returned an error." +#. _failure "Operation aborted." } +#. +#. > _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#: tomb:1559 msgid "Formatting your Tomb with Ext3/Ext4 filesystem." msgstr "" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _failure "Operation aborted." } +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. > _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#: tomb:1563 msgid "Tomb format returned an error." msgstr "" -#: warning +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. +#. _message "Formatting your Tomb with Ext3/Ext4 filesystem." +#. ${=MKFS} $TOMBNAME /dev/mapper/tomb.tmp +#. +#. [[ $? == 0 ]] || { +#. _warning "Tomb format returned an error." +#. > _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#: tomb:1564 msgid "Your tomb ::1 tomb file:: may be corrupted." msgstr "" -#: message +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Tomb format returned an error." +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. > _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" \ +#. $TOMBPATH $TOMBKEYFILE +#. +#. } +#: tomb:1569 msgid "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" msgstr "" -#: success +#. Fold: Create +#. Function: lock_tomb_with_key +#. +#. Code sample: +#. _warning "Your tomb ::1 tomb file:: may be corrupted." $TOMBFILE } +#. +#. # Sync +#. sudo cryptsetup luksClose tomb.tmp +#. +#. _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher +#. > _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" \ +#. $TOMBPATH $TOMBKEYFILE +#. +#. } +#. +#: tomb:1570 msgid "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" msgstr "" -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. # This function changes the key that locks a tomb +#. change_tomb_key() { +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. > _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#: tomb:1580 msgid "Commanded to reset key for tomb ::1 tomb path::" msgstr "" -#: warning +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombkey="$1" # Path to the tomb's key file +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. > _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#: tomb:1583 msgid "Command 'setkey' needs two arguments: the old key file and the tomb." msgstr "" -#: warning +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. local tombpath="$2" # Path to the tomb +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. > _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. _failure "Execution aborted." +#. } +#. +#. _check_swap +#: tomb:1584 msgid "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" msgstr "" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. _message "Commanded to reset key for tomb ::1 tomb path::" $tombpath +#. +#. [[ -z "$tombpath" ]] && { +#. _warning "Command 'setkey' needs two arguments: the old key file and the tomb." +#. _warning "I.e: tomb -k new.tomb.key old.tomb.key secret.tomb" +#. > _failure "Execution aborted." +#. } +#. +#. _check_swap +#. is_valid_tomb $tombpath +#: tomb:1585 msgid "Execution aborted." msgstr "" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. sudo cryptsetup isLuks ${nstloop} +#. # is it a LUKS encrypted nest? we check one more time +#. [[ $? == 0 ]] || { +#. > _failure "Not a valid LUKS encrypted volume: ::1 volume::" $TOMBPATH } +#. +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#: tomb:1596 msgid "Not a valid LUKS encrypted volume: ::1 volume::" msgstr "" -#: success +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _load_key $tombkey # Try loading given key and set TOMBKEY and +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. > _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#: tomb:1604 msgid "Changing lock on tomb ::1 tomb name::" msgstr "" -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. # TOMBKEYFILE +#. local oldkey=$TOMBKEY +#. local oldkeyfile=$TOMBKEYFILE +#. +#. # we have everything, prepare to mount +#. _success "Changing lock on tomb ::1 tomb name::" $TOMBNAME +#. > _message "Old key: ::1 old key::" $oldkeyfile +#. +#. # render the mapper +#. mapdate=`date +%s` +#. # save date of mount in minutes since 1970 +#: tomb:1605 msgid "Old key: ::1 old key::" msgstr "" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-old-pwd = ::1 old pass::" $tomb_old_pwd +#. ask_key_password "$tomb_old_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - \ +#: tomb:1621 msgid "No valid password supplied for the old key." msgstr "" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _failure "No valid password supplied for the old key." } +#. old_secret=$TOMBSECRET +#. +#. # luksOpen the tomb (not really mounting, just on the loopback) +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - \ +#. luksOpen ${nstloop} ${mapper} +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. _message "New key: ::1 key file::" $TOMBKEYFILE +#: tomb:1627 msgid "Unexpected error in luksOpen." msgstr "" -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - \ +#. luksOpen ${nstloop} ${mapper} +#. [[ $? == 0 ]] || _failure "Unexpected error in luksOpen." +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. > _message "New key: ::1 key file::" $TOMBKEYFILE +#. +#. if option_is_set --tomb-pwd; then +#. tomb_new_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#: tomb:1631 msgid "New key: ::1 key file::" msgstr "" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_new_pwd +#. ask_key_password "$tomb_new_pwd" +#. else +#. ask_key_password +#. fi +#. [[ $? == 0 ]] || { +#. > _failure "No valid password supplied for the new key." } +#. +#. _tmp_create +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#: tomb:1641 msgid "No valid password supplied for the new key." msgstr "" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. tmpnewkey=$TOMBTMP +#. print -R -n - "$TOMBSECRET" >> $tmpnewkey +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - \ +#. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. > [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#: tomb:1650 msgid "Unexpected error in luksChangeKey." msgstr "" -#: failure +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. print -R -n - "$old_secret" | sudo cryptsetup --key-file - \ +#. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. > sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#: tomb:1652 msgid "Unexpected error in luksClose." msgstr "" -#: success +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. luksChangeKey "$nstloop" "$tmpnewkey" +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. > _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#: tomb:1654 msgid "Succesfully changed key for tomb: ::1 tomb file::" msgstr "" -#: message +#. Fold: Create +#. Function: change_tomb_key +#. +#. Code sample: +#. +#. [[ $? == 0 ]] || _failure "Unexpected error in luksChangeKey." +#. +#. sudo cryptsetup luksClose "${mapper}" || _failure "Unexpected error in luksClose." +#. +#. _success "Succesfully changed key for tomb: ::1 tomb file::" $TOMBFILE +#. > _message "The new key is: ::1 new key::" $TOMBKEYFILE +#. +#. return 0 +#. } +#. +#: tomb:1655 msgid "The new key is: ::1 new key::" msgstr "" -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # {{{ Open +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. > [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#: tomb:1667 msgid "No tomb name specified for opening." msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # $1 = tombfile $2(optional) = mountpoint +#. mount_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. [[ -n "$tombpath" ]] || _failure "No tomb name specified for opening." +#. +#. > _message "Commanded to open tomb ::1 tomb name::" $1 +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#: tomb:1669 msgid "Commanded to open tomb ::1 tomb name::" msgstr "" -#: warning +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. _check_swap +#. is_valid_tomb $tombpath +#. +#. # check file type (if its a Luks fs) +#. [[ "`file $TOMBPATH`" =~ "luks encrypted file" ]] || { +#. > _warning "::1 tomb file:: is not a valid tomb file" $TOMBFILE +#. _failure "Operation aborted." +#. } +#. +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#: tomb:1676 msgid "::1 tomb file:: is not a valid tomb file" msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _verbose "Tomb found: ::1 tomb path::" $TOMBPATH +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#. +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. > _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#: tomb:1686 msgid "Mountpoint not specified, using default: ::1 mount point::" msgstr "" -#: warning +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombmount=${2:-/media/$TOMBFILE} +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. > _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#: tomb:1690 msgid "::1 tomb name:: is already open." msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ -z "$2" ]] && { +#. _message "Mountpoint not specified, using default: ::1 mount point::" $tombmount } +#. +#. # Check if its already open +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. > _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#: tomb:1691 msgid "Here below its status is reported:" msgstr "" -#: success +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ "`mount -l`" -regex-match "${TOMBFILE}.*\[$TOMBNAME\]" ]] && { +#. _warning "::1 tomb name:: is already open." $TOMBNAME +#. _message "Here below its status is reported:" +#. list_tombs $TOMBNAME +#. return 0 } +#. +#. > _success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#: tomb:1695 msgid "Opening ::1 tomb file:: on ::2 mount point::" msgstr "" -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. lo_mount $TOMBPATH +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. > _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#: tomb:1702 msgid "::1 tomb file:: is not a valid Luks encrypted storage file." msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. nstloop=`lo_new` +#. +#. sudo cryptsetup isLuks ${nstloop} || { +#. # is it a LUKS encrypted nest? see cryptsetup(1) +#. _failure "::1 tomb file:: is not a valid Luks encrypted storage file." $TOMBFILE } +#. +#. > _message "This tomb is a valid LUKS encrypted device." +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#: tomb:1704 msgid "This tomb is a valid LUKS encrypted device." msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. luksdump="`sudo cryptsetup luksDump ${nstloop}`" +#. tombdump=(`print $luksdump | awk ' +#. /^Cipher name/ {print $3} +#. /^Cipher mode/ {print $3} +#. /^Hash spec/ {print $3}'`) +#. > _message "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" $tombdump[1] $tombdump[2] $tombdump[3] +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#: tomb:1711 msgid "Cipher is \"::1 cipher::\" mode \"::2 mode::\" hash \"::3 hash::\"" msgstr "" -#: warning +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. slotwarn=`print $luksdump | awk ' +#. BEGIN { zero=0 } +#. /^Key slot 0/ { zero=1 } +#. /^Key slot.*ENABLED/ { if(zero==1) print "WARN" }'` +#. [[ "$slotwarn" == "WARN" ]] && { +#. > _warning "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." } +#. +#. # save date of mount in minutes since 1970 +#. mapdate=`date +%s` +#. +#: tomb:1718 msgid "Multiple key slots are enabled on this tomb. Beware: there can be a backdoor." msgstr "" -#: failure +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. ask_key_password +#. } +#. [[ $? == 0 ]] || _failure "No valid password supplied." +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} +#. [[ $? = 0 ]] || { +#. > _failure "Failure mounting the encrypted file." } +#. +#. # preserve the loopdev after exit +#. lo_preserve "$nstloop" +#. +#: tomb:1742 msgid "Failure mounting the encrypted file." msgstr "" -#: success +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # array: [ cipher, keysize, loopdevice ] +#. tombstat=(`sudo cryptsetup status ${mapper} | awk ' +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. > _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#: tomb:1752 msgid "Success unlocking tomb ::1 tomb name::" msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. /cipher:/ {print $2} +#. /keysize:/ {print $2} +#. /device:/ {print $2}'`) +#. _success "Success unlocking tomb ::1 tomb name::" $TOMBNAME +#. _verbose "Key size is ::1 size:: for cipher ::2 cipher::" $tombstat[2] $tombstat[1] +#. +#. > _message "Checking filesystem via ::1::" $tombstat[3] +#. sudo fsck -p -C0 /dev/mapper/${mapper} +#. _verbose "Tomb engraved as ::1 tomb name::" $TOMBNAME +#. sudo tune2fs -L $TOMBNAME /dev/mapper/${mapper} > /dev/null +#. +#: tomb:1755 msgid "Checking filesystem via ::1::" msgstr "" -#: success +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. +#. # TODO: safety check MOUNTOPTS +#. # safe_mount_options && \ +#. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. > _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && \ +#. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#: tomb:1773 +msgid "Error mounting ::1 mapper:: on ::2 tombmount::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. # safe_mount_options && \ +#. sudo mount -o $MOUNTOPTS /dev/mapper/${mapper} ${tombmount} +#. # Clean up if the mount failed +#. [[ $? == 0 ]] || { +#. _warning "Error mounting ::1 mapper:: on ::2 tombmount::" $mapper $tombmount +#. [[ $oldmountopts != $MOUNTOPTS ]] && \ +#. > _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#: tomb:1775 +msgid "Are mount options '::1 mount options::' valid?" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. [[ $oldmountopts != $MOUNTOPTS ]] && \ +#. _warning "Are mount options '::1 mount options::' valid?" $MOUNTOPTS +#. # TODO: move cleanup to _endgame() +#. [[ -d $tombmount ]] && rmdir $tombmount +#. [[ -e /dev/mapper/$mapper ]] && sudo cryptsetup luksClose $mapper +#. # The loop is taken care of in _endgame() +#. > _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#: tomb:1780 +msgid "Cannot mount ::1 tomb name::" +msgstr "" + +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. _failure "Cannot mount ::1 tomb name::" $TOMBNAME +#. } +#. +#. sudo chown $UID:$GID ${tombmount} +#. sudo chmod 0711 ${tombmount} +#. +#. > _success "Success opening ::1 tomb file:: on ::2 mount point::" $TOMBFILE $tombmount +#. +#. local tombtty tombhost tombuid tombuser +#. +#. # print out when was opened the last time, by whom and where +#: tomb:1786 msgid "Success opening ::1 tomb file:: on ::2 mount point::" msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tombuid=$(_cat ${tombmount}/.uid | tr -d ' ') +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. > _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#: tomb:1800 msgid "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" msgstr "" -#: message +#. Fold: Open +#. Function: mount_tomb +#. +#. Code sample: +#. tomblast=$(_cat ${tombmount}/.last | tr -d ' ') +#. for e in ${(f@)mapfile[/etc/passwd]}; do +#. [[ "$e" =~ ":$tombuid:" ]] && { +#. tombuser="${e[(ws@:@)1]}" } +#. done +#. _message "Last visit by ::1 user::(::2 tomb build::) from ::3 tty:: on ::4 host::" $tombuser $tombuid $tombtty $tombhost +#. > _message "on date ::1 date::" "`date --date=@${tomblast} +%c`" +#. } +#. # write down the UID and TTY that opened the tomb +#. rm -f ${tombmount}/.uid +#. print $_UID > ${tombmount}/.uid +#: tomb:1801 msgid "on date ::1 date::" msgstr "" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. +#. # Default mount options are overridden with the -o switch +#. [[ -n ${(k)OPTS[-o]} ]] && MOUNTOPTS=${OPTS[-o]} +#. +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. > _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. _warning "Cannot exec bind hooks without a mounted tomb." +#: tomb:1849 msgid "How pitiful! A tomb, and no HOME." msgstr "" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # No HOME set? Note: this should never happen again. +#. [[ -z $HOME ]] && { +#. _warning "How pitiful! A tomb, and no HOME." +#. return 1 } +#. +#. [[ -z $mnt || ! -d $mnt ]] && { +#. > _warning "Cannot exec bind hooks without a mounted tomb." +#. return 1 } +#. +#. [[ -r "$mnt/bind-hooks" ]] || { +#. _verbose "bind-hooks not found in ::1 mount point::" $mnt +#: tomb:1853 msgid "Cannot exec bind hooks without a mounted tomb." msgstr "" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. # better parsing for bind hooks checks for two separated words on +#. # each line, using zsh word separator array subscript +#. _bindhooks="${mapfile[${mnt}/bind-hooks]}" +#. for h in ${(f)_bindhooks}; do +#. s="${h[(w)1]}" +#. d="${h[(w)2]}" +#. > [[ "$s" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. [[ "$d" = "" ]] && { _warning "bind-hooks file is broken"; return 1 } +#. maps+=($s $d) +#. _verbose "bind-hook found: $s -> $d" +#. done +#: tomb:1869 msgid "bind-hooks file is broken" msgstr "" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. _verbose "bind-hook found: $s -> $d" +#. done +#. unset _bindhooks +#. +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#: tomb:1878 msgid "bind-hooks map format: local/to/tomb local/to/$HOME" msgstr "" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${(k)maps}; do +#. [[ "${dir[1]}" == "/" || "${dir[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME" +#. continue } +#. +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. > _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#: tomb:1882 msgid "bind-hooks map format: local/to/tomb local/to/$HOME. Rolling back" msgstr "" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. [[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && { +#. _warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back" +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. > _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} \ +#: tomb:1887 msgid "bind-hook target not existent, skipping ::1 home::/::2 subdir::" msgstr "" -#: warning +#. Fold: Open +#. Function: exec_safe_bind_hooks +#. +#. Code sample: +#. for dir in ${mounted}; do sudo umount $dir; done +#. return 1 } +#. +#. if [[ ! -r "$HOME/${maps[$dir]}" ]]; then +#. _warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]} +#. elif [[ ! -r "$mnt/$dir" ]]; then +#. > _warning "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" $mnt $dir +#. else +#. sudo mount -o bind,$MOUNTOPTS $mnt/$dir $HOME/${maps[$dir]} \ +#. && mounted+=("$HOME/${maps[$dir]}") +#. fi +#: tomb:1889 msgid "bind-hook source not found in tomb, skipping ::1 mount point::/::2 subdir::" msgstr "" -#: success +#. Fold: Open +#. Function: exec_safe_post_hooks +#. +#. Code sample: +#. # Only run if post-hooks has the executable bit set +#. [[ -x $mnt/post-hooks ]] || return +#. +#. # If the file starts with a shebang, run it. +#. cat $mnt/post-hooks | head -n1 | grep '^#!\s*/' &> /dev/null +#. [[ $? == 0 ]] && { +#. > _success "Post hooks found, executing as user ::1 user name::." $USERNAME +#. $mnt/post-hooks $act $mnt +#. } +#. } +#. +#: tomb:1917 msgid "Post hooks found, executing as user ::1 user name::." msgstr "" -#: failure +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. local tombname tombmount tombfs tombfsopts tombloop +#. local ts tombtot tombused tombavail tombpercent tombp tombsince +#. local tombtty tombhost tombuid tombuser +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "I can't see any ::1 status:: tomb, may they all rest in peace." ${1:-open} } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:1936 msgid "I can't see any ::1 status:: tomb, may they all rest in peace." msgstr "" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. tombuser="${ee[(ws@:@)1]}" } +#. done +#. } +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. > _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" \ +#. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#: tomb:1969 msgid "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" msgstr "" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. { option_is_set --get-mountpoint } && { print $tombmount; continue } +#. +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" \ +#. $tombname $tombmount $tombfsopts +#. +#. > _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" \ +#. $tombname $tombuser $tombtty $tombhost +#: tomb:1972 msgid "::1 tombname:: open since ::2 tombsince::" msgstr "" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _message "::1 tombname:: open on ::2 tombmount:: using ::3 tombfsopts::" \ +#. $tombname $tombmount $tombfsopts +#. +#. _message "::1 tombname:: open since ::2 tombsince::" $tombname $tombsince +#. +#. [[ -z "$tombtty" ]] || { +#. > _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" \ +#. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " \ +#: tomb:1975 msgid "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" msgstr "" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. +#. [[ -z "$tombtty" ]] || { +#. _message "::1 tombname:: open by ::2 tombuser:: from ::3 tombtty:: on ::4 tombhost::" \ +#. $tombname $tombuser $tombtty $tombhost +#. } +#. +#. > _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " \ +#. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#: tomb:1979 msgid "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " msgstr "" -#: warning +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. } +#. +#. _message "::1 tombname:: size ::2 tombtot:: of which ::3 tombused:: (::5 tombpercent::%) is used: ::4 tombavail:: free " \ +#. $tombname $tombtot $tombused $tombavail $tombpercent +#. +#. [[ ${tombp} -ge 90 ]] && { +#. > _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#: tomb:1983 msgid "::1 tombname:: warning: your tomb is almost full!" msgstr "" -#: message +#. Fold: List +#. Function: list_tombs +#. +#. Code sample: +#. _warning "::1 tombname:: warning: your tomb is almost full!" $tombname +#. } +#. +#. # Now check hooks +#. mounted_hooks=(`list_tomb_binds $tombname`) +#. for h in ${mounted_hooks}; do +#. > _message "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" \ +#. $tombname "`basename ${h[(ws:;:)1]}`" ${h[(ws:;:)2]} +#. done +#. done +#. } +#: tomb:1989 msgid "::1 tombname:: hooks ::2 hookname:: on ::3 hookdest::" msgstr "" -#: failure +#. Fold: List +#. Function: list_tomb_binds +#. +#. Code sample: +#. # list_tomb_binds +#. # print out an array of mounted bind hooks (internal use) +#. # format is semi-colon separated list of attributes +#. # needs an argument: name of tomb whose hooks belong +#. list_tomb_binds() { +#. [[ -z "$1" ]] && { +#. > _failure "Internal error: list_tomb_binds called without argument." } +#. +#. # list bind hooks on util-linux 2.20 (Debian 7) +#. mount -l \ +#. | awk -vtomb="$1" ' +#: tomb:2044 msgid "Internal error: list_tomb_binds called without argument." msgstr "" -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # {{{ Index and search +#. +#. # index files in all tombs for search +#. # $1 is optional, to specify a tomb +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. > _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#: tomb:2076 msgid "Cannot index tombs on this system: updatedb (mlocate) not installed." msgstr "" -#: warning +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. index_tombs() { +#. { command -v updatedb 1>/dev/null 2>/dev/null } || { +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. > _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#: tomb:2080 msgid "Cannot use GNU findutils for index/search commands." msgstr "" -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _failure "Cannot index tombs on this system: updatedb (mlocate) not installed." } +#. +#. updatedbver=`updatedb --version | grep '^updatedb'` +#. [[ "$updatedbver" =~ "GNU findutils" ]] && { +#. _warning "Cannot use GNU findutils for index/search commands." } +#. [[ "$updatedbver" =~ "mlocate" ]] || { +#. > _failure "Index command needs 'mlocate' to be installed." } +#. +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#: tomb:2082 msgid "Index command needs 'mlocate' to be installed." msgstr "" -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. _verbose "$updatedbver" +#. +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. > _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#: tomb:2090 msgid "There seems to be no open tomb engraved as [::1::]" msgstr "" -#: failure +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts $1`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. > _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#: tomb:2092 msgid "I can't see any open tomb, may they all rest in peace." msgstr "" -#: success +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. # Considering one tomb +#. [[ -n "$1" ]] && { +#. _failure "There seems to be no open tomb engraved as [::1::]" $1 } +#. # Or more +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Creating and updating search indexes." +#. +#. # start the LibreOffice document converter if installed +#. { command -v unoconv 1>/dev/null 2>/dev/null } && { +#. unoconv -l 2>/dev/null & +#: tomb:2094 msgid "Creating and updating search indexes." msgstr "" -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. > _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#: tomb:2107 msgid "Skipping ::1 tomb name:: (.noindex found)." msgstr "" -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.noindex ]] && { +#. _message "Skipping ::1 tomb name:: (.noindex found)." $tombname +#. continue } +#. > _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#: tomb:2109 msgid "Indexing ::1 tomb name:: filenames..." msgstr "" -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. continue } +#. _message "Indexing ::1 tomb name:: filenames..." $tombname +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. > _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#: tomb:2114 msgid "Indexing ::1 tomb name:: contents..." msgstr "" -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. updatedb -l 0 -o ${tombmount}/.updatedb -U ${tombmount} +#. +#. # here we use swish to index file contents +#. [[ $SWISH == 1 ]] && { +#. _message "Indexing ::1 tomb name:: contents..." $tombname +#. [[ -r ${tombmount}/.swishrc ]] || { +#. > _message "Generating a new swish-e configuration file: ::1 swish conf::" ${tombmount}/.swishrc +#. cat <<EOF > ${tombmount}/.swishrc +#. # index directives +#. DefaultContents TXT* +#. IndexDir $tombmount +#: tomb:2116 msgid "Generating a new swish-e configuration file: ::1 swish conf::" msgstr "" -#: message +#. Fold: Index and search +#. Function: index_tombs +#. +#. Code sample: +#. } +#. +#. swish-e -c ${tombmount}/.swishrc -S fs -v3 +#. +#. } +#. +#. > _message "Search index updated." +#. done +#. } +#. search_tombs() { +#. { command -v locate 1>/dev/null 2>/dev/null } || { +#: tomb:2190 msgid "Search index updated." msgstr "" -#: success +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # list all open tombs +#. mounted_tombs=(`list_tomb_mounts`) +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "I can't see any open tomb, may they all rest in peace." } +#. +#. > _success "Searching for: ::1::" ${(f)@} +#. for t in ${mounted_tombs}; do +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#: tomb:2210 msgid "Searching for: ::1::" msgstr "" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _verbose "Checking for index: ::1::" ${t} +#. mapper=`basename ${t[(ws:;:)1]}` +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. > _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" \ +#. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#: tomb:2218 msgid "Searching filenames in tomb ::1 tomb name::" msgstr "" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. tombname=${t[(ws:;:)5]} +#. tombmount=${t[(ws:;:)2]} +#. [[ -r ${tombmount}/.updatedb ]] && { +#. # Use mlocate to search hits on filenames +#. _message "Searching filenames in tomb ::1 tomb name::" $tombname +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. > _message "Matches found: ::1 matches::" \ +#. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#: tomb:2220 msgid "Matches found: ::1 matches::" msgstr "" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. locate -d ${tombmount}/.updatedb -e -i "${(f)@}" +#. _message "Matches found: ::1 matches::" \ +#. $(locate -d ${tombmount}/.updatedb -e -i -c ${(f)@}) +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. > _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#: tomb:2225 msgid "Searching contents in tomb ::1 tomb name::" msgstr "" -#: warning +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. > _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#: tomb:2228 msgid "Skipping tomb ::1 tomb name::: not indexed." msgstr "" -#: warning +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. # Use swish-e to search over contents +#. [[ $SWISH == 1 && -r $tombmount/.swish ]] && { +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. > _warning "Run 'tomb index' to create indexes." } +#. done +#. _message "Search completed." +#. } +#. +#: tomb:2229 msgid "Run 'tomb index' to create indexes." msgstr "" -#: message +#. Fold: Index and search +#. Function: search_tombs +#. +#. Code sample: +#. _message "Searching contents in tomb ::1 tomb name::" $tombname +#. swish-e -w ${=@} -f $tombmount/.swish -H0 } +#. } || { +#. _warning "Skipping tomb ::1 tomb name::: not indexed." $tombname +#. _warning "Run 'tomb index' to create indexes." } +#. done +#. > _message "Search completed." +#. } +#. +#. # }}} - Index and search +#. +#: tomb:2231 msgid "Search completed." msgstr "" -#: message +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # {{{ Resize +#. +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. > _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#: tomb:2242 msgid "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. # resize tomb file size +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. > [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#: tomb:2244 msgid "No tomb name specified for resizing." msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. resize_tomb() { +#. local tombpath="$1" # First argument is the path to the tomb +#. +#. _message "Commanded to resize tomb ::1 tomb name:: to ::2 size:: megabytes." $1 $OPTS[-s] +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. > [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. _failure "Aborting operations: new size was not specified, use -s" } +#: tomb:2245 msgid "Cannot find ::1::" msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. [[ -z "$tombpath" ]] && _failure "No tomb name specified for resizing." +#. [[ ! -r $tombpath ]] && _failure "Cannot find ::1::" $tombpath +#. +#. newtombsize="`option_value -s`" +#. [[ -z "$newtombsize" ]] && { +#. > _failure "Aborting operations: new size was not specified, use -s" } +#. +#. is_valid_tomb $tombpath # Set TOMB{PATH,DIR,FILE,NAME} +#. +#. _load_key # Try loading new key from option -k and set TOMBKEYFILE +#: tomb:2249 msgid "Aborting operations: new size was not specified, use -s" msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. local oldtombsize=$(( `stat -c %s "$TOMBPATH" 2>/dev/null` / 1048576 )) +#. local mounted_tomb=`mount -l | +#. awk -vtomb="[$TOMBNAME]" '/^\/dev\/mapper\/tomb/ { if($7==tomb) print $1 }'` +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. > _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#: tomb:2261 msgid "Please close the tomb ::1 tomb name:: before trying to resize it." msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. +#. # Tomb must not be open +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. > _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#: tomb:2264 msgid "You must specify the new size of ::1 tomb name::" msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -z "$mounted_tomb" ]] || { +#. _failure "Please close the tomb ::1 tomb name:: before trying to resize it." $TOMBNAME } +#. # New tomb size must be specified +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. > [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. _failure "The new size must be greater then old tomb size." } +#. +#: tomb:2266 msgid "Size is not an integer." msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. [[ -n "$newtombsize" ]] || { +#. _failure "You must specify the new size of ::1 tomb name::" $TOMBNAME } +#. # New tomb size must be an integer +#. [[ $newtombsize == <-> ]] || _failure "Size is not an integer." +#. # Tombs can only grow in size +#. [[ "$newtombsize" -gt "$oldtombsize" ]] || { +#. > _failure "The new size must be greater then old tomb size." } +#. +#. delta="$(( $newtombsize - $oldtombsize ))" +#. +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#: tomb:2269 msgid "The new size must be greater then old tomb size." msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _message "Generating ::1 tomb file:: of ::2 size::MiB" $TOMBFILE $newtombsize +#. +#. _verbose "Data dump using ::1:: from /dev/urandom" ${DD[1]} +#. ${=DD} if=/dev/urandom bs=1048576 count=${delta} >> $TOMBPATH +#. +#. [[ $? == 0 ]] || { +#. > _failure "Error creating the extra resize ::1 size::, operation aborted." $tmp_resize } +#. +#. { option_is_set --tomb-pwd } && { +#. tomb_pwd="`option_value --tomb-pwd`" +#. _verbose "tomb-pwd = ::1 tomb pass::" $tomb_pwd +#: tomb:2279 msgid "Error creating the extra resize ::1 size::, operation aborted." msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. mapper="tomb.$TOMBNAME.$mapdate.$(basename $nstloop)" +#. +#. _cryptsetup luksOpen ${nstloop} ${mapper} || { +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. > _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#: tomb:2300 msgid "cryptsetup failed to resize ::1 mapper::" msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "Failure mounting the encrypted file." } +#. +#. sudo cryptsetup resize "${mapper}" || { +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. > _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#: tomb:2303 msgid "e2fsck failed to check ::1 mapper::" msgstr "" -#: failure +#. Fold: Resize +#. Function: resize_tomb +#. +#. Code sample: +#. _failure "cryptsetup failed to resize ::1 mapper::" $mapper } +#. +#. sudo e2fsck -p -f /dev/mapper/${mapper} || { +#. _failure "e2fsck failed to check ::1 mapper::" $mapper } +#. +#. sudo resize2fs /dev/mapper/${mapper} || { +#. > _failure "resize2fs failed to resize ::1 mapper::" $mapper } +#. +#. # close and free the loop device +#. sudo cryptsetup luksClose "${mapper}" +#. +#: tomb:2306 msgid "resize2fs failed to resize ::1 mapper::" msgstr "" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. mounted_tombs=(`list_tomb_mounts`) +#. else +#. mounted_tombs=(`list_tomb_mounts $1`) +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. > _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#: tomb:2330 msgid "There is no open tomb to be closed." msgstr "" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. fi +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. > _warning "Too many tombs mounted, please specify one (see tomb list)" +#. _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#: tomb:2333 msgid "Too many tombs mounted, please specify one (see tomb list)" msgstr "" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ ${#mounted_tombs} == 0 ]] && { +#. _failure "There is no open tomb to be closed." } +#. +#. [[ ${#mounted_tombs} -gt 1 && -z "$1" ]] && { +#. _warning "Too many tombs mounted, please specify one (see tomb list)" +#. > _warning "or issue the command 'tomb close all' to close them all." +#. _failure "Operation aborted." } +#. +#. for t in ${mounted_tombs}; do +#. mapper=`basename ${t[(ws:;:)1]}` +#: tomb:2334 msgid "or issue the command 'tomb close all' to close them all." msgstr "" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. > _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#: tomb:2350 msgid "Tomb not found: ::1 tomb file::" msgstr "" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _verbose "Name: ::1 tomb name::" $tombname +#. _verbose "Mount: ::1 mount point::" $tombmount +#. _verbose "Mapper: ::1 mapper::" $mapper +#. +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. > _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" \ +#: tomb:2351 msgid "Please specify an existing tomb." msgstr "" -#: success +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. [[ -e "$mapper" ]] && { +#. _warning "Tomb not found: ::1 tomb file::" $1 +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" \ +#. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#: tomb:2355 msgid "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" msgstr "" -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _warning "Please specify an existing tomb." +#. return 0 } +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" \ +#. $tombname $tombmount +#. > _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" \ +#: tomb:2357 msgid "Kill all processes busy inside the tomb." msgstr "" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" \ +#. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. > _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" \ +#. $tombname $tombmount } +#. +#: tomb:2359 msgid "Cannot slam the tomb ::1 tomb name::" msgstr "" -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb ::1 tomb name:: mounted on ::2 mount point::" \ +#. $tombname $tombmount +#. _message "Kill all processes busy inside the tomb." +#. { slam_tomb "$tombmount" } || { +#. _failure "Cannot slam the tomb ::1 tomb name::" $tombname } +#. } || { +#. > _message "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" \ +#. $tombname $tombmount } +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#: tomb:2361 msgid "Closing tomb ::1 tomb name:: mounted on ::2 mount point::" msgstr "" -#: message +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # check if there are binded dirs and close them +#. bind_tombs=(`list_tomb_binds $tombname`) +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. > _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#: tomb:2369 msgid "Closing tomb bind hook: ::1 hook::" msgstr "" -#: success +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. for b in ${bind_tombs}; do +#. bind_mapper="${b[(ws:;:)1]}" +#. bind_mount="${b[(ws:;:)2]}" +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. > _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#: tomb:2372 msgid "Slamming tomb: killing all processes using this hook." msgstr "" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _message "Closing tomb bind hook: ::1 hook::" $bind_mount +#. sudo umount $bind_mount || { +#. [[ -n $SLAM ]] && { +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. > _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#: tomb:2375 msgid "Cannot slam the bind hook ::1 hook::" msgstr "" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. _success "Slamming tomb: killing all processes using this hook." +#. slam_tomb "$bind_mount" +#. [[ $? == 1 ]] && { +#. _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } +#. umount $bind_mount +#. } || { +#. > _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } +#. } +#. done +#. +#. # Execute post-hooks for eventual cleanup +#: tomb:2378 msgid "Tomb bind hook ::1 hook:: is busy, cannot close tomb." msgstr "" -#: warning +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. # Execute post-hooks for eventual cleanup +#. { option_is_set -n } || { +#. exec_safe_post_hooks ${tombmount%%/} close } +#. +#. _verbose "Performing umount of ::1 mount point::" $tombmount +#. sudo umount ${tombmount} +#. > [[ $? = 0 ]] || { _warning "Tomb is busy, cannot umount!"; return 1 } +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#: tomb:2388 msgid "Tomb is busy, cannot umount!" msgstr "" -#: failure +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # If we used a default mountpoint and is now empty, delete it +#. [[ "$tombmount" == "/media/$tombname.tomb" ]] && { rmdir $tombmount } +#. +#. sudo cryptsetup luksClose $mapper +#. [[ $? == 0 ]] || { +#. > _failure "Error occurred in cryptsetup luksClose ::1 mapper::" $mapper } +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#: tomb:2395 msgid "Error occurred in cryptsetup luksClose ::1 mapper::" msgstr "" -#: success +#. Fold: Close +#. Function: umount_tomb +#. +#. Code sample: +#. +#. # Normally the loopback device is detached when unused +#. [[ -e "/dev/$tombloop" ]] && sudo losetup -d "/dev/$tombloop" +#. [[ $? = 0 ]] || { +#. _verbose "/dev/$tombloop was already closed." } +#. +#. > _success "Tomb ::1 tomb name:: closed: your bones will rest in peace." $tombname +#. +#. done # loop across mounted tombs +#. +#. return 0 +#: tomb:2402 msgid "Tomb ::1 tomb name:: closed: your bones will rest in peace." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. return 1 +#. fi +#. return 0 +#. fi +#. unset discardme +#. if ! zparseopts -M -E -D -Adiscardme ${every_opts}; then +#. > _failure "Error parsing." +#. return 127 +#. fi +#. unset discardme +#. subcommand=$1 +#: tomb:2522 msgid "Error parsing." msgstr "" -#: warning +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. subcommand=$1 +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. > _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#: tomb:2532 msgid "There's no such command \"::1 subcommand::\"." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. if [[ -z $subcommand ]]; then +#. subcommand="__default" +#. fi +#. +#. if [[ -z ${(k)subcommands_opts[$subcommand]} ]]; then +#. _warning "There's no such command \"::1 subcommand::\"." $subcommand +#. > exitv=127 _failure "Please try -h for help." +#. fi +#. argv=("${(@)oldstar}") +#. unset oldstar +#. +#: tomb:2533 msgid "Please try -h for help." msgstr "" -#: warning +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # zsh magic: ${=string} will split to multiple arguments when spaces occur +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. > _warning "Some error occurred during option processing." +#. exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#: tomb:2545 msgid "Some error occurred during option processing." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. set -A cmd_opts ${main_opts} ${=subcommands_opts[$subcommand]} +#. # if there is no option, we don't need parsing +#. if [[ -n $cmd_opts ]]; then +#. zparseopts -M -E -D -AOPTS ${cmd_opts} +#. if [[ $? != 0 ]]; then +#. _warning "Some error occurred during option processing." +#. > exitv=127 _failure "See \"tomb help\" for more info." +#. fi +#. fi +#. #build PARAM (array of arguments) and check if there are unrecognized options +#. ok=0 +#: tomb:2546 msgid "See \"tomb help\" for more info." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. for arg in $*; do +#. if [[ $arg == '--' || $arg == '-' ]]; then +#. ok=1 +#. continue #it shouldnt be appended to PARAM +#. elif [[ $arg[1] == '-' ]]; then +#. if [[ $ok == 0 ]]; then +#. > exitv=127 _failure "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" $arg $subcommand +#. fi +#. fi +#. PARAM+=$arg +#. done +#: tomb:2558 msgid "Unrecognized option ::1 arg:: for subcommand ::2 subcommand::" msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Use colors unless told not to +#. { ! option_is_set --no-color } && { autoload -Uz colors && colors } +#. # Some options are only available during insecure mode +#. { ! option_is_set --unsafe } && { +#. for opt in --tomb-pwd --use-urandom --tomb-old-pwd; do +#. { option_is_set $opt } && { +#. > exitv=127 _failure "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\nIf you really want so, add --unsafe" $opt } +#. done +#. } +#. # read -t or --tmp flags to set a custom temporary directory +#. option_is_set --tmp && TMPPREFIX=$(option_value --tmp) +#: tomb:2574 msgid "You specified option ::1 option::, which is DANGEROUS and should only be used for testing\nIf you really want so, add --unsafe" msgstr "" -#: warning +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. help) +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. > _warning "The create command is deprecated, please use dig, forge and lock instead." +#. _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#: tomb:2608 msgid "The create command is deprecated, please use dig, forge and lock instead." msgstr "" -#: warning +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # DEPRECATION notice (leave here as 'create' is still present in old docs) +#. create) +#. _warning "The create command is deprecated, please use dig, forge and lock instead." +#. > _warning "For more informations see Tomb's manual page (man tomb)." +#. _failure "Operation aborted." +#. ;; +#. +#. # CREATE Step 1: dig -s NN file.tomb +#: tomb:2609 msgid "For more informations see Tomb's manual page (man tomb)." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. umount_tomb $PARAM[1] +#. ;; +#. +#. # Grow tomb's size +#. resize) +#. [[ $RESIZER == 0 ]] && { +#. > _failure "Resize2fs not installed: cannot resize tombs." } +#. resize_tomb $PARAM[1] +#. ;; +#. +#. ## Contents manipulation +#: tomb:2643 msgid "Resize2fs not installed: cannot resize tombs." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. ## Locking operations +#. +#. # Export key to QR Code +#. engrave) +#. [[ $QRENCODE == 0 ]] && { +#. > _failure "QREncode not installed: cannot engrave keys on paper." } +#. engrave_key ${=PARAM} +#. ;; +#. +#. # Change password on existing key +#: tomb:2669 msgid "QREncode not installed: cannot engrave keys on paper." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. change_tomb_key ${=PARAM} +#. ;; +#. +#. # STEGANOGRAPHY: hide key inside an image +#. bury) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot bury keys into images." } +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#: tomb:2686 msgid "Steghide not installed: cannot bury keys into images." msgstr "" -#: failure +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. bury_key $PARAM[1] +#. ;; +#. +#. # STEGANOGRAPHY: read key hidden in an image +#. exhume) +#. [[ $STEGHIDE == 0 ]] && { +#. > _failure "Steghide not installed: cannot exhume keys from images." } +#. exhume_key $PARAM[1] +#. ;; +#. +#. ## Internal commands useful to developers +#: tomb:2693 msgid "Steghide not installed: cannot exhume keys from images." msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Ask user for a password interactively +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. > _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#: tomb:2707 msgid "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" msgstr "" -#: print -msgid " Copyright (C) 2007-2014 Dyne.org Foundation, License GNU GPL v3+" -msgstr "" - -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. askpass) ask_password $PARAM[1] $PARAM[2] ;; +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. > _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#: tomb:2709 +msgid " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +msgstr "" + +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. > _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#: tomb:2710 msgid " This is free software: you are free to change and redistribute it" msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. # Default operation: presentation, or version information with -v +#. __default) +#. _print "Tomb ::1 version:: - a strong and gentle undertaker for your secrets" $VERSION +#. _print "\000" +#. _print " Copyright (C) 2007-2015 Dyne.org Foundation, License GNU GPL v3+" +#. _print " This is free software: you are free to change and redistribute it" +#. > _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#: tomb:2711 msgid " For the latest sourcecode go to <http://dyne.org/software/tomb>" msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This is free software: you are free to change and redistribute it" +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. > _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#: tomb:2716 msgid " This source code is distributed in the hope that it will be useful," msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " For the latest sourcecode go to <http://dyne.org/software/tomb>" +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. > _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#: tomb:2717 msgid " but WITHOUT ANY WARRANTY; without even the implied warranty of" msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print "\000" +#. option_is_set -v && { +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. > _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#: tomb:2718 msgid " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. local langwas=$LANG +#. LANG=en +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. > _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. _print "System utils:" +#. _print "\000" +#. cat <<EOF +#: tomb:2720 msgid " When in need please refer to <http://dyne.org/support>." msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. _print " This source code is distributed in the hope that it will be useful," +#. _print " but WITHOUT ANY WARRANTY; without even the implied warranty of" +#. _print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +#. LANG=$langwas +#. _print " When in need please refer to <http://dyne.org/support>." +#. _print "\000" +#. > _print "System utils:" +#. _print "\000" +#. cat <<EOF +#. `sudo -V | head -n1` +#. `cryptsetup --version` +#: tomb:2722 msgid "System utils:" msgstr "" -#: print +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. `cryptsetup --version` +#. `pinentry --version` +#. `gpg --version | head -n1` - key forging algorithms (GnuPG symmetric ciphers): +#. `list_gnupg_ciphers` +#. EOF +#. _print "\000" +#. > _print "Optional utils:" +#. _print "\000" +#. _list_optional_tools version +#. return 0 +#. } +#: tomb:2732 msgid "Optional utils:" msgstr "" -#: warning +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. } +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. > _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#: tomb:2742 msgid "Command \"::1 subcommand::\" not recognized." msgstr "" -#: message +#. Fold: Main routine +#. Function: main +#. +#. Code sample: +#. usage +#. ;; +#. +#. # Reject unknown command and suggest help +#. *) +#. _warning "Command \"::1 subcommand::\" not recognized." $subcommand +#. > _message "Try -h for help." +#. return 1 +#. ;; +#. esac +#. return $? +#: tomb:2743 msgid "Try -h for help." msgstr "" diff --git a/tomb b/tomb @@ -1505,7 +1505,7 @@ lock_tomb_with_key() { _message "Commanded to lock tomb ::1 tomb file::" $TOMBFILE [[ -f $TOMBPATH ]] || { - _failure "There is no tomb here. You have to it dig first." } + _failure "There is no tomb here. You have to dig it first." } _verbose "Tomb found: ::1 tomb path::" $TOMBPATH