diff options
| author | Joseph Richey <joerichey94@gmail.com> | 2017-08-23 23:46:54 -0700 |
|---|---|---|
| committer | Joseph Richey <joerichey94@gmail.com> | 2017-08-23 23:46:54 -0700 |
| commit | 7fbff9a4d531e33f3d7c7e0b9871c2e19a55bace (patch) | |
| tree | d96e2481a71fb697785d4ea8329ad018fead5972 /security/keyring.go | |
| parent | d617d7725ce8b91df2152d6539da10c401c59325 (diff) | |
security: fscrypt now possesses the user keyring
Diffstat (limited to 'security/keyring.go')
| -rw-r--r-- | security/keyring.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/security/keyring.go b/security/keyring.go index 28225b0..ef56364 100644 --- a/security/keyring.go +++ b/security/keyring.go @@ -141,6 +141,13 @@ func getUserKeyringID() (int, error) { } keyringID := int(parsedID) + // For some stupid reason, a thread does not automaticaly "possess" keys + // in the user keyring. So we link it into the process keyring so that + // we will not get "permission denied" when purging or modifying keys. + if err := keyringLink(keyringID, unix.KEY_SPEC_PROCESS_KEYRING); err != nil { + return 0, err + } + keyringIDCache[euid] = keyringID return keyringID, nil } |