From d4160e07cfc1942844160fdb8e6c9525da0bd2c8 Mon Sep 17 00:00:00 2001 From: "Joe Richey joerichey@google.com" Date: Wed, 31 May 2017 12:49:06 -0700 Subject: pam: checking a user's login passphrase 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 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 22da24a..ab5cad0 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ CMD_DIR = $(NAME)/cmd/$(NAME) # The code below lets the caller of the makefile change the build flags for # fscrypt in a familiar manner. For example, to force the program to statically # link its C components, run "make fscrypt" with: -# make fscrypt "LDFLAGS += -static" +# make fscrypt "LDFLAGS += -static -luuid -ldl -laudit -lpthread" # # Similarly, to modify the flags passed to the C components, just modify CFLAGS # or LDFLAGS as you would with a C program. To modify the Go flags, either @@ -59,7 +59,7 @@ $(NAME): go: govendor generate +local govendor build $(GOFLAGS) +local - govendor test $(GOFLAGS) +local + govendor test $(GOFLAGS) -p 1 +local update: @govendor fetch +missing -- cgit v1.2.3