diff options
Diffstat (limited to 'security')
| -rw-r--r-- | security/cache.go | 4 | ||||
| -rw-r--r-- | security/keyring.go | 2 | ||||
| -rw-r--r-- | security/privileges.go | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/security/cache.go b/security/cache.go index fd22e15..f11248d 100644 --- a/security/cache.go +++ b/security/cache.go @@ -30,7 +30,7 @@ import ( // dentries. This has the effect of making encrypted directories whose keys are // not present no longer accessible. Requires root privileges. func DropFilesystemCache() error { - // Dirty reclaimible inodes must be synced so that they will be freed. + // Dirty reclaimable inodes must be synced so that they will be freed. log.Print("syncing changes to filesystem") unix.Sync() @@ -41,7 +41,7 @@ func DropFilesystemCache() error { return err } defer file.Close() - // "2" just frees the reclaimable inodes and dentries, the associated + // "2" just frees the reclaimable inodes and dentries. The associated // pages to these inodes will be freed. We do not need to free the // entire pagecache (as this will severely impact performance). _, err = file.WriteString("2") diff --git a/security/keyring.go b/security/keyring.go index 69ed38b..7c78c90 100644 --- a/security/keyring.go +++ b/security/keyring.go @@ -1,5 +1,5 @@ /* - * privileges.go - Handles inserting/removing into user keyrings. + * keyring.go - Handles inserting/removing into user keyrings. * * Copyright 2017 Google Inc. * Author: Joe Richey (joerichey@google.com) diff --git a/security/privileges.go b/security/privileges.go index 649bc30..3a1ca81 100644 --- a/security/privileges.go +++ b/security/privileges.go @@ -60,7 +60,7 @@ import ( "github.com/google/fscrypt/util" ) -// Privileges encapulate the effective uid/gid and groups of a process. +// Privileges encapsulate the effective uid/gid and groups of a process. type Privileges struct { euid C.uid_t egid C.gid_t @@ -144,9 +144,9 @@ func SetProcessPrivileges(privs *Privileges) error { func setUids(ruid, euid, suid int) error { log.Printf("Setting ruid=%d euid=%d suid=%d", ruid, euid, suid) - // We elevate the all the privs before setting them. This prevents - // issues with (ruid=1000,euid=1000,suid=0), where just a single call - // to setresuid might fail with permission denied. + // We elevate all the privs before setting them. This prevents issues + // with (ruid=1000,euid=1000,suid=0), where just a single call to + // setresuid might fail with permission denied. if res, err := C.setresuid(0, 0, 0); res < 0 { return errors.Wrapf(err.(syscall.Errno), "setting uids") } |