]> git.apps.os.sepia.ceph.com Git - fscrypt.git/log
fscrypt.git
6 years agoMerge pull request #110 from wjt/patch-1
Joseph Richey [Wed, 21 Nov 2018 02:26:01 +0000 (18:26 -0800)]
Merge pull request #110 from wjt/patch-1

README: fix "Debain" typo

6 years agoREADME: fix "Debain" typo
Will Thompson [Mon, 5 Nov 2018 11:54:08 +0000 (11:54 +0000)]
README: fix "Debain" typo

7 years agoMerge pull request #106 from fristonio/spell-check
Joseph Richey [Thu, 6 Sep 2018 05:49:42 +0000 (22:49 -0700)]
Merge pull request #106 from fristonio/spell-check

feat(spell-check): add make command for spell check.

7 years agofeat(spell-check): add make command for spell check.
Deepesh Pathak [Sat, 1 Sep 2018 19:47:27 +0000 (01:17 +0530)]
feat(spell-check): add make command for spell check.

* Remove spelling mistakes in the repository
* Add travis script to check for typos.
* Add command to Makefile to check for typos.
* Fixes #71

7 years agoMerge pull request #107 from google/mod
Joseph Richey [Thu, 30 Aug 2018 20:41:49 +0000 (13:41 -0700)]
Merge pull request #107 from google/mod

Use Go Modules and support Go 1.11 building

7 years agoUpdate Travis to use go 1.10 and go 1.11
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 20:33:52 +0000 (13:33 -0700)]
Update Travis to use go 1.10 and go 1.11

7 years agoBump Travis Version
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 11:14:57 +0000 (04:14 -0700)]
Bump Travis Version

7 years agoFix golint to not need a special fork
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 10:55:16 +0000 (03:55 -0700)]
Fix golint to not need a special fork

7 years agoGo 1.11 gofmt updatae
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 10:54:52 +0000 (03:54 -0700)]
Go 1.11 gofmt updatae

7 years agoUse proto.Equal instead of reflect.DeepEquals
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 10:54:08 +0000 (03:54 -0700)]
Use proto.Equal instead of reflect.DeepEquals

7 years agoUpdate Protoc Compiler to 3.6.1
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 09:32:37 +0000 (02:32 -0700)]
Update Protoc Compiler to 3.6.1

7 years agoUpdate dependancies to lastest version
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 09:24:33 +0000 (02:24 -0700)]
Update dependancies to lastest version

7 years agoDon't vendor helper tooling
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 09:19:59 +0000 (02:19 -0700)]
Don't vendor helper tooling

7 years agoRemove dep from documentation and travis build
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 08:29:36 +0000 (01:29 -0700)]
Remove dep from documentation and travis build

7 years agoTransition from dep to golang's module system
Joe Richey joerichey@google.com [Thu, 30 Aug 2018 08:26:47 +0000 (01:26 -0700)]
Transition from dep to golang's module system

7 years agoMerge pull request #105 from google/release
Joseph Richey [Thu, 23 Aug 2018 18:10:06 +0000 (11:10 -0700)]
Merge pull request #105 from google/release

Release: v0.2.4

7 years agoRelease: v0.2.4
Joe Richey joerichey@google.com [Thu, 23 Aug 2018 18:07:49 +0000 (11:07 -0700)]
Release: v0.2.4

7 years agoMerge pull request #103 from google/pam
Joseph Richey [Thu, 23 Aug 2018 18:05:39 +0000 (11:05 -0700)]
Merge pull request #103 from google/pam

Cleanup privilege dropping/raising in pam_fscrypt

7 years agoImprove debug and error output for pam_fscrypt
Joe Richey joerichey@google.com [Wed, 22 Aug 2018 12:28:21 +0000 (05:28 -0700)]
Improve debug and error output for pam_fscrypt

7 years agoEnsure keyring privilege changes are reversible
Joe Richey joerichey@google.com [Wed, 22 Aug 2018 12:23:00 +0000 (05:23 -0700)]
Ensure keyring privilege changes are reversible

This change makes sure that, when we set the ruid and euid in order to
get the user keyring linked into the current process keyring, we will
always be able to reverse these changes (using a suid of 0).

This fixes an issue where "su <user>" would result in a system error
when called by an unprivileged user. It also explains exactly how and
why we are making these privilege changes.

7 years agoEnsure setting user privileges is reversible
Joe Richey joerichey@google.com [Wed, 22 Aug 2018 12:17:32 +0000 (05:17 -0700)]
Ensure setting user privileges is reversible

This change makes sure after dropping then elevating privileges for a
process, the euid, guid, and groups are all the same as they were
originally. This significantly simplifies the privilege logic.

This fixes CVE-2018-6558, which allowed an unprivleged user to gain
membership in the root group (gid 0) due to the groups not being
properly reset in the process.

7 years agoMerge pull request #104 from google/travis
Joseph Richey [Thu, 23 Aug 2018 17:59:35 +0000 (10:59 -0700)]
Merge pull request #104 from google/travis

Fix Travis to only use Go 1.10

7 years agoUpdate docs to indicate v1.10 is required
Joe Richey joerichey@google.com [Thu, 23 Aug 2018 17:53:58 +0000 (10:53 -0700)]
Update docs to indicate v1.10 is required

7 years agoFix Travis to only use Go 1.10
Joe Richey joerichey@google.com [Thu, 23 Aug 2018 17:50:17 +0000 (10:50 -0700)]
Fix Travis to only use Go 1.10

7 years agoMerge pull request #102 from google/mips
Joseph Richey [Wed, 22 Aug 2018 12:45:42 +0000 (05:45 -0700)]
Merge pull request #102 from google/mips

Use proper sizes when casting to Go slice

7 years agoUse proper sizes when casting to Go slice
Joe Richey joerichey@google.com [Wed, 22 Aug 2018 06:53:34 +0000 (23:53 -0700)]
Use proper sizes when casting to Go slice

Addresses most of the issues in #101.

The following commands now succeed:
    GOARCH=mips go build github.com/google/fscrypt/util
    GOARCH=mipsle go build github.com/google/fscrypt/util

7 years agoMerge pull request #97 from ebiggers/privileges_fix
Joseph Richey [Thu, 19 Apr 2018 18:14:12 +0000 (11:14 -0700)]
Merge pull request #97 from ebiggers/privileges_fix

security: drop and regain privileges in all threads

7 years agoMerge pull request #96 from ebiggers/unset_item_fix
Joseph Richey [Thu, 19 Apr 2018 18:11:33 +0000 (11:11 -0700)]
Merge pull request #96 from ebiggers/unset_item_fix

pam: return error when PAM info item is unset

7 years agosecurity: drop and regain privileges in all threads
Eric Biggers [Sun, 25 Mar 2018 17:13:26 +0000 (10:13 -0700)]
security: drop and regain privileges in all threads

After enabling pam_fscrypt for "session" and creating a directory
protected with a login protector, I was no longer able to log in as that
user.  The problem is that the Go runtime is creating threads after
pam_fscrypt drops privileges, but pam_fscrypt is not re-acquiring
privileges on those threads because the Go wrappers for setreuid(),
setregid(), and setgroups() in the "sys/unix" package are using the raw
syscalls which operate on the calling thread only.

This violates glibc's assumption that all threads have the same uids and
gids, causing it to abort() the process when a later module in the PAM
stack (pam_mail in my case) tries to drop privileges using the glibc
functions.

Fix it by dropping and regaining privileges using the glibc functions
rather than the "sys/unix" functions.

This also avoids any possibility that privileges could be changed in a
thread other than the "main" one for pam_fscrypt, since the Go runtime
does not guarantee which OS-level thread runs what.

It would be nice to also exit all Go worker threads before returning
from pam_fscrypt, but the Go runtime doesn't seem to support that.

7 years agopam: return error when PAM info item is unset
Eric Biggers [Sun, 25 Mar 2018 06:21:29 +0000 (23:21 -0700)]
pam: return error when PAM info item is unset

pam_fscrypt is crashing with a segfault in copyIntoSecret() when using
Ctrl-C to interrupt a 'sudo' prompt.  It is dereferencing a NULL pointer
that is supposed point to the PAM_AUTHTOK item.  The problem is that the
Go code assumes pam_get_item() returns a non-success status if the item
is unset, when actually it sets the data pointer to NULL and returns
PAM_SUCCESS.

Fix it by making pam.Handle.GetItem() return an error in that case.

7 years agoClarify how to run integration tests
Joseph Richey [Fri, 16 Mar 2018 08:55:04 +0000 (01:55 -0700)]
Clarify how to run integration tests

Also clarifies some other minor points.

7 years agoMakefile: arch command is not portable
Joseph Richey [Wed, 14 Feb 2018 19:20:44 +0000 (11:20 -0800)]
Makefile: arch command is not portable

According to:
https://www.gnu.org/software/coreutils/manual/html_node/arch-invocation.html
the arch command isn't portable, so we switch to uname.

7 years agoMakefile: Go/Protoc don't support arm64 big endian
Joseph Richey [Wed, 14 Feb 2018 03:15:13 +0000 (19:15 -0800)]
Makefile: Go/Protoc don't support arm64 big endian

Protoc: https://github.com/google/protobuf/blob/a711e3d5b4ee1dd7f9d21197dca8432a5819a64e/protoc-artifacts/build-protoc.sh#L82-L83
Go: https://github.com/golang/sys/blob/37707fdb30a5b38865cfb95e5aab41707daec7fd/unix/linux/mkall.go#L43-L79

7 years agoMakefile: Fix archetecture detection
Joseph Richey [Tue, 13 Feb 2018 12:48:14 +0000 (04:48 -0800)]
Makefile: Fix archetecture detection

Using "arch" instead of "go env GOARCH" is more standard and doesn't
generate a warning on "sudo make install".

7 years agoMerge pull request #91 from google/version
Joseph Richey [Mon, 12 Feb 2018 10:10:54 +0000 (02:10 -0800)]
Merge pull request #91 from google/version

Release: v0.2.3

7 years agoRelease: v0.2.3
Joseph Richey [Mon, 12 Feb 2018 10:05:41 +0000 (02:05 -0800)]
Release: v0.2.3

7 years agoMerge pull request #90 from google/travis
Joseph Richey [Mon, 12 Feb 2018 09:54:55 +0000 (01:54 -0800)]
Merge pull request #90 from google/travis

travis: Fix travis bug

7 years agotravis: Fix travis bug
Joseph Richey [Mon, 12 Feb 2018 09:54:14 +0000 (01:54 -0800)]
travis: Fix travis bug

7 years agoMerge pull request #89 from google/proto
Joseph Richey [Mon, 12 Feb 2018 09:34:43 +0000 (01:34 -0800)]
Merge pull request #89 from google/proto

Makefile: bump protoc to most recent version

7 years agometadata: regenerate .pb.go
Joseph Richey [Mon, 12 Feb 2018 09:31:18 +0000 (01:31 -0800)]
metadata: regenerate .pb.go

7 years agoMakefile: bump protoc to most recent version
Joseph Richey [Mon, 12 Feb 2018 09:26:58 +0000 (01:26 -0800)]
Makefile: bump protoc to most recent version

7 years agoMerge pull request #88 from google/key
Joseph Richey [Mon, 12 Feb 2018 08:54:05 +0000 (00:54 -0800)]
Merge pull request #88 from google/key

travis: Upload encrypted API key

7 years agotravis: Upload encrypted API key
Joseph Richey [Mon, 12 Feb 2018 08:47:20 +0000 (00:47 -0800)]
travis: Upload encrypted API key

7 years agoMerge pull request #87 from google/cleanup
Joseph Richey [Mon, 12 Feb 2018 08:06:37 +0000 (00:06 -0800)]
Merge pull request #87 from google/cleanup

Minor fixes and cleanup

7 years agovet: eliminate unnecessary shadowing
Joseph Richey [Mon, 12 Feb 2018 07:56:49 +0000 (23:56 -0800)]
vet: eliminate unnecessary shadowing

Running "go vet -shadow ./..." finds all places where a variable might
be incorrectly or unnecessarily shadowed. This fixes some of them.

7 years agocmd/fscrypt: don't show build time if not set
Joseph Richey [Mon, 12 Feb 2018 07:38:19 +0000 (23:38 -0800)]
cmd/fscrypt: don't show build time if not set

7 years agoMerge pull request #86 from google/docs
Joseph Richey [Mon, 12 Feb 2018 07:30:33 +0000 (23:30 -0800)]
Merge pull request #86 from google/docs

docs: Update CONTRIBUTING.md and README.md

7 years agodocs: Update CONTRIBUTING.md and README.md
Joseph Richey [Mon, 12 Feb 2018 07:11:11 +0000 (23:11 -0800)]
docs: Update CONTRIBUTING.md and README.md

PR #85 failed to update the documentation. This is now fixed with some
additional cleanup.

7 years agoMerge pull request #85 from google/depfix
Joseph Richey [Mon, 12 Feb 2018 05:43:56 +0000 (21:43 -0800)]
Merge pull request #85 from google/depfix

Complete the new Build System

7 years agotravis: use multiple build stages
Joseph Richey [Mon, 12 Feb 2018 05:22:53 +0000 (21:22 -0800)]
travis: use multiple build stages

This change rewrites .travis.yml to use many build stages/jobs. This
allows our build to run faster, as almost all jobs run in containers.

Stage 1: Run on all pushes to all branches
  - Job Build: just runs "make" to make sure everything is OK

Stage 2: Run on all PRs and pushes to master
  - Job Lint: Makes sure dep, "make gen", "make format", and "make lint"
              are all happy.
  - Job Build 1: Make sure "go get" and "make" will work. This job will
                 later run unit tests.
  - Job Build 2: Same as Job Build 1, except with another go version.
  - Job Integeration: Run integration tests (needs sudo, so needs VM)

Stage 3: Run on releases (if other stages pass)
  - Job Deploy: Publishes amd64 binaries to GitHub.

7 years agoMakefile: completly rewrite
Joseph Richey [Mon, 12 Feb 2018 05:06:32 +0000 (21:06 -0800)]
Makefile: completly rewrite

This change is a complete rewrite of fscrypt's Makefile.

The new build rules can be roughly divided into secions:
  Build   - bin/fscrypt and bin/pam_fscrypt
  Linting - gen (for .proto files), format, lint
  Test    - test, test-{setup|teardown}, coverage.out
  Install - install, uninstall, install-{bin|pam}
  Tools   - tools and other bin/* needed for the other rules

As before, "make" builds the binary and pam_module, while "make all"
builds and tests everything (except for integration tests), and "make
clean" removes any generated files.

Also note that this new build system:
  - Doesn't require input_fail.py
  - Properly falis on linter errors
  - Builds everything into the bin/ directory (customizable)
  - Builds all the vendored tools

7 years agogolint: Use fork that respects vendor directory
Joseph Richey [Mon, 12 Feb 2018 04:39:12 +0000 (20:39 -0800)]
golint: Use fork that respects vendor directory

Ideally, we would just use "golint ./..." to check all our our source
files for lint error. However, this does not work because it will
include all packages in the vendor directory. The pull request at:
https://github.com/golang/lint/pull/325
fixes this issue, so we will use it until the PR has been merged.

7 years agovendor: include source for tools
Joseph Richey [Mon, 12 Feb 2018 04:34:07 +0000 (20:34 -0800)]
vendor: include source for tools

This change vendors the source for all our build, formatting, and
linting tools. Generated by running "dep ensure".

7 years agodep: require tools to be vendored
Joseph Richey [Mon, 12 Feb 2018 04:31:27 +0000 (20:31 -0800)]
dep: require tools to be vendored

This change ot Gopkg.toml will make it easier to build the linting and
formatting tools. Vendoring their source also makes sure that updates to
these tools do not break the build.

7 years agovendor: update vendored dependancies
Joseph Richey [Mon, 12 Feb 2018 04:28:41 +0000 (20:28 -0800)]
vendor: update vendored dependancies

This change updates dependancies to be consistent with Gopkg.toml.
This change was generated by running "dep ensure".

7 years agodep: add dependancies to Gopkg.toml
Joseph Richey [Mon, 12 Feb 2018 04:24:21 +0000 (20:24 -0800)]
dep: add dependancies to Gopkg.toml

fscrypt directly depends on 5 repositories (8 packages). This change
adds those dependancies to Gopkg.toml, so that they can be properly
versioned. Note that the golang.org/x repositories do not use semver.

7 years agotest: all packages should have tests
Joseph Richey [Mon, 12 Feb 2018 04:19:36 +0000 (20:19 -0800)]
test: all packages should have tests

The tests added in this change are trivial, but they make sure that
every package has a non-zero number of tests. This is important for
eventually increasing test coverage.

7 years agolint: Remove all build tags
Joseph Richey [Mon, 12 Feb 2018 04:13:01 +0000 (20:13 -0800)]
lint: Remove all build tags

Our current build tags set off the linter. We will later add in more
comprehensive build tags that will be properly formatted.

7 years agoMerge pull request #84 from google/argon2
Joseph Richey [Fri, 9 Feb 2018 12:01:32 +0000 (04:01 -0800)]
Merge pull request #84 from google/argon2

Move to x/crypto/argon2

7 years agodep: Run dep ensure
Joseph Richey [Fri, 9 Feb 2018 11:17:23 +0000 (03:17 -0800)]
dep: Run dep ensure

7 years agodocs/travis: Remove mention of Argon2
Joseph Richey [Fri, 9 Feb 2018 09:51:44 +0000 (01:51 -0800)]
docs/travis: Remove mention of Argon2

Now that Argon2 is simply and implementation detail of the `crypto`
package, and no a build dependancy, we don't need it in Travis or in the
documenation for building fscrypt.

7 years agocrypto: Move from libargon2 -> x/crypto/argon2
Joseph Richey [Thu, 8 Feb 2018 10:37:42 +0000 (02:37 -0800)]
crypto: Move from libargon2 -> x/crypto/argon2

Use the golang library for the hashing function instead of the reference
C implementation. This removes the dependancy on libargon2. As we are no
longer doing our own error checking, we also eliminate those tests.

7 years agoMerge pull request #83 from google/dep
Joseph Richey [Thu, 8 Feb 2018 10:01:29 +0000 (02:01 -0800)]
Merge pull request #83 from google/dep

Start using Dep

7 years agodep: Update Travis to use dep
Joseph Richey [Thu, 8 Feb 2018 09:44:09 +0000 (01:44 -0800)]
dep: Update Travis to use dep

Add dep instalation, remove govendor from go tools, and add a check for
dependancies.

7 years agodep: Setup Gopkg.toml
Joseph Richey [Thu, 8 Feb 2018 09:08:10 +0000 (01:08 -0800)]
dep: Setup Gopkg.toml

This change transitions to dep, sets up Gopkg.toml, and purnes the
maximum allowable number of files.

7 years agoChange Golang formatter
Joseph Richey [Sat, 3 Feb 2018 00:03:30 +0000 (16:03 -0800)]
Change Golang formatter

Moves from goimports to [goreturns](https://github.com/sqs/goreturns).
This should not effect any code that already compiles as goreturns only
adds zero return values, then runs goimports.

This is mainly to help improve ergonomics when dealing with multiple
return types.

7 years agoRemove unnecessary gitignore rule
Joseph Richey [Fri, 2 Feb 2018 23:59:50 +0000 (15:59 -0800)]
Remove unnecessary gitignore rule

7 years agoMerge pull request #75 from ilius/PR-README-typo
Joseph Richey [Fri, 12 Jan 2018 19:45:53 +0000 (11:45 -0800)]
Merge pull request #75 from ilius/PR-README-typo

Fix typo in README.md

7 years agofix typo in README.md: $GOPATH/github.com -> $GOPATH/src/github.com
Saeed Rasooli [Fri, 12 Jan 2018 09:09:55 +0000 (17:09 +0800)]
fix typo in README.md: $GOPATH/github.com -> $GOPATH/src/github.com

7 years agoMerge pull request #74 from google/maxMemory
Joseph Richey [Thu, 11 Jan 2018 21:33:14 +0000 (13:33 -0800)]
Merge pull request #74 from google/maxMemory

Limit the amount of RAM that will be used

7 years agoFormat files correctly
Joe Richey joerichey@google.com [Thu, 11 Jan 2018 04:37:25 +0000 (20:37 -0800)]
Format files correctly

7 years agoLimit the amount of RAM that will be used
Joe Richey joerichey@google.com [Thu, 11 Jan 2018 04:24:15 +0000 (20:24 -0800)]
Limit the amount of RAM that will be used

Fixes #73.

Adds maxMemoryBytes as 128MiB and cleans up the helper
functions/variables to make it more clear which values are a number of
bytes, and which values are a number of KiB.

7 years agoMerge pull request #70 from kant/patch-1
Joseph Richey [Thu, 5 Oct 2017 06:04:48 +0000 (23:04 -0700)]
Merge pull request #70 from kant/patch-1

Typos

7 years agoTypos
Darío Hereñú [Thu, 5 Oct 2017 04:31:29 +0000 (01:31 -0300)]
Typos

7 years agoMerge pull request #69 from google/makefile
Joseph Richey [Tue, 3 Oct 2017 22:33:23 +0000 (15:33 -0700)]
Merge pull request #69 from google/makefile

Makefile cleanup

7 years agoMakefile: Updated scripts to run tests in travis
Joseph Richey [Tue, 3 Oct 2017 22:19:42 +0000 (15:19 -0700)]
Makefile: Updated scripts to run tests in travis

7 years agoMerge pull request #68 from dvrkps/patch-1
Joseph Richey [Tue, 3 Oct 2017 12:55:15 +0000 (05:55 -0700)]
Merge pull request #68 from dvrkps/patch-1

travis: update go version

7 years agotravis: update go version
Davor Kapsa [Tue, 3 Oct 2017 06:34:53 +0000 (08:34 +0200)]
travis: update go version

7 years agoMerge pull request #67 from google/sync
Joseph Richey [Mon, 2 Oct 2017 23:56:27 +0000 (16:56 -0700)]
Merge pull request #67 from google/sync

security: Sync filesystem before dropping caches

7 years agosecurity: Sync filesystem before dropping caches
Joe Richey joerichey@google.com [Mon, 2 Oct 2017 23:49:16 +0000 (16:49 -0700)]
security: Sync filesystem before dropping caches

7 years agoMerge pull request #64 from google/new_values
Joseph Richey [Fri, 29 Sep 2017 10:16:43 +0000 (03:16 -0700)]
Merge pull request #64 from google/new_values

Update all external dependencies to the latest version

7 years agoMerge pull request #65 from google/session_keyring
Joseph Richey [Fri, 29 Sep 2017 10:13:57 +0000 (03:13 -0700)]
Merge pull request #65 from google/session_keyring

security: Add check option to UserKeyringID

7 years agovendor: Just add windows to make govendor work
Joseph Richey [Fri, 29 Sep 2017 10:13:20 +0000 (03:13 -0700)]
vendor: Just add windows to make govendor work

7 years agoFix lint
Joseph Richey [Fri, 29 Sep 2017 10:06:17 +0000 (03:06 -0700)]
Fix lint

7 years agosecurity: Add check option to UserKeyringID
Joseph Richey [Fri, 29 Sep 2017 09:52:56 +0000 (02:52 -0700)]
security: Add check option to UserKeyringID

7 years agometadata: Add new encryption modes
Joseph Richey [Fri, 29 Sep 2017 09:43:14 +0000 (02:43 -0700)]
metadata: Add new encryption modes

7 years agoMakefile: Don't update dependancies w/ "make all"
Joseph Richey [Fri, 29 Sep 2017 09:39:01 +0000 (02:39 -0700)]
Makefile: Don't update dependancies w/ "make all"

7 years agovendor: Update to latest versions
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.

8 years agoFixes logging string for policies
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.

8 years agoMerge pull request #56 from google/panics
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

8 years agocmd/fscrypt: Add explanations for keyring failures
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.

8 years agocmd/fscrypt: Check that keyrings are setup
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.

8 years agosecurity: Change user keyring lookup algorithm
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.

8 years agosecurity: No more permenant privilege dropping
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().

8 years agopam_fscrypt: PAM module no longer crashes on panic
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.

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