tenta alterar a forma como chama e muda a ordem
This commit is contained in:
parent
89738a42b3
commit
121142af03
@ -245,16 +245,17 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("DEBUG: challenge: %s\n", string(n.challengeMessage.ServerChallenge))
|
||||
log.Printf("DEBUG: ntChallengeResponse: %s\n", string(n.ntChallengeResponse))
|
||||
|
||||
// Execute ntlm_auth to check user auth
|
||||
cmd := exec.Command("ntlm_auth", "--domain="+n.userDomain, "--username="+n.user, "--challenge="+string(n.challengeMessage.ServerChallenge), "--nt-response="+string(n.ntChallengeResponse))
|
||||
cmd := exec.Command("/usr/local/bin/ntlm_auth", "--domain="+n.userDomain, "--username="+n.user, "--challenge="+string(n.challengeMessage.ServerChallenge), "--nt-response="+string(n.ntChallengeResponse))
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to execute command: %s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("DEBUG: challenge: %s\n", string(n.challengeMessage.ServerChallenge))
|
||||
log.Printf("DEBUG: ntChallengeResponse: %s\n", string(n.ntChallengeResponse))
|
||||
log.Printf("ntlm_auth Output: %s\n", output)
|
||||
|
||||
// Check user auth using LDAP
|
||||
|
Loading…
x
Reference in New Issue
Block a user