Skip to content

Commit

Permalink
fixed issue with not passing username when set and password not set i…
Browse files Browse the repository at this point in the history
…n sspi.
  • Loading branch information
craiggwilson committed May 5, 2017
1 parent 484733c commit fc38427
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/auth/gssapi/sspi.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ func (sc *SaslClient) Start() (string, []byte, error) {

var cusername *C.char
var cpassword *C.char
if sc.passwordSet {
if sc.username != "" {
cusername = C.CString(sc.username)
defer C.free(unsafe.Pointer(cusername))
cpassword = C.CString(sc.password)
defer C.free(unsafe.Pointer(cpassword))
if sc.passwordSet {
cpassword = C.CString(sc.password)
defer C.free(unsafe.Pointer(cpassword))
}
}
status := C.sspi_client_init(&sc.state, cusername, cpassword)

Expand Down

0 comments on commit fc38427

Please sign in to comment.