tkey file extension changed to .tomb.key - tomb - the crypto undertaker
 (HTM) git clone git://parazyd.org/tomb.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 81be1fa619de813332c6bbbac7d3edea01bf7710
 (DIR) parent f309e3f08ddaacd7aefa4a948d56e82e59f63c47
 (HTM) Author: Jaromil <jaromil@dyne.org>
       Date:   Sun, 20 Feb 2011 20:10:08 +0100
       
       key file extension changed to .tomb.key
       
       rename your keys !
       tthis change was motivated by the fact gpg tends to overwrite the
       .tomb file if we decrypt the tomb.gpg by hand. changing the extension
       in .tomb.key this doesn't happens.
       
       Diffstat:
         M share/dyne-tomb.xml                 |       4 ++--
         M share/tomb                          |       2 +-
         M share/tomb.applications             |       2 +-
         M share/tomb.desktop                  |       2 +-
         M share/tomb.keys                     |       6 ++++++
         M share/tomb.mime                     |       2 +-
         M src/tomb                            |      22 +++++++++++-----------
         M src/tomb-open                       |      14 +++++++-------
       
       8 files changed, 30 insertions(+), 24 deletions(-)
       ---
 (DIR) diff --git a/share/dyne-tomb.xml b/share/dyne-tomb.xml
       t@@ -1,11 +1,11 @@
        <?xml version="1.0"?>
        <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
          <mime-type type="application/x-tomb-volume">
       -    <comment>Tomb encrypted volume</comment>
       +    <comment>Tomb crypto volume</comment>
            <glob pattern="*.tomb"/>
          </mime-type>
          <mime-type type="application/x-tomb-key">
            <comment>Tomb crypto key</comment>
       -    <glob pattern="*.tomb.gpg"/>
       +    <glob pattern="*.tomb.key"/>
          </mime-type>
        </mime-info>
 (DIR) diff --git a/share/tomb b/share/tomb
       t@@ -1,4 +1,4 @@
       -?package(tomb):command="tomb" icon="/usr/share/pixmaps/monmort.xpm" needs="cryptsetup" \
       +?package(tomb):command="tomb" icon="/usr/share/pixmaps/monmort.xpm" needs="text" \
                section="Applications/Accessories" title="Tomb" hints="Crypto" \
                hotkey="Tomb"
        
 (DIR) diff --git a/share/tomb.applications b/share/tomb.applications
       t@@ -3,5 +3,5 @@ tomb
                 name=Tomb - Crypto Undertaker
                 can_open_multiple_files=false
                 expects_uris=false
       -         requires_terminal=false
       +         requires_terminal=true
                 mime-types=application/x-tomb-volume,application/x-tomb-key
 (DIR) diff --git a/share/tomb.desktop b/share/tomb.desktop
       t@@ -7,7 +7,7 @@ Comment=Keep your bones safe
        Exec=tomb-open %U
        TryExec=tomb-open
        Icon=monmort.xpm
       -Terminal=false
       +Terminal=true
        Categories=Utility;Security;Archiving;Filesystem;
        MimeType=application/x-tomb-volume;
        X-AppInstall-Package=tomb
 (DIR) diff --git a/share/tomb.keys b/share/tomb.keys
       t@@ -4,3 +4,9 @@ application/x-tomb-volume:
                view=tomb-open %f
                icon-filename=monmort.xpm
                short_list_application_ids_for_novice_user_level=tomb
       +
       +application/x-tomb-key:
       +        open=tomb-open %f
       +        view=tomb-open %f
       +        icon-filename=monmort.xpm
       +        short_list_application_ids_for_novice_user_level=tomb
 (DIR) diff --git a/share/tomb.mime b/share/tomb.mime
       t@@ -3,4 +3,4 @@ application/x-tomb-volume
                ext: tomb
        
        application/x-tomb-key
       -        ext: tomb.gpg
       +        ext: tomb.key
 (DIR) diff --git a/src/tomb b/src/tomb
       t@@ -170,8 +170,8 @@ get_arg_tomb() {
            if [ $KEY ]; then
                tombkey=$KEY # commandline -k flag
                act "tomb key specified manually: $tombkey"
       -    elif [ -r ${tombdir}/${tombname}.key ]; then
       -        tombkey=${tombdir}/${tombname}.key
       +    elif [ -r ${tombdir}/${tombname}.tomb.key ]; then
       +        tombkey=${tombdir}/${tombname}.tomb.key
                act "key found for tomb '${tombname}': ${tombkey}"
            else
                error "key not found for tomb '${tombname}'"
       t@@ -340,7 +340,7 @@ create_tomb() {
                exit 1
            fi
                
       -    notice "Setup your secret key file ${tombname}.key"
       +    notice "Setup your secret key file ${tombname}.tomb.key"
        
            # here user is prompted for key password
            for c in 1 2 3; do
       t@@ -365,7 +365,7 @@ create_tomb() {
        
            echo "${tombpass}" | gpg \
                --openpgp --batch --no-options --no-tty --passphrase-fd 0 \
       -        -o "${tombdir}/${tombname}.key" -c -a ${keytmp}/tomb.tmp
       +        -o "${tombdir}/${tombname}.tomb.key" -c -a ${keytmp}/tomb.tmp
        
            if [ $? = 2 ]; then
                error "setting password failed: gnupg returns 2"
       t@@ -409,7 +409,7 @@ create_tomb() {
            losetup -d ${nstloop}
        
            act "done creating $tombname encrypted storage (using Luks dm-crypt AES/SHA256)"
       -    notice "Your tomb is ready in ${tombdir}/${tombfile} and secured with key ${tombname}.key"
       +    notice "Your tomb is ready in ${tombdir}/${tombfile} and secured with key ${tombname}.tomb.key"
        
        }
        
       t@@ -580,7 +580,7 @@ decode_key() {
                return 1
            fi
        
       -    keyfile=${tombname%%\.*}.key
       +    keyfile=${tombname%%\.*}.tomb.key
            notice "Trying to exhume a key out of image $imagefile"
            for c in 1 2 3; do
                if [ $c = 1 ]; then
       t@@ -880,7 +880,7 @@ install_tomb() {
          </mime-type>
          <mime-type type="application/x-tomb-key">
            <comment>Tomb crypto key</comment>
       -    <glob pattern="*.key"/>
       +    <glob pattern="*.tomb.key"/>
          </mime-type>
        </mime-info>
        EOF
       t@@ -901,7 +901,7 @@ Comment=Keep your bones safe
        Exec=tomb-open %U
        TryExec=tomb-open
        Icon=monmort.xpm
       -Terminal=false
       +Terminal=true
        Categories=Utility;Security;Archiving;Filesystem;
        MimeType=application/x-tomb-volume;
        X-AppInstall-Package=tomb
       t@@ -910,7 +910,7 @@ EOF
        
            act "updating menus..."
            cat <<EOF > /etc/menu/tomb
       -?package(tomb):command="tomb" icon="/usr/share/pixmaps/monmort.xpm" needs="cryptsetup" \
       +?package(tomb):command="tomb" icon="/usr/share/pixmaps/monmort.xpm" needs="text" \
                section="Applications/Accessories" title="Tomb" hints="Crypto" \
                hotkey="Tomb"
        EOF
       t@@ -931,7 +931,7 @@ application/x-tomb-volume
                ext: tomb
        
        application/x-tomb-key
       -        ext: key
       +        ext: tomb.key
        EOF
            cat <<EOF > /usr/lib/mime/packages/tomb
        application/x-tomb-volume; tomb-open '%s'; priority=8
       t@@ -946,7 +946,7 @@ tomb
                 name=Tomb - Crypto Undertaker
                 can_open_multiple_files=false
                 expects_uris=false
       -         requires_terminal=false
       +         requires_terminal=true
                 mime-types=application/x-tomb-volume,application/x-tomb-key
        EOF
            act "Tomb is now installed."
 (DIR) diff --git a/src/tomb-open b/src/tomb-open
       t@@ -168,8 +168,8 @@ if [ $1 ]; then # is it a file?
                # is it a luks partition
                file ${tombdir}/${tombfile} | grep -i LUKS > /dev/null
                if [ $? = 0 ]; then # tomb is a valid LUKS file
       -            if [ -r ${tombdir}/${tombname}.key ]; then
       -                tombkey=${tombdir}/${tombname}.key
       +            if [ -r ${tombdir}/${tombname}.tomb.key ]; then
       +                tombkey=${tombdir}/${tombname}.tomb.key
                    else
                        ask_usbkey
                        if ! [ $usbkey_mount ]; then # no usb key was mounted
       t@@ -177,8 +177,8 @@ if [ $1 ]; then # is it a file?
                            echo "operation aborted." # TODO: dialog with pinentry
                            exit 1
                        else # usb mounted, check key presence
       -                    if [ -r ${usbkey_mount}/.tomb/${tombname}.key ]; then
       -                        tombkey=${usbkey_mount}/.tomb/${tombname}.key
       +                    if [ -r ${usbkey_mount}/.tomb/${tombname}.tomb.key ]; then
       +                        tombkey=${usbkey_mount}/.tomb/${tombname}.tomb.key
                            elif [ -r ${usbkey_mount}/.tomb ]; then
                                echo "we can't find the right key, have a look yourself:"
                                ls -lha ${usbkey_mount}/.tomb
       t@@ -335,12 +335,12 @@ if [ $? = 0 ]; then
                echo "${tombname}.key succesfully saved on your USB"
                echo "now we'll proceed opening your brand new tomb"
        
       -        tomb -k ${tombname}.key open ${tombfile}
       +        tomb -k ${tombname}.tomb.key open ${tombfile}
                if [ $? = 0 ]; then
                    launch_status ${tombname}
                fi
        
       -        rm -f ${tombname}.key
       +        rm -f ${tombname}.tomb.key
        
                sudo umount ${usbkey_mount}
                rmdir  ${usbkey_mount}
       t@@ -357,7 +357,7 @@ cat <<EOF
          named .tomb inside the first partition of an usb key.
        EOF
        
       -tomb -k ${tombname}.key open ${tombfile}
       +tomb -k ${tombname}.tomb.key open ${tombfile}
        if [ $? = 0 ]; then
            launch_status ${tombname}
        fi