SEC_WINNT_AUTH_IDENTITY_EX domain member question
- From: nmaier@xxxxxxxxxxxxx
- Date: Fri, 19 Oct 2007 11:55:59 -0500
I have setup a struct with user/pass/domain information. And it successfully binds, but while testing I purposely entered in an incorrect domain and it still binds successfully. Was wondering why? Maybe it also searches the domain your window user is logged into at the time of the bind??? Code snippet is below, pretty straight forward. Thanks for any help!
Nate
SEC_WINNT_AUTH_IDENTITY clientCredentials;
clientCredentials.User = (unsigned char*)(_userName.gets());
clientCredentials.UserLength = _userName.size();
clientCredentials.Password = (unsigned char*)(_password.gets());
clientCredentials.PasswordLength = _password.size();
clientCredentials.Domain = (unsigned char*)(_domain.gets());
clientCredentials.DomainLength = _domain.size();
#ifdef UNICODE
clientCredentials.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
#else
clientCredentials.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI;
#endif
// Bind with user provided credentials
ldapResult = ldap_bind_s(
_pADConnection, // Session Handle
NIL, // Domain DN
(TCHAR *) &clientCredentials, // Credential structure
LDAP_AUTH_NTLM); // Auth mode
.
- Follow-Ups:
- RE: SEC_WINNT_AUTH_IDENTITY_EX domain member question
- From: "Jeffrey Tan[MSFT]"
- RE: SEC_WINNT_AUTH_IDENTITY_EX domain member question
- From: "Jeffrey Tan[MSFT]"
- RE: SEC_WINNT_AUTH_IDENTITY_EX domain member question
- From: "Jeffrey Tan[MSFT]"
- RE: SEC_WINNT_AUTH_IDENTITY_EX domain member question
- Prev by Date: Service Principal Name in Kerberos
- Next by Date: Re: How do I set security for a printer for a logged
- Previous by thread: Service Principal Name in Kerberos
- Next by thread: RE: SEC_WINNT_AUTH_IDENTITY_EX domain member question
- Index(es):