]>
git.apps.os.sepia.ceph.com Git - fscrypt.git/log
Joseph Richey [Fri, 29 Sep 2017 09:39:01 +0000 (02:39 -0700)]
Makefile: Don't update dependancies w/ "make all"
Joseph Richey [Fri, 29 Sep 2017 09:08:56 +0000 (02:08 -0700)]
vendor: Update to latest versions
This changes the vendored sources of github.com/golang/protobuf,
golang.org/x/crypto/ssh, and golang.org/x/sys/unix to be the current
master versions.
Joseph Richey [Thu, 7 Sep 2017 01:16:03 +0000 (18:16 -0700)]
Fixes logging string for policies
We should always log the descriptor not the entire policy structure.
Joseph Richey [Fri, 1 Sep 2017 09:23:53 +0000 (02:23 -0700)]
Merge pull request #56 from google/panics
Fixed failures in PAM module
Joseph Richey [Fri, 1 Sep 2017 07:56:44 +0000 (00:56 -0700)]
cmd/fscrypt: Add explanations for keyring failures
Now the user is persented with help when they try to access a keyring
that isn't theirs or try to use fscrypt without a user keyring linked
into the session keyring.
Joseph Richey [Fri, 1 Sep 2017 07:55:22 +0000 (00:55 -0700)]
cmd/fscrypt: Check that keyrings are setup
Chaning the --user flag to (optionally) check for a proper keyring setup
allows us to fail early in cases where we need a working keyring.
Joseph Richey [Fri, 1 Sep 2017 07:53:07 +0000 (00:53 -0700)]
security: Change user keyring lookup algorithm
Now instead of spawning a seperate thread we alternate between changing
the euid and ruid to both find the keyring and link it to the process
keyring. Note that we also ensure that the user keyring is linked into
the root keyring whenever possible.
Joseph Richey [Fri, 1 Sep 2017 07:50:42 +0000 (00:50 -0700)]
security: No more permenant privilege dropping
This was creating an issue becasuse fully dropping privileges required
spawning a goroutine and using rutime.DropOSThread().
Joseph Richey [Fri, 1 Sep 2017 07:47:34 +0000 (00:47 -0700)]
pam_fscrypt: PAM module no longer crashes on panic
Now the offending panic will just be logged and the module will fail.
This is important as to not crash the login process.
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
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
Joe Richey [Thu, 31 Aug 2017 21:05:29 +0000 (14:05 -0700)]
filesystem: libblkid -> search /dev/disk/by-uuid
Joe Richey [Thu, 31 Aug 2017 19:09:26 +0000 (12:09 -0700)]
security: Error if privilege reset goes wrong
Joe Richey [Thu, 31 Aug 2017 18:29:30 +0000 (11:29 -0700)]
Fixed linter issues
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.
Joe Richey [Thu, 31 Aug 2017 01:03:09 +0000 (18:03 -0700)]
pam_fscrypt: Added logging and use of new pam API
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.
Joe Richey [Thu, 31 Aug 2017 00:57:38 +0000 (17:57 -0700)]
crypto: Updated to include user parameter
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.
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.
Joseph Richey [Wed, 30 Aug 2017 11:49:39 +0000 (04:49 -0700)]
util: Added parsing and effective user functions
Joseph Richey [Wed, 30 Aug 2017 11:07:13 +0000 (04:07 -0700)]
gitignore: Update to include VSCode files
Joseph Richey [Wed, 30 Aug 2017 05:29:33 +0000 (22:29 -0700)]
Go formatter "gofmt" -> "goimports"
Joseph Richey [Wed, 30 Aug 2017 04:37:01 +0000 (21:37 -0700)]
pam_fscrypt: Handle empty arguments list
Joseph Richey [Wed, 30 Aug 2017 04:32:33 +0000 (21:32 -0700)]
cmd/fscrypt: Stop dropping/raising for sudo
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
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
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
Joe Richey [Tue, 29 Aug 2017 18:57:34 +0000 (11:57 -0700)]
README: Clarified boot related encryption issues
Joe Richey [Tue, 29 Aug 2017 18:23:26 +0000 (11:23 -0700)]
CONTRIBUTING: typo
Joe Richey [Tue, 29 Aug 2017 18:17:10 +0000 (11:17 -0700)]
crypto: Handle when "ulimit -l" is too low
Joe Richey [Tue, 29 Aug 2017 17:25:53 +0000 (10:25 -0700)]
Fixed typos
Joe Richey [Tue, 29 Aug 2017 17:23:54 +0000 (10:23 -0700)]
Added +build linux,cgo flags
Joe Richey [Tue, 29 Aug 2017 16:46:12 +0000 (09:46 -0700)]
CONTRIBUTING: Make it clear how issues work
Joe Richey [Tue, 29 Aug 2017 16:05:02 +0000 (09:05 -0700)]
Makefile: Build version flag no longer needs repo
Joseph Richey [Mon, 28 Aug 2017 20:02:18 +0000 (13:02 -0700)]
Merge pull request #44 from mhalcrow/master
Fix typo (once -> one).
Michael Halcrow [Fri, 25 Aug 2017 21:45:09 +0000 (14:45 -0700)]
Fix typo (once -> one).
Joseph Richey [Thu, 24 Aug 2017 07:53:11 +0000 (00:53 -0700)]
Merge pull request #25 from google/fix
fscrypt PAM module
Joseph Richey [Thu, 24 Aug 2017 07:29:54 +0000 (00:29 -0700)]
Updated documentation for PAM module help
Joseph Richey [Thu, 24 Aug 2017 06:46:54 +0000 (23:46 -0700)]
security: fscrypt now possesses the user keyring
Joe Richey joerichey@google.com [Thu, 24 Aug 2017 01:51:23 +0000 (18:51 -0700)]
pam_fscrypt: Session accounting completed
Joe Richey joerichey@google.com [Wed, 23 Aug 2017 19:29:10 +0000 (12:29 -0700)]
Added some documentation and improved security API
Joe Richey joerichey@google.com [Tue, 22 Aug 2017 22:41:18 +0000 (15:41 -0700)]
pam_fscrypt: lock all PAM policies w/ flag
Joe Richey joerichey@google.com [Tue, 22 Aug 2017 21:15:58 +0000 (14:15 -0700)]
pam_fscrypt: Updated module to use new APIs
Joe Richey joerichey@google.com [Tue, 22 Aug 2017 19:52:41 +0000 (12:52 -0700)]
security: Moved cache dropping function
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 22:42:31 +0000 (15:42 -0700)]
Updated documentation and build system for PAM
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 22:41:23 +0000 (15:41 -0700)]
pam_fscrypt: The actual PAM module and config
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 22:40:35 +0000 (15:40 -0700)]
Various small nits a helper functions for PAM
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
Joe Richey joerichey@google.com [Tue, 22 Aug 2017 18:32:03 +0000 (11:32 -0700)]
security: Fixed typo and improved error handling
Joe Richey joerichey@google.com [Wed, 16 Aug 2017 01:11:29 +0000 (18:11 -0700)]
cmd/fscrypt: purge command now clears cache
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
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
Joe Richey joerichey@google.com [Tue, 15 Aug 2017 19:06:11 +0000 (12:06 -0700)]
crypto: Switch from session to user keyring
Joseph Richey [Mon, 14 Aug 2017 00:40:15 +0000 (17:40 -0700)]
util: Slice/Pointer conversion fits in MatInt32
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
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
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.
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).
Joseph Richey [Tue, 25 Jul 2017 09:54:25 +0000 (02:54 -0700)]
Merge pull request #30 from google/josephlr-patch-1
README 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.
Joseph Richey [Sun, 23 Jul 2017 09:21:16 +0000 (02:21 -0700)]
Merge pull request #29 from google/docs
Fixed cloning instructions
Joseph Richey [Sun, 23 Jul 2017 09:10:36 +0000 (02:10 -0700)]
README: Fixed cloning documentation
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
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
Joe Richey joerichey@google.com [Thu, 20 Jul 2017 00:54:12 +0000 (17:54 -0700)]
crypto: Add more tests for bad key lengths
Joe Richey joerichey@google.com [Thu, 20 Jul 2017 00:42:44 +0000 (17:42 -0700)]
README: add badges for license and code coverage
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 23:55:43 +0000 (16:55 -0700)]
coveralls: Adding Travis CI integration
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
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 04:18:22 +0000 (21:18 -0700)]
Makefile: typo
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 04:09:55 +0000 (21:09 -0700)]
Update documentation about new build system
Joe Richey joerichey@google.com [Wed, 19 Jul 2017 04:09:24 +0000 (21:09 -0700)]
metadata: Remove "go generate" and regenerate
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.
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 18:04:50 +0000 (11:04 -0700)]
Travis.yml and Makefile now run integration tests.
Joseph Richey [Tue, 18 Jul 2017 17:59:40 +0000 (10:59 -0700)]
Merge pull request #22 from google/fix
Fixing fscrypt build system
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:29:27 +0000 (23:29 -0700)]
actions: Fixed flaky hashing test
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:25:48 +0000 (23:25 -0700)]
Better output for input_fail.py
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:18:49 +0000 (23:18 -0700)]
cmd/fscrypt: more nits to fix "make lint"
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:16:00 +0000 (23:16 -0700)]
Small fixes so "make lint" doesn't complain.
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 06:04:47 +0000 (23:04 -0700)]
pam: Added missing documentation (fix "make lint")
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 05:52:51 +0000 (22:52 -0700)]
Changes from "make format"
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.
Joseph Richey [Tue, 18 Jul 2017 01:26:19 +0000 (18:26 -0700)]
Merge pull request #21 from google/fix
Add PAM package
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.
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 00:27:06 +0000 (17:27 -0700)]
pam: IsUserLoginToken now uses PAM library
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.
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().
Joe Richey joerichey@google.com [Tue, 18 Jul 2017 00:15:15 +0000 (17:15 -0700)]
crypto: Conversion to/from C strings
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
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 22:40:02 +0000 (15:40 -0700)]
util: Add conversions for byte/pointer arrays
Joseph Richey [Mon, 17 Jul 2017 22:12:28 +0000 (15:12 -0700)]
Merge pull request #20 from google/fix
Refactor ReadLine functions
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 22:08:19 +0000 (15:08 -0700)]
cmd/fscrypt: prompts now use command functions
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 22:01:38 +0000 (15:01 -0700)]
util: Move line reading into common package
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
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.
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.
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().
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
Joe Richey joerichey@google.com [Mon, 17 Jul 2017 19:32:03 +0000 (12:32 -0700)]
actions: Add tests for policy unlocking
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.