*/
if (!lp_allow_trusted_domains() &&
- !strequal(lp_workgroup(), domain) ) {
+ (!strequal(lp_workgroup(), domain) || strequal("", domain))) {
DEBUG(1, ("check_domain_match: Attempt to connect as user %s from domain %s denied.\n", user, domain));
return False;
} else {
/* WATCH OUT. This doesn't work if the incoming password is incorrectly cased.
We might want to add a check here and only do an LM in that case */
- SMBNTencrypt((uchar *)password, chal, local_nt_response);
+ SMBNTencrypt((const uchar *)password, chal, local_nt_response);
local_lm_blob = data_blob(local_lm_response, sizeof(local_lm_response));
local_nt_blob = data_blob(local_nt_response, sizeof(local_nt_response));
/* Does the NT MD4 hash then des encryption. */
-void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24)
+void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24)
{
uchar p21[21];
Initialises a struct sam_passwd with sane values.
************************************************************/
-BOOL pdb_init_sam_pw(SAM_ACCOUNT **new_sam_acct, struct passwd *pwd)
+BOOL pdb_init_sam_pw(SAM_ACCOUNT **new_sam_acct, const struct passwd *pwd)
{
pstring str;
extern BOOL sam_logon_in_ssb;
*/
if (!lp_allow_trusted_domains() &&
- !strequal(lp_workgroup(), domain) ) {
+ (!strequal(lp_workgroup(), domain) || strequal("", domain))) {
DEBUG(1, ("check_domain_match: Attempt to connect as user %s from domain %s denied.\n", user, domain));
return False;
} else {
/* WATCH OUT. This doesn't work if the incoming password is incorrectly cased.
We might want to add a check here and only do an LM in that case */
- SMBNTencrypt((uchar *)password, chal, local_nt_response);
+ SMBNTencrypt((const uchar *)password, chal, local_nt_response);
local_lm_blob = data_blob(local_lm_response, sizeof(local_lm_response));
local_nt_blob = data_blob(local_nt_response, sizeof(local_nt_response));