aboutsummaryrefslogtreecommitdiff
path: root/pam
diff options
context:
space:
mode:
authorebiggers <ebiggers@google.com>2019-09-08 19:46:59 -0700
committerJoseph Richey <joerichey@google.com>2019-09-08 19:46:59 -0700
commit6445dad7d66fa6a1867090fcd9602c98863649f6 (patch)
treec0e5209f018a50ee8b0a1277cc7b06266eff18c1 /pam
parent28b29d1c97ffd97671186b5e1fae37b64424f9ee (diff)
Fix various typos and grammatical errors (#141)
These were found by a combination of manual review and a custom script that checks for common errors. Also removed an outdated sentence from the comment for setupBefore().
Diffstat (limited to 'pam')
-rw-r--r--pam/constants.go2
-rw-r--r--pam/login.go6
-rw-r--r--pam/pam.c2
-rw-r--r--pam/pam.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/pam/constants.go b/pam/constants.go
index 5c57e06..d2d0cf3 100644
--- a/pam/constants.go
+++ b/pam/constants.go
@@ -52,7 +52,7 @@ package pam
*/
import "C"
-// Item is a an PAM information type.
+// Item is a PAM information type.
type Item int
// PAM Item types.
diff --git a/pam/login.go b/pam/login.go
index 346edd4..527b10d 100644
--- a/pam/login.go
+++ b/pam/login.go
@@ -48,9 +48,9 @@ var (
tokenToCheck *crypto.Key
)
-// userInput is run when the the callback needs some input from the user. We
-// prompt the user for information and return their answer. A return value of
-// nil indicates an error occurred.
+// userInput is run when the callback needs some input from the user. We prompt
+// the user for information and return their answer. A return value of nil
+// indicates an error occurred.
//export userInput
func userInput(prompt *C.char) *C.char {
fmt.Print(C.GoString(prompt))
diff --git a/pam/pam.c b/pam/pam.c
index bb16427..1859a2f 100644
--- a/pam/pam.c
+++ b/pam/pam.c
@@ -101,7 +101,7 @@ void* copyIntoSecret(void* data) {
void freeSecret(pam_handle_t* pamh, char* data, int error_status) {
size_t size = strlen(data) + 1; // Include null terminator
- // Use volitile function pointer to actually clear the memory.
+ // Use volatile function pointer to actually clear the memory.
static void* (*const volatile memset_sec)(void*, int, size_t) = &memset;
memset_sec(data, 0, size);
munlock(data, size);
diff --git a/pam/pam.h b/pam/pam.h
index 09afb2e..7571da8 100644
--- a/pam/pam.h
+++ b/pam/pam.h
@@ -35,7 +35,7 @@ void freeData(pam_handle_t *pamh, void *data, int error_status);
// then frees the array itself.
void freeArray(pam_handle_t *pamh, void **array, int error_status);
-// Creates a copy of a C string, which resides in an locked buffer.
+// Creates a copy of a C string, which resides in a locked buffer.
void *copyIntoSecret(void *data);
// CleaupFunc that Zeros wipes a C string and unlocks and frees its memory.