GENSEC expects NULL as no password. There are too many places which
set "" instead of NULL. We plan to pass down the cli_credentials
structure anyway so this workaround should be ok for now.
Signed-off-by: Andreas Schneider <asn@samba.org>
NTSTATUS auth_generic_set_password(struct auth_generic_state *ans,
const char *password)
{
- cli_credentials_set_password(ans->credentials, password, CRED_SPECIFIED);
+ if (password != NULL && password[0] != '\0') {
+ cli_credentials_set_password(ans->credentials, password, CRED_SPECIFIED);
+ }
return NT_STATUS_OK;
}