aboutsummaryrefslogtreecommitdiff
path: root/util/users.go
AgeCommit message (Collapse)Author
2017-10-19util: Add CheckIfRootJoseph Richey
Replace IsUserRoot with CheckIfRoot. This allows all functions to use the same error handling when a user is not root.
2017-10-19util: Add better user lookup functionsJoseph Richey
When looking up users in fscrypt, we often want to proceed even if the requested uid doesn't appear to be a valid user on the system. This mainly occurs when a user is deleted, but they still have a login protector on disk. Thus, GetUser() with a bad uid creates a fake user with a pretty placeholder name. The corresponding call sites of util.EffectiveUser are changed (often simplifying logic). Various documentation is updated and typos are fixed.