Skip to content

Commit

Permalink
Unmount all volumes on device wipe, change device enumeration impl (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostassoid authored Aug 14, 2021
1 parent 9d2ed75 commit 30b8b68
Show file tree
Hide file tree
Showing 19 changed files with 665 additions and 380 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.iml
/.vagrant
/testing/*.vdi
*.log
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Change Log

## [Unreleased] - ReleaseDate

### Added

* All mounting points associated with a device get unmounted before wiping, including nested partitions/volumes. Previously, this caused issues on Windows, for example, when it was impossible to access a physical drive for writing if it had any mounted volumes.
* Volume label is now part of the storage device description.

### Changed

* Storage devices are now presented as a tree instead of a flat list. This allows to quickly understand the dependency between storage devices.
* Elevated privileges are not required for listing the devices.
* [macOS] Device enumeration implementation was replaced with the one based on 'diskutil'. There upside is that 'sudo' is not required for the 'list' command and that the data is more complete. The downside is that this method is pretty slow and there is a bug in 'diskutil' tool not returning a correct storage size for APFS volumes.
* [linux] Device enumeration implementation was replaced with the one based on 'sysfs' abstractions. Mostly to get the accurate device hierarchy info.
* The progress bar is red now, because DANGER.

## [v0.5.1] - 2021-04-15

### Added
Expand Down
136 changes: 118 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ travis-ci = { repository = "Kostassoid/lethe", branch = "master" }
anyhow = "1.0"
thiserror = "1.0"
roaring = "0.6.2"
libc = "^0.2"
clap = "~2.33"
rand = "0.7.0"
rand_chacha = "0.2.1"
Expand All @@ -27,10 +26,14 @@ console = "0.7.7"
prettytable-rs = "^0.8"
streaming-iterator = "0.1.4"
regex = "1"
plist = "1"
serde = "1"
serde_derive = "1"
libc = "0.2"

[target.'cfg(unix)'.dependencies]
sysfs-class = "0.1.3"
nix = "0.14.1"
nix = "0.22.0"

[target.'cfg(windows)'.dependencies.winapi]
version = "0.3"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lethe

[![Build Status](https://travis-ci.org/Kostassoid/lethe.svg?branch=master)](https://travis-ci.org/Kostassoid/lethe)
[![Build Status](https://travis-ci.com/Kostassoid/lethe.svg?branch=master)](https://travis-ci.com/Kostassoid/lethe)

A secure, free, cross-platform and open-source drive wiping utility.

Expand All @@ -12,7 +12,7 @@ static pattern.
This is basically what this tool does.

There are other similar applications around (including multiple built-in Linux tools). Most of them are proprietary, or slow,
or non cross-platform, which was a requirement for me. So I wrote this application.
or non-cross-platform, which was a requirement for me. So I wrote this application.

## Features

Expand Down Expand Up @@ -40,9 +40,9 @@ I would love to learn about other people's experience with the application. Let
Current release: **v0.5.1** [Changelog](CHANGELOG.md)

Download and unzip binaries for your OS:
- [Windows x64](https://github.com/Kostassoid/lethe/releases/download/v0.5.1/lethe-v0.5.1-x86_64-pc-windows-gnu.zip)
- [macOS x64](https://github.com/Kostassoid/lethe/releases/download/v0.5.1/lethe-v0.5.1-x86_64-apple-darwin.tar.gz)
- [Linux x64](https://github.com/Kostassoid/lethe/releases/download/v0.5.1/lethe-v0.5.1-x86_64-unknown-linux-musl.tar.gz)
- [Windows x86-64](https://github.com/Kostassoid/lethe/releases/download/v0.5.1/lethe-v0.5.1-x86_64-pc-windows-gnu.zip)
- [macOS x86-64](https://github.com/Kostassoid/lethe/releases/download/v0.5.1/lethe-v0.5.1-x86_64-apple-darwin.tar.gz)
- [Linux x86-64](https://github.com/Kostassoid/lethe/releases/download/v0.5.1/lethe-v0.5.1-x86_64-unknown-linux-musl.tar.gz)

Or install `lethe` from sources using latest [Rust toolchain](https://www.rust-lang.org/tools/install):

Expand Down
35 changes: 10 additions & 25 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
test_drive_path = './testing/test_drive.vdi'
Vagrant.require_version ">= 2.2.8"
ENV['VAGRANT_EXPERIMENTAL'] = 'disks'

Vagrant.configure("2") do |config|
config.vm.define "hashicorp" do |h|
h.vm.box = "hashicorp/bionic64"
h.vm.provider :virtualbox

config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
h.vm.disk :disk, size: "1GB", name: "extra_storage"

v.customize ["modifyvm", :id, "--usb", "off"]
v.customize ["modifyvm", :id, "--usbehci", "off"]
v.customize ["modifyvm", :id, "--usbxhci", "off"]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]

unless File.exist?(test_drive_path)
v.customize ['createhd', '--filename', test_drive_path, '--size', 99]
end
v.customize ['storageattach', :id, '--storagectl', 'IDE Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', test_drive_path]

end

config.vm.define "linux" do |linux|
linux.vm.box = "minimal/xenial64"

linux.vm.provision "shell", inline: "echo Welcome to testing Lethe"
linux.vm.provision "shell", inline: "apt-get update"
linux.vm.provision "shell", inline: "apt-get -y install curl build-essential"
linux.vm.provision "shell", inline: "curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal"
h.vm.provision "shell", inline: "echo Welcome to testing Lethe"
h.vm.provision "shell", inline: "apt-get update"
h.vm.provision "shell", inline: "apt-get -y install curl build-essential"
h.vm.provision "shell", inline: "curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal", privileged: false
end

end
Loading

0 comments on commit 30b8b68

Please sign in to comment.