summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarrat <autumn-wind@web.de>2017-02-05 19:03:29 (GMT)
committer Narrat <autumn-wind@web.de>2017-02-05 19:03:29 (GMT)
commitb2ee2114cff508dfab8277559840aaa7865cc058 (patch)
tree3e26e3fbf1a5553088e8d67f600ef5fa2eef5ebc
parent537bb6aaebb5ff27e1f6786341a991d4b56b87bf (diff)
Make lsof an optional deprefs/pull/243/head
tomb doesn't need lsof for anything else, and can work regulary without it. So make it an optional feature, which allows to slam a tomb if lsof is installed Updates additionally the man page and generates a new pdf from it
-rw-r--r--INSTALL.md2
-rw-r--r--doc/tomb.16
-rw-r--r--doc/tomb_manpage.pdfbin21750 -> 30887 bytes
-rwxr-xr-xtomb9
4 files changed, 12 insertions, 5 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 56a8bc7..e25e7a0 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -9,7 +9,6 @@ Tomb needs a few programs to be installed on a system in order to work:
* gnupg
* cryptsetup
* pinentry-curses (and/or -gtk-2, -x11, -qt)
- * lsof
Most systems provide these tools in their package collection, for
instance on Debian/Ubuntu one can use `apt-get install` on Fedora and
@@ -67,6 +66,7 @@ Tomb can use some optional tools to extend its functionalities:
executable | function
---------- | ---------------------------------------------------
+ lsof | slam a tomb (close even if open programs)
dcfldd | show progress while digging tombs and keys
steghide | bury and exhume keys inside images
resizefs | extend the size of existing tomb volumes
diff --git a/doc/tomb.1 b/doc/tomb.1
index 775bc19..d032bd8 100644
--- a/doc/tomb.1
+++ b/doc/tomb.1
@@ -1,4 +1,4 @@
-.TH tomb 1 "November 26, 2014" "tomb"
+.TH tomb 1 "February 05, 2017" "tomb"
.SH NAME
Tomb \- the Crypto Undertaker
@@ -111,9 +111,9 @@ the tomb is in use by running processes (to force close, see
.IP "slam"
Closes a tomb like the command \fIclose\fR does, but it doesn't fail
even if the tomb is in use by other application processes: it looks
-for and violently kills \-9 each of them. This command may
+for and closes each of them (in order: TERM, HUP, KILL). This command may
provoke unsaved data loss, but assists users to face surprise
-situations.
+situations. It requires \fIlsof\fR else it falls back to \fIclose\fR.
.B
diff --git a/doc/tomb_manpage.pdf b/doc/tomb_manpage.pdf
index 55aa72d..d2bcad2 100644
--- a/doc/tomb_manpage.pdf
+++ b/doc/tomb_manpage.pdf
Binary files differ
diff --git a/tomb b/tomb
index 57260a7..e198fc6 100755
--- a/tomb
+++ b/tomb
@@ -809,6 +809,8 @@ _ensure_dependencies() {
# Which wipe command to use
command -v wipe 1>/dev/null 2>/dev/null && WIPE=(wipe -f -s)
+ # Check for lsof for slamming tombs
+ command -v lsof -h 1>/dev/null 2>/dev/null || LSOF=0
# Check for steghide
command -v steghide 1>/dev/null 2>/dev/null || STEGHIDE=0
# Check for resize
@@ -2730,7 +2732,12 @@ main() {
# Close the tomb
# `slam` is used to force closing.
umount|close|slam)
- [[ "$subcommand" == "slam" ]] && SLAM=1
+ [[ "$subcommand" == "slam" ]] && {
+ SLAM=1
+ [[ $LSOF == 0 ]] && {
+ unset SLAM
+ _warning "lsof not installed: cannot slam tombs."
+ _warning "Trying a regular close." }}
umount_tomb $PARAM[1]
;;