aboutsummaryrefslogtreecommitdiff
path: root/pam
AgeCommit message (Collapse)Author
2017-08-23pam_fscrypt: Session accounting completedJoe Richey joerichey@google.com
2017-08-23Added some documentation and improved security APIJoe Richey joerichey@google.com
2017-08-22pam_fscrypt: lock all PAM policies w/ flagJoe Richey joerichey@google.com
2017-08-22Various small nits a helper functions for PAMJoe Richey joerichey@google.com
2017-08-17cmd/fscrypt: purge command now clears cacheJoe Richey joerichey@google.com
2017-07-17Small fixes so "make lint" doesn't complain.Joe Richey joerichey@google.com
2017-07-17pam: Added missing documentation (fix "make lint")Joe Richey joerichey@google.com
2017-07-17Changes from "make format"Joe Richey joerichey@google.com
2017-07-17pam: IsUserLoginToken now uses PAM libraryJoe Richey joerichey@google.com
2017-07-17pam: Add Go wrappers around PAM functionsJoe Richey joerichey@google.com
This commit provides a Go interface to the PAM functions.
2017-07-17pam: C implementation for conversation and cleanupJoe Richey joerichey@google.com
This commit adds in a C implementation for the pam_conv we will use in login.go as well as adding three CleanupFuncs that will be used with pam_set_data(). It also adds copyInfoSecret() which should be paired with freeSecret().
2017-07-17pam: Add PAM Items and FlagsJoe Richey joerichey@google.com
Code pulled from github.com/msteinert/pam
2017-06-28Finalize import paths and documentationv0.1.00.1.0Joe Richey joerichey@google.com
This commit changes all the internal import paths from `fscrypt/foo` to `github.com/google/fscrypt/foo` so that it can be built once we release externaly. The documentation in README.md is updated accordingly. Also, the README has a note noting that we do not make any guarantees about project stability before 1.0 (when it ships with Ubuntu). Change-Id: I6ba86e442c74057c8a06ba32a42e17f94833e280
2017-06-28Change error handling to new packageJoe Richey joerichey@google.com
This commit changes the error handing for the crypto, filesystem, metadata, pam, and util packages to use the error handling library github.com/pkg/errors. This means elimination of the FSError type, an increased use of wrapping errors (as opposed to logging), switching on the Cause() of an error (as opposed to its value), and improving our integration tests involving TEST_FILESYSTEM_ROOT. This commit also fixes a few bugs with the keyring code to ensure that our {Find|Remove|Insert}PolicyKey functions are always operating on the same keyring. The check for filesystem support has been moved from the filesystem package to the metadata package. Finally, the API for the filesystem package has been slightly modified: * filesystem.AllFilesystems() now returns all the filesystems in sorted order * certain path methods are now public O_SYNC is also removed for writing the metadata. We don't get that much from syncing the metadata, as the actual file data could also be corrupted by and IO error. The sync operation is also occasionally very slow (~3 seconds) and can be unfriendly to battery life. Change-Id: I392c2655141714b16dfdbc84ac09780072be2cf0
2017-06-15pam: checking a user's login passphraseJoe Richey joerichey@google.com
This commit adds in the fscrypt/pam package. This package will hold all functionality related to Linux Pluggable Authentication Modules (PAM). Right now this package uses cgo to mock a PAM conversation, allowing the function to check if a provided passphrase actually belongs to a user. Due to the nature of cgo callbacks, global state of the key to check is necessary for this function. This commit also addresses some issues about building the cgo components. Now, only the minimal linking flags are included in the go files. Additional linker flags may now be necessary to build a static binary of fscrypt. This is addressed in the Makefile and README. Finally, this commit fixes a bug where the tests would not run correctly due to shared global state on the testing filesystem. Fixed, by having all the tests run sequentially. Change-Id: Ia43636801da984b505d2f43dd14127b7cfbf2c48