From e903a34b2ecf6bca515dbe57274f4186d7f3955e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 11 Nov 2001 11:00:38 +0000 Subject: Minor updates. A small dose of const. (This used to be commit 80667cb0dd1a2cdef17711c8580af9f524971cea) --- source3/auth/auth.c | 2 +- source3/auth/auth_util.c | 2 +- source3/libsmb/smbencrypt.c | 2 +- source3/passdb/passdb.c | 2 +- source3/smbd/auth.c | 2 +- source3/smbd/auth_util.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source3/auth/auth.c b/source3/auth/auth.c index 67f80afdda..95c97182b8 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -36,7 +36,7 @@ static BOOL check_domain_match(char *user, char *domain) */ 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 { diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index d442f73a93..3f03097de4 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -426,7 +426,7 @@ BOOL make_user_info_winbind(auth_usersupplied_info **user_info, /* 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)); diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index c1c4750e05..2e27455362 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -167,7 +167,7 @@ void NTLMSSPOWFencrypt(const uchar passwd[8], const uchar *ntlmchalresp, uchar p /* 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]; diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 971e9c5faf..823feadea7 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -117,7 +117,7 @@ BOOL pdb_init_sam(SAM_ACCOUNT **user) 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; diff --git a/source3/smbd/auth.c b/source3/smbd/auth.c index 67f80afdda..95c97182b8 100644 --- a/source3/smbd/auth.c +++ b/source3/smbd/auth.c @@ -36,7 +36,7 @@ static BOOL check_domain_match(char *user, char *domain) */ 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 { diff --git a/source3/smbd/auth_util.c b/source3/smbd/auth_util.c index d442f73a93..3f03097de4 100644 --- a/source3/smbd/auth_util.c +++ b/source3/smbd/auth_util.c @@ -426,7 +426,7 @@ BOOL make_user_info_winbind(auth_usersupplied_info **user_info, /* 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)); -- cgit