Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 25 additions & 12 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
task:
name: FreeBSD
freebsd_instance:
image: freebsd-12-1-release-amd64
image_family: freebsd-15-0-amd64-ufs
install_script:
- pkg install -y bash cmake fusefs-libs gettext perl5
- pkg install -y bash rust fusefs-libs pkgconf openssl
- ln -s /usr/local/bin/bash /bin/bash
- kldload fuse
- kldload fusefs || kldload fuse
script:
- ./build.sh
- cargo build --release
- cargo test
- ENCFS_LIVE_TESTS=1 cargo test --test live_mount -- --ignored --test-threads=1
allow_failures: true

task:
name: MacOS
osx_instance:
image: catalina-xcode-11.3.1
install_script:
- brew cask install osxfuse
script:
- ./build.sh
# task:
# name: MacOS
# macos_instance:
# image: ghcr.io/cirruslabs/macos-runner:sonoma
# install_script:
# - brew tap macos-fuse-t/homebrew-cask
# - brew install --cask fuse-t
# - brew install pkg-config
# - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# script:
# - export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
# - mkdir -p $HOME/pkgconfig_shim
# - if [ -e /usr/local/lib/pkgconfig/fuse-t.pc ]; then ln -s /usr/local/lib/pkgconfig/fuse-t.pc $HOME/pkgconfig_shim/fuse.pc; fi
# - if [ -e /opt/homebrew/lib/pkgconfig/fuse-t.pc ]; then ln -s /opt/homebrew/lib/pkgconfig/fuse-t.pc $HOME/pkgconfig_shim/fuse.pc; fi
# - export PKG_CONFIG_PATH="$HOME/pkgconfig_shim:$PKG_CONFIG_PATH"
# - source $HOME/.cargo/env
# - cargo build --release
# - cargo test
# - ENCFS_LIVE_TESTS=1 cargo test --test live_mount -- --ignored --test-threads=1
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
* text=auto eol=lf

# Use bd merge for beads JSONL files
.beads/issues.jsonl merge=beads
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Rust CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y fuse libfuse-dev pkg-config libssl-dev

- name: Load fuse module
run: sudo modprobe fuse
continue-on-error: true

- name: Lint
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build --release

- name: Run tests
run: cargo test

- name: Run live mount tests
run: ENCFS_LIVE_TESTS=1 cargo test --test live_mount -- --ignored --test-threads=1
env:
RUST_BACKTRACE: 1
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
/build

# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
77 changes: 0 additions & 77 deletions .travis.yml

This file was deleted.

63 changes: 5 additions & 58 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,61 +1,8 @@
Current implementation:
* EncFS is licensed under the LGPL.

The code comprising the EncFS library (libencfs) is licensed under the LGPL.
The main programs (encfs, encfsctl, etc) are licensed under the GPL.
Legacy subdirectory:
* The code comprising the EncFS library (libencfs) is licensed under the LGPL.
* The main programs (encfs, encfsctl, etc) are licensed under the GPL.

For details of the licenses, see COPYING.LGPL and COPYING.GPL.

===========================================================================

The following 3rd party libraries are included in the EncFS source release
from github:

* easylogging++ : a logging library, which is supplied with the following license

The MIT License (MIT)

Copyright (c) 2015 muflihun.com

https://github.com/easylogging/easyloggingpp
http://easylogging.muflihun.com
http://muflihun.com

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


* tinyxml2 : an XML reader / writer, which is supplied with the following license:

TinyXML-2 is released under the zlib license:

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.

Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.


25 changes: 25 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "encfs"
version = "2.0.0-alpha.1"
edition = "2024"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.100"
base64 = "0.22.1"
daemonize = "0.5"
chrono = "0.4"
clap = { version = "4.5.53", features = ["derive"] }
env_logger = "0.11.8"
fuse_mt = "0.6.3"
libc = "0.2.178"
log = "0.4.29"
openssl = "0.10.75"
quick-xml = { version = "0.38.4", features = ["serialize"] }
rpassword = "7.4.0"
serde = { version = "1.0.228", features = ["derive"] }

[[bin]]
name = "encfsctl"
path = "src/encfsctl.rs"
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v2.0.0-WIP / 2025-12-13
============
* "encfs" main program ported to Rust
* Old C++ implementation and support moved to `legacy` directory.

v1.9.5 / 2018-04-27
===================
* Correct a int/off_t buffer overflow in getSize()
Expand Down
36 changes: 25 additions & 11 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,31 @@ This document provides generic information for compiling EncFS.
If you are looking for specific instructions for your operating system or distribution,
take a look at the **[wiki](https://github.com/vgough/encfs/wiki)**.

Compiling EncFS
===============
## Building the Rust Implementation (Primary)

EncFS uses the CMake toolchain to create makefiles.
EncFS is now primarily implemented in Rust. To build:

Quickest way to build and test EncFS :
cargo build --release

./build.sh
To run tests:

Or following are the detailed steps to build EncFS:
cargo test

To install:

cargo install --path .

Dependencies:
* Rust toolchain (stable or nightly)
* FUSE library (libfuse or OSXFUSE on macOS)
* OpenSSL development libraries

## Building the Legacy C++ Implementation

The original C++ implementation has been moved to the `legacy/` directory.
To build the legacy version:

cd legacy
mkdir build
cd build
cmake ..
Expand All @@ -36,8 +50,8 @@ encrypted filesystem and run tests on it:

make integration

The compilation process creates two executables, encfs and encfsctl in
the encfs directory. You can install to in a system directory via:
The compilation process creates two executables, encfs and encfsctl.
You can install to in a system directory via:

make install

Expand All @@ -49,10 +63,10 @@ installed, then set the CMAKE_INSTALL_PREFIX option when running cmake. Eg:
Encfs and encfsctl can also be installed by hand. They need no special
permissions. You may also want the man pages encfs.1 and encfsctl.1.

Dependencies
============
Legacy C++ Dependencies
========================

EncFS depends on a number of libraries:
The legacy C++ implementation depends on:

* fuse : the userspace filesystem layer
* openssl / libressl : used for cryptographic primitives
Expand Down
Loading