summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-08-16 17:14:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:39 -0500
commitb29915d6113264bdce243005d29a1af9a8b69bde (patch)
tree4eabcbaac1b16408df187f84a05da81a879dc803 /source3/auth
parent0be131725ff90e48d4f9696b80b35b740575fb2c (diff)
downloadsamba-b29915d6113264bdce243005d29a1af9a8b69bde.tar.gz
samba-b29915d6113264bdce243005d29a1af9a8b69bde.tar.bz2
samba-b29915d6113264bdce243005d29a1af9a8b69bde.zip
r17571: Change the return code of cli_session_setup from BOOL to NTSTATUS
Volker (This used to be commit 94817a8ef53589011bc4ead4e17807a101acf5c9)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_server.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 6e4dba0be2..7ffea1ca11 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -120,8 +120,8 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
this one...
*/
- if (!cli_session_setup(cli, "", "", 0, "", 0,
- "")) {
+ if (!NT_STATUS_IS_OK(cli_session_setup(cli, "", "", 0, "", 0,
+ ""))) {
DEBUG(0,("%s rejected the initial session setup (%s)\n",
desthost, cli_errstr(cli)));
release_server_mutex();
@@ -241,7 +241,7 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context
return nt_status;
}
- cli = my_private_data;
+ cli = (struct cli_state *)my_private_data;
if (cli) {
} else {
@@ -296,8 +296,12 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context
*/
if ((!tested_password_server) && (lp_paranoid_server_security())) {
- if (cli_session_setup(cli, baduser, (char *)badpass, sizeof(badpass),
- (char *)badpass, sizeof(badpass), user_info->domain)) {
+ if (NT_STATUS_IS_OK(cli_session_setup(cli, baduser,
+ (char *)badpass,
+ sizeof(badpass),
+ (char *)badpass,
+ sizeof(badpass),
+ user_info->domain))) {
/*
* We connected to the password server so we
@@ -343,30 +347,25 @@ use this machine as the password server.\n"));
if (!user_info->encrypted) {
/* Plaintext available */
- if (!cli_session_setup(cli, user_info->smb_name,
- (char *)user_info->plaintext_password.data,
- user_info->plaintext_password.length,
- NULL, 0,
- user_info->domain)) {
- DEBUG(1,("password server %s rejected the password\n", cli->desthost));
- /* Make this cli_nt_error() when the conversion is in */
- nt_status = cli_nt_error(cli);
- } else {
- nt_status = NT_STATUS_OK;
- }
+ nt_status = cli_session_setup(
+ cli, user_info->smb_name,
+ (char *)user_info->plaintext_password.data,
+ user_info->plaintext_password.length,
+ NULL, 0, user_info->domain);
+
} else {
- if (!cli_session_setup(cli, user_info->smb_name,
- (char *)user_info->lm_resp.data,
- user_info->lm_resp.length,
- (char *)user_info->nt_resp.data,
- user_info->nt_resp.length,
- user_info->domain)) {
- DEBUG(1,("password server %s rejected the password\n", cli->desthost));
- /* Make this cli_nt_error() when the conversion is in */
- nt_status = cli_nt_error(cli);
- } else {
- nt_status = NT_STATUS_OK;
- }
+ nt_status = cli_session_setup(
+ cli, user_info->smb_name,
+ (char *)user_info->lm_resp.data,
+ user_info->lm_resp.length,
+ (char *)user_info->nt_resp.data,
+ user_info->nt_resp.length,
+ user_info->domain);
+ }
+
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ DEBUG(1,("password server %s rejected the password: %s\n",
+ cli->desthost, nt_errstr(nt_status)));
}
/* if logged in as guest then reject */