summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_util.c108
1 files changed, 0 insertions, 108 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 4265e77093..13dfdb59cc 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -352,114 +352,6 @@ BOOL make_user_info_netlogon_interactive(auth_usersupplied_info **user_info,
}
}
-/****************************************************************************
- Create an auth_usersupplied_data structure
-****************************************************************************/
-
-BOOL make_user_info_winbind(auth_usersupplied_info **user_info,
- const char *username,
- const char *domain,
- const char *password,
- uchar chal[8] /* Give winbind back the challenge we used */
- )
-{
- unsigned char local_lm_response[24];
- unsigned char local_nt_response[24];
- DATA_BLOB local_lm_blob;
- DATA_BLOB local_nt_blob;
- DATA_BLOB plaintext_blob;
- uint32 ntlmssp_flags = 0;
-
- /*
- * Not encrypted - do so.
- */
-
- DEBUG(5,("pass_check_smb: User passwords not in encrypted format.\n"));
-
- generate_random_buffer(chal, 8, False);
-
- if (*password) {
- SMBencrypt( (const uchar *)password, chal, local_lm_response);
-
- /* This encrypts the lm_pwd field, which actually contains
- the password rather than the nt_pwd field because that
- contains nothing */
-
- /* 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((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));
- plaintext_blob = data_blob(password, strlen(password)+1);
- if ((!local_lm_blob.data) || (!local_nt_blob.data)|| (!plaintext_blob.data)) {
- data_blob_free(&local_lm_blob);
- data_blob_free(&local_nt_blob);
- data_blob_clear_free(&plaintext_blob);
- return False;
- }
- ntlmssp_flags = NTLMSSP_NEGOTIATE_OEM | NTLMSSP_NEGOTIATE_NTLM;
- } else {
- local_lm_blob = data_blob(NULL, 0);
- local_nt_blob = data_blob(NULL, 0);
- plaintext_blob = data_blob(NULL, 0);
- }
-
- {
- BOOL ret;
-
- ret = make_user_info(user_info,
- username, username,
- domain, domain,
- global_myname,
- local_lm_blob,
- local_nt_blob,
- plaintext_blob,
- ntlmssp_flags, False);
-
- data_blob_free(&local_lm_blob);
- data_blob_free(&local_nt_blob);
- data_blob_clear_free(&plaintext_blob);
- return ret;
- }
-}
-
-/****************************************************************************
- Create an auth_usersupplied_data, making the DATA_BLOBs here.
- Decrypt and encrypt the passwords.
-****************************************************************************/
-
-BOOL make_user_info_winbind_crap(auth_usersupplied_info **user_info,
- char *smb_name,
- char *client_domain,
- uchar *lm_network_pwd, int lm_pwd_len,
- uchar *nt_network_pwd, int nt_pwd_len)
-{
- BOOL ret;
- DATA_BLOB lm_blob = data_blob(lm_network_pwd, lm_pwd_len);
- DATA_BLOB nt_blob = data_blob(nt_network_pwd, nt_pwd_len);
- DATA_BLOB plaintext_blob = data_blob(NULL, 0);
- uint32 ntlmssp_flags = 0;
-
- if (lm_pwd_len)
- ntlmssp_flags |= NTLMSSP_NEGOTIATE_OEM;
- if (nt_pwd_len)
- ntlmssp_flags |= NTLMSSP_NEGOTIATE_NTLM;
-
- ret = make_user_info(user_info,
- smb_name, smb_name,
- client_domain, client_domain,
- global_myname,
- lm_blob, nt_blob,
- plaintext_blob,
- ntlmssp_flags, True);
-
- data_blob_free(&lm_blob);
- data_blob_free(&nt_blob);
- return ret;
-}
/****************************************************************************
Create an auth_usersupplied_data structure