diff options
| author | Joseph Richey <joerichey@google.com> | 2017-08-31 14:51:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-31 14:51:55 -0700 |
| commit | b04d7ef31dc2e21f055b1b656efb9511e72db6c6 (patch) | |
| tree | 04daee42d94ddda55d956e72f44bafec0ef6dde1 /cmd/fscrypt/setup.go | |
| parent | 5285a8c451ef660f932e9f1823ad7da52ad25b74 (diff) | |
| parent | f1bd511fff8e411687001bd8e76e8a41c9f5ff41 (diff) | |
Merge pull request #52 from google/keyrings
Changes to the keyrings interface, corresponding UI changes, and misc changes
Diffstat (limited to 'cmd/fscrypt/setup.go')
| -rw-r--r-- | cmd/fscrypt/setup.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/fscrypt/setup.go b/cmd/fscrypt/setup.go index 6433b0c..72dfbdb 100644 --- a/cmd/fscrypt/setup.go +++ b/cmd/fscrypt/setup.go @@ -26,11 +26,12 @@ import ( "os" "github.com/google/fscrypt/actions" + "github.com/google/fscrypt/util" ) // createGlobalConfig creates (or overwrites) the global config file func createGlobalConfig(w io.Writer, path string) error { - if os.Getuid() != 0 { + if !util.IsUserRoot() { return ErrMustBeRoot } @@ -61,7 +62,7 @@ func createGlobalConfig(w io.Writer, path string) error { // setupFilesystem creates the directories for a filesystem to use fscrypt. func setupFilesystem(w io.Writer, path string) error { - ctx, err := actions.NewContextFromMountpoint(path) + ctx, err := actions.NewContextFromMountpoint(path, nil) if err != nil { return err } |