diff --git a/vendor/github.com/msteinert/pam/transaction.c b/vendor/github.com/msteinert/pam/transaction.c index 4ff649b18..7808d4237 100644 --- a/vendor/github.com/msteinert/pam/transaction.c +++ b/vendor/github.com/msteinert/pam/transaction.c @@ -39,13 +39,12 @@ error: return PAM_CONV_ERR; } -struct pam_conv *make_pam_conv(void *appdata_ptr) +struct pam_conv *make_pam_conv() { struct pam_conv* conv = malloc(sizeof *conv); if (!conv) { return NULL; } conv->conv = cb_pam_conv; - conv->appdata_ptr = appdata_ptr; return conv; } diff --git a/vendor/github.com/msteinert/pam/transaction.go b/vendor/github.com/msteinert/pam/transaction.go index 360d89a64..fde74ef0e 100644 --- a/vendor/github.com/msteinert/pam/transaction.go +++ b/vendor/github.com/msteinert/pam/transaction.go @@ -4,7 +4,7 @@ package pam //#include //#cgo CFLAGS: -Wall -std=c99 //#cgo LDFLAGS: -lpam -//struct pam_conv *make_pam_conv(void *); +//struct pam_conv *make_pam_conv(); import "C" import ( @@ -61,7 +61,8 @@ type conversation struct { func newConversation(handler ConversationHandler) (*conversation, C.int) { c := &conversation{} c.handler = handler - c.conv = C.make_pam_conv(unsafe.Pointer(c)) + c.conv = C.make_pam_conv() + c.conv.appdata_ptr = unsafe.Pointer(c) if c.conv == nil { return nil, C.PAM_BUF_ERR }