]> git.apps.os.sepia.ceph.com Git - fscrypt.git/log
fscrypt.git
8 years agoMerge pull request #52 from google/keyrings
Joseph Richey [Thu, 31 Aug 2017 21:51:55 +0000 (14:51 -0700)]
Merge pull request #52 from google/keyrings

Changes to the keyrings interface, corresponding UI changes, and misc changes

8 years agoMerge pull request #54 from google/uuid
Joseph Richey [Thu, 31 Aug 2017 21:51:37 +0000 (14:51 -0700)]
Merge pull request #54 from google/uuid

Use `/dev/disk/by-uuid` to get UUID links to other filesystems

8 years agofilesystem: libblkid -> search /dev/disk/by-uuid
Joe Richey [Thu, 31 Aug 2017 21:05:29 +0000 (14:05 -0700)]
filesystem: libblkid -> search /dev/disk/by-uuid

8 years agosecurity: Error if privilege reset goes wrong
Joe Richey [Thu, 31 Aug 2017 19:09:26 +0000 (12:09 -0700)]
security: Error if privilege reset goes wrong

8 years agoFixed linter issues
Joe Richey [Thu, 31 Aug 2017 18:29:30 +0000 (11:29 -0700)]
Fixed linter issues

8 years agocmd/fscrypt: Add --user flag for running as root
Joe Richey [Thu, 31 Aug 2017 01:16:16 +0000 (18:16 -0700)]
cmd/fscrypt: Add --user flag for running as root

The --user flag can now be used to have the targe user (the one whose
keyring and password will be used in fscrypt) be different than the
calling user. Very usefull for things like

sudo fscrypt purge /media/joerichey/usb --user=joerichey

which will now have privileges to drop caches, but will properly clear
the keys from the user's keyring.

8 years agopam_fscrypt: Added logging and use of new pam API
Joe Richey [Thu, 31 Aug 2017 01:03:09 +0000 (18:03 -0700)]
pam_fscrypt: Added logging and use of new pam API

8 years agoactions: context now hold a target user.User
Joe Richey [Thu, 31 Aug 2017 01:00:04 +0000 (18:00 -0700)]
actions: context now hold a target user.User

This user is used with policies to interface with the keryings and with
protectors to indicate which user's login passphrase should be used to
protectors of type pam_passphrase.

8 years agocrypto: Updated to include user parameter
Joe Richey [Thu, 31 Aug 2017 00:57:38 +0000 (17:57 -0700)]
crypto: Updated to include user parameter

8 years agopam: Handle holds data for calling and PAM users
Joe Richey [Thu, 31 Aug 2017 00:55:30 +0000 (17:55 -0700)]
pam: Handle holds data for calling and PAM users

The functions are now changed to (Start|Stop)AsPamUser to indicate that
they handle privilege modification and keyring setup.

8 years agosecurity: Rewrite of keryings and permissions
Joe Richey [Thu, 31 Aug 2017 00:51:05 +0000 (17:51 -0700)]
security: Rewrite of keryings and permissions

The keyring lookup functions no longer read from /proc/keys. Now they
simply spawn a thread, drop privs, and check with GetKeyringID and
KEY_SPEC_USER_KEYRING. See userKeyringID() for more info.

The privileges functions have also been changed. Now the concept of
setting privileges is seperate form the concept of setting up the
keyrings.

8 years agoutil: Added parsing and effective user functions
Joseph Richey [Wed, 30 Aug 2017 11:49:39 +0000 (04:49 -0700)]
util: Added parsing and effective user functions

8 years agogitignore: Update to include VSCode files
Joseph Richey [Wed, 30 Aug 2017 11:07:13 +0000 (04:07 -0700)]
gitignore: Update to include VSCode files

8 years agoGo formatter "gofmt" -> "goimports"
Joseph Richey [Wed, 30 Aug 2017 05:29:33 +0000 (22:29 -0700)]
Go formatter "gofmt" -> "goimports"

8 years agopam_fscrypt: Handle empty arguments list
Joseph Richey [Wed, 30 Aug 2017 04:37:01 +0000 (21:37 -0700)]
pam_fscrypt: Handle empty arguments list

8 years agocmd/fscrypt: Stop dropping/raising for sudo
Joseph Richey [Wed, 30 Aug 2017 04:32:33 +0000 (21:32 -0700)]
cmd/fscrypt: Stop dropping/raising for sudo

8 years agoMerge pull request #49 from google/misc
Joseph Richey [Wed, 30 Aug 2017 02:06:26 +0000 (19:06 -0700)]
Merge pull request #49 from google/misc

Fix a wide variety of small issues and update documentation

8 years agoMerge pull request #48 from google/contrib
Joseph Richey [Tue, 29 Aug 2017 23:53:16 +0000 (16:53 -0700)]
Merge pull request #48 from google/contrib

Update CONTRIBUTING.md to explain how issues will work

8 years agoMerge pull request #47 from google/build_tags
Joseph Richey [Tue, 29 Aug 2017 23:47:19 +0000 (16:47 -0700)]
Merge pull request #47 from google/build_tags

Makefile: Build version flag no longer needs repo

8 years agoREADME: Clarified boot related encryption issues
Joe Richey [Tue, 29 Aug 2017 18:57:34 +0000 (11:57 -0700)]
README: Clarified boot related encryption issues

8 years agoCONTRIBUTING: typo
Joe Richey [Tue, 29 Aug 2017 18:23:26 +0000 (11:23 -0700)]
CONTRIBUTING: typo

8 years agocrypto: Handle when "ulimit -l" is too low
Joe Richey [Tue, 29 Aug 2017 18:17:10 +0000 (11:17 -0700)]
crypto: Handle when "ulimit -l" is too low

8 years agoFixed typos
Joe Richey [Tue, 29 Aug 2017 17:25:53 +0000 (10:25 -0700)]
Fixed typos

8 years agoAdded +build linux,cgo flags
Joe Richey [Tue, 29 Aug 2017 17:23:54 +0000 (10:23 -0700)]
Added +build linux,cgo flags

8 years agoCONTRIBUTING: Make it clear how issues work
Joe Richey [Tue, 29 Aug 2017 16:46:12 +0000 (09:46 -0700)]
CONTRIBUTING: Make it clear how issues work

8 years agoMakefile: Build version flag no longer needs repo
Joe Richey [Tue, 29 Aug 2017 16:05:02 +0000 (09:05 -0700)]
Makefile: Build version flag no longer needs repo

8 years agoMerge pull request #44 from mhalcrow/master
Joseph Richey [Mon, 28 Aug 2017 20:02:18 +0000 (13:02 -0700)]
Merge pull request #44 from mhalcrow/master

Fix typo (once -> one).

8 years agoFix typo (once -> one).
Michael Halcrow [Fri, 25 Aug 2017 21:45:09 +0000 (14:45 -0700)]
Fix typo (once -> one).

8 years agoMerge pull request #25 from google/fix
Joseph Richey [Thu, 24 Aug 2017 07:53:11 +0000 (00:53 -0700)]
Merge pull request #25 from google/fix

fscrypt PAM module

8 years agoUpdated documentation for PAM module help
Joseph Richey [Thu, 24 Aug 2017 07:29:54 +0000 (00:29 -0700)]
Updated documentation for PAM module help

8 years agosecurity: fscrypt now possesses the user keyring
Joseph Richey [Thu, 24 Aug 2017 06:46:54 +0000 (23:46 -0700)]
security: fscrypt now possesses the user keyring

8 years agopam_fscrypt: Session accounting completed
Joe Richey joerichey@google.com [Thu, 24 Aug 2017 01:51:23 +0000 (18:51 -0700)]
pam_fscrypt: Session accounting completed

8 years agoAdded some documentation and improved security API
Joe Richey joerichey@google.com [Wed, 23 Aug 2017 19:29:10 +0000 (12:29 -0700)]
Added some documentation and improved security API

8 years agopam_fscrypt: lock all PAM policies w/ flag
Joe Richey joerichey@google.com [Tue, 22 Aug 2017 22:41:18 +0000 (15:41 -0700)]
pam_fscrypt: lock all PAM policies w/ flag

8 years agopam_fscrypt: Updated module to use new APIs
Joe Richey joerichey@google.com [Tue, 22 Aug 2017 21:15:58 +0000 (14:15 -0700)]
pam_fscrypt: Updated module to use new APIs

8 years agosecurity: Moved cache dropping function
Joe Richey joerichey@google.com [Tue, 22 Aug 2017 19:52:41 +0000 (12:52 -0700)]
security: Moved cache dropping function

8 years agoUpdated documentation and build system for PAM
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 22:42:31 +0000 (15:42 -0700)]
Updated documentation and build system for PAM

8 years agopam_fscrypt: The actual PAM module and config
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 22:41:23 +0000 (15:41 -0700)]
pam_fscrypt: The actual PAM module and config

8 years agoVarious small nits a helper functions for PAM
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 22:40:35 +0000 (15:40 -0700)]
Various small nits a helper functions for PAM

8 years agoMerge pull request #39 from google/purge
Joseph Richey [Tue, 22 Aug 2017 18:46:39 +0000 (11:46 -0700)]
Merge pull request #39 from google/purge

Purge command now clears cache

8 years agosecurity: Fixed typo and improved error handling
Joe Richey joerichey@google.com [Tue, 22 Aug 2017 18:32:03 +0000 (11:32 -0700)]
security: Fixed typo and improved error handling

8 years agocmd/fscrypt: purge command now clears cache
Joe Richey joerichey@google.com [Wed, 16 Aug 2017 01:11:29 +0000 (18:11 -0700)]
cmd/fscrypt: purge command now clears cache

8 years agoMerge pull request #37 from google/keyring
Joseph Richey [Tue, 15 Aug 2017 20:46:32 +0000 (13:46 -0700)]
Merge pull request #37 from google/keyring

crypto: Switch from session to user keyring

8 years agoMerge pull request #36 from google/memory
Joseph Richey [Tue, 15 Aug 2017 20:46:04 +0000 (13:46 -0700)]
Merge pull request #36 from google/memory

util: Slice/Pointer conversion fits in MatInt32

8 years agocrypto: Switch from session to user keyring
Joe Richey joerichey@google.com [Tue, 15 Aug 2017 19:06:11 +0000 (12:06 -0700)]
crypto: Switch from session to user keyring

8 years agoutil: Slice/Pointer conversion fits in MatInt32
Joseph Richey [Mon, 14 Aug 2017 00:40:15 +0000 (17:40 -0700)]
util: Slice/Pointer conversion fits in MatInt32

8 years agoMerge pull request #33 from ebiggers/fix_hashing_calibration
Joseph Richey [Mon, 7 Aug 2017 18:21:13 +0000 (11:21 -0700)]
Merge pull request #33 from ebiggers/fix_hashing_calibration

actions: calculate password hash difficulty correctly

8 years agoMerge pull request #32 from ebiggers/ErrKeyFileLength_fix
Joseph Richey [Mon, 7 Aug 2017 17:29:58 +0000 (10:29 -0700)]
Merge pull request #32 from ebiggers/ErrKeyFileLength_fix

cmd/fscrypt: fix help message for ErrKeyFileLength

8 years agoactions: calculate password hash difficulty correctly
Eric Biggers [Mon, 7 Aug 2017 17:05:53 +0000 (10:05 -0700)]
actions: calculate password hash difficulty correctly

'fscrypt setup' is supposed to calibrate the Argon2 password hashing
difficulty to 1s by default, but actually it was setting it to only 1s /
num_cpus because the hashing is done with all CPUs and it is timed using
the CLOCK_PROCESS_CPUTIME_ID clock, which measures the time spent by all
threads in the process.  Fix this by dividing the elapsed time by
HashingCosts.Parallelism, which is used as the number of threads.

8 years agocmd/fscrypt: fix help message for ErrKeyFileLength
Eric Biggers [Mon, 7 Aug 2017 16:51:20 +0000 (09:51 -0700)]
cmd/fscrypt: fix help message for ErrKeyFileLength

The key file for the raw_key source is required to contain a wrapping
key (32 bytes), not a policy key (64 bytes).

8 years agoMerge pull request #30 from google/josephlr-patch-1
Joseph Richey [Tue, 25 Jul 2017 09:54:25 +0000 (02:54 -0700)]
Merge pull request #30 from google/josephlr-patch-1

README reformatting

8 years agoREADME reformatting
Joseph Richey [Tue, 25 Jul 2017 09:53:13 +0000 (02:53 -0700)]
README reformatting

The version badge was broken. This fixes it and inlines the version in the top line.

8 years agoMerge pull request #29 from google/docs
Joseph Richey [Sun, 23 Jul 2017 09:21:16 +0000 (02:21 -0700)]
Merge pull request #29 from google/docs

Fixed cloning instructions

8 years agoREADME: Fixed cloning documentation
Joseph Richey [Sun, 23 Jul 2017 09:10:36 +0000 (02:10 -0700)]
README: Fixed cloning documentation

8 years agoMerge pull request #27 from google/tests
Joseph Richey [Thu, 20 Jul 2017 01:17:29 +0000 (18:17 -0700)]
Merge pull request #27 from google/tests

coveralls: Adding Travis CI integration

8 years agoBuild system: no longer run make gen for make all
Joe Richey joerichey@google.com [Thu, 20 Jul 2017 01:10:18 +0000 (18:10 -0700)]
Build system: no longer run make gen for make all

8 years agocrypto: Add more tests for bad key lengths
Joe Richey joerichey@google.com [Thu, 20 Jul 2017 00:54:12 +0000 (17:54 -0700)]
crypto: Add more tests for bad key lengths

8 years agoREADME: add badges for license and code coverage
Joe Richey joerichey@google.com [Thu, 20 Jul 2017 00:42:44 +0000 (17:42 -0700)]
README: add badges for license and code coverage

8 years agocoveralls: Adding Travis CI integration
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 23:55:43 +0000 (16:55 -0700)]
coveralls: Adding Travis CI integration

8 years agoMerge pull request #23 from google/fix
Joseph Richey [Wed, 19 Jul 2017 04:51:15 +0000 (21:51 -0700)]
Merge pull request #23 from google/fix

travis CI: Test config file

8 years agoMakefile: typo
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 04:18:22 +0000 (21:18 -0700)]
Makefile: typo

8 years agoUpdate documentation about new build system
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 04:09:55 +0000 (21:09 -0700)]
Update documentation about new build system

8 years agometadata: Remove "go generate" and regenerate
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 04:09:24 +0000 (21:09 -0700)]
metadata: Remove "go generate" and regenerate

8 years agotests: Unit tests and Integration tests work
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 04:08:02 +0000 (21:08 -0700)]
tests: Unit tests and Integration tests work

Now the testing functions will skip the integration tests if a testing
filesystem is not specified.

8 years agoTravis.yml and Makefile now run integration tests.
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 18:04:50 +0000 (11:04 -0700)]
Travis.yml and Makefile now run integration tests.

8 years agoMerge pull request #22 from google/fix
Joseph Richey [Tue, 18 Jul 2017 17:59:40 +0000 (10:59 -0700)]
Merge pull request #22 from google/fix

Fixing fscrypt build system

8 years agoactions: Fixed flaky hashing test
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:29:27 +0000 (23:29 -0700)]
actions: Fixed flaky hashing test

8 years agoBetter output for input_fail.py
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:25:48 +0000 (23:25 -0700)]
Better output for input_fail.py

8 years agocmd/fscrypt: more nits to fix "make lint"
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:18:49 +0000 (23:18 -0700)]
cmd/fscrypt: more nits to fix "make lint"

8 years agoSmall fixes so "make lint" doesn't complain.
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:16:00 +0000 (23:16 -0700)]
Small fixes so "make lint" doesn't complain.

8 years agopam: Added missing documentation (fix "make lint")
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:04:47 +0000 (23:04 -0700)]
pam: Added missing documentation (fix "make lint")

8 years agoChanges from "make format"
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 05:52:51 +0000 (22:52 -0700)]
Changes from "make format"

8 years agoMakefile: Rewrite for presubmit checks
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 05:51:23 +0000 (22:51 -0700)]
Makefile: Rewrite for presubmit checks

The commit reorganizes the Makefile, so that "make check" can run on
each PR to detect any errors.

8 years agoMerge pull request #21 from google/fix
Joseph Richey [Tue, 18 Jul 2017 01:26:19 +0000 (18:26 -0700)]
Merge pull request #21 from google/fix

Add PAM package

8 years agocmd/fscrypt: username and login token fix
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 00:30:46 +0000 (17:30 -0700)]
cmd/fscrypt: username and login token fix

The commit changes how we get the username representation, and uses the
new pam API for checking the proposed login token.

8 years agopam: IsUserLoginToken now uses PAM library
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 00:27:06 +0000 (17:27 -0700)]
pam: IsUserLoginToken now uses PAM library

8 years agopam: Add Go wrappers around PAM functions
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 00:22:54 +0000 (17:22 -0700)]
pam: Add Go wrappers around PAM functions

This commit provides a Go interface to the PAM functions.

8 years agopam: C implementation for conversation and cleanup
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 00:19:37 +0000 (17:19 -0700)]
pam: C implementation for conversation and cleanup

This commit adds in a C implementation for the pam_conv we will use in
login.go as well as adding three CleanupFuncs that will be used with
pam_set_data(). It also adds copyInfoSecret() which should be paired
with freeSecret().

8 years agocrypto: Conversion to/from C strings
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 00:15:15 +0000 (17:15 -0700)]
crypto: Conversion to/from C strings

8 years agopam: Add PAM Items and Flags
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 22:44:57 +0000 (15:44 -0700)]
pam: Add PAM Items and Flags

Code pulled from github.com/msteinert/pam

8 years agoutil: Add conversions for byte/pointer arrays
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 22:40:02 +0000 (15:40 -0700)]
util: Add conversions for byte/pointer arrays

8 years agoMerge pull request #20 from google/fix
Joseph Richey [Mon, 17 Jul 2017 22:12:28 +0000 (15:12 -0700)]
Merge pull request #20 from google/fix

Refactor ReadLine functions

8 years agocmd/fscrypt: prompts now use command functions
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 22:08:19 +0000 (15:08 -0700)]
cmd/fscrypt: prompts now use command functions

8 years agoutil: Move line reading into common package
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 22:01:38 +0000 (15:01 -0700)]
util: Move line reading into common package

8 years agoMerge pull request #19 from google/fix
Joseph Richey [Mon, 17 Jul 2017 20:28:16 +0000 (13:28 -0700)]
Merge pull request #19 from google/fix

Separate encryption support from metadata support

8 years agocmd/fscrypt: Improve "fscrypt status"
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 20:21:11 +0000 (13:21 -0700)]
cmd/fscrypt: Improve "fscrypt status"

Now that we can distinguish between lacking encryption support and
lacking fscrypt metadata, "fscrypt status" can now display this
additional information.

8 years agocmd/fscrypt: Check support before encrypting
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 20:19:43 +0000 (13:19 -0700)]
cmd/fscrypt: Check support before encrypting

Almost all actions only need to to check that the fscrypt metadata
exists (this is handled by the Mount methods). Only "fscrypt encrypt"
need to be sure the filesystem also supports encryption, so this check
is added.

8 years agofilesystem: Distinguish support and setup for fs
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 20:16:03 +0000 (13:16 -0700)]
filesystem: Distinguish support and setup for fs

This commit splits two pieces of functionality. Detecting if the fscrypt
metadata exists is now in CheckSetup() and checking if the filesystem
supports encryption is now in CheckSupport().

8 years agoMerge pull request #18 from google/fix
Joseph Richey [Mon, 17 Jul 2017 20:06:15 +0000 (13:06 -0700)]
Merge pull request #18 from google/fix

Polices can now be directly unlocked with Protectors

8 years agoactions: Add tests for policy unlocking
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 19:32:03 +0000 (12:32 -0700)]
actions: Add tests for policy unlocking

8 years agoactions: Protectors can directly unlock Policies
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 19:15:20 +0000 (12:15 -0700)]
actions: Protectors can directly unlock Policies

In addition to using callbacks, unlocked Protectors can now directly
unlock a policy. The error codes are updated to make more sense.

8 years agoMerge pull request #16 from google/fix
Joseph Richey [Fri, 14 Jul 2017 19:07:33 +0000 (12:07 -0700)]
Merge pull request #16 from google/fix

Use Description when placing keys in the keyring

8 years agoactions: Policies now have Description method
Joe Richey joerichey@google.com [Fri, 14 Jul 2017 19:04:21 +0000 (12:04 -0700)]
actions: Policies now have Description method

8 years agocrypto: Use single description parameter
Joe Richey joerichey@google.com [Fri, 14 Jul 2017 18:43:24 +0000 (11:43 -0700)]
crypto: Use single description parameter

Instead of using the service+descriptor parameters (which are always
combined in the same way), use a single description parameter.

8 years agoMerge pull request #15 from google/fix
Joseph Richey [Fri, 14 Jul 2017 18:38:20 +0000 (11:38 -0700)]
Merge pull request #15 from google/fix

Bug fixing for "fscrypt encrypt"

8 years agocmd/fscrypt: fix protector and policy cleanup
Joe Richey joerichey@google.com [Fri, 14 Jul 2017 18:32:41 +0000 (11:32 -0700)]
cmd/fscrypt: fix protector and policy cleanup

Protectors are only reverted if they were created, and Policies are only
depovisioned on failure.

8 years agovendor: Fixed package list so "make all" will work
Joe Richey joerichey@google.com [Fri, 14 Jul 2017 18:27:06 +0000 (11:27 -0700)]
vendor: Fixed package list so "make all" will work

During an earlier commit the vendor directory was self-referencing
various "fscrypt/<pkg>" packages. This no longer occurs.

8 years agoMerge pull request #14 from google/docs
Joseph Richey [Fri, 14 Jul 2017 03:19:49 +0000 (20:19 -0700)]
Merge pull request #14 from google/docs

Version now uses git tags and releases

8 years agoMakefile: version and data now pulled in directly
Joe Richey joerichey@google.com [Fri, 14 Jul 2017 01:46:18 +0000 (18:46 -0700)]
Makefile: version and data now pulled in directly

8 years agoREADME: Fixed version badge to pull from Git tags
Joseph Richey [Thu, 13 Jul 2017 22:47:40 +0000 (15:47 -0700)]
README: Fixed version badge to pull from Git tags