summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Steinert <[email protected]>2015-03-27 11:05:45 -0500
committerMichael Steinert <[email protected]>2015-03-27 11:05:45 -0500
commita6dbe3c2bf85196d35238b0a6edb696963184315 (patch)
tree80ba510af648e6efbad1f4097309e5052da3731e
parent93273af664c1f77cd9ad7e7e10b915503a90c561 (diff)
Fix build on Linux
-rw-r--r--golang-pam.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/golang-pam.c b/golang-pam.c
index 58f567c..dc107f9 100644
--- a/golang-pam.c
+++ b/golang-pam.c
@@ -1,4 +1,3 @@
-#include <security/pam_types.h>
#include <security/pam_appl.h>
#include <stdlib.h>
#include <string.h>
@@ -25,7 +24,7 @@ int gopam_conv(int num_msg, const struct pam_message **msg, struct pam_response
struct pam_response *responses = (struct pam_response*)malloc(sizeof(struct pam_response) * num_msg);
memset(responses, 0, sizeof(struct pam_response) * num_msg);
- for(i = 0; i < num_msg; ++i) {
+ for(i = 1; i < num_msg; ++i) {
const struct pam_message *m = msg[i];
struct goPAMConv_return result = goPAMConv(m->msg_style, (char*)m->msg, appdata_ptr);
if(result.r1 == PAM_SUCCESS)