diff options
author | Jeremy Allison <jra@samba.org> | 2011-07-22 16:40:54 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-07-23 02:55:01 +0200 |
commit | 1832c9591099be941ef3afe7b0381c4af61f4728 (patch) | |
tree | 5bdfd83ac040aacc9a698d4644bf8c691e3572da /source3/auth | |
parent | 6d4f9fc251fabc2951356db968e72b65ebf8c027 (diff) | |
download | samba-1832c9591099be941ef3afe7b0381c4af61f4728.tar.gz samba-1832c9591099be941ef3afe7b0381c4af61f4728.tar.bz2 samba-1832c9591099be941ef3afe7b0381c4af61f4728.zip |
Fix bug 8314] - smbd crash with unknown user.
All other auth modules code with being called with
auth_method->private_data being NULL, make the auth_server
module cope with this too.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jul 23 02:55:01 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth_server.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index 3d775c2fc9..f29859945c 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -272,16 +272,23 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context const struct auth_usersupplied_info *user_info, struct auth_serversupplied_info **server_info) { - struct server_security_state *state = talloc_get_type_abort( - my_private_data, struct server_security_state); - struct cli_state *cli; + struct server_security_state *state = NULL; + struct cli_state *cli = NULL; static bool tested_password_server = False; static bool bad_password_server = False; NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED; bool locally_made_cli = False; - DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); + DEBUG(10, ("check_smbserver_security: Check auth for: [%s]\n", + user_info->mapped.account_name)); + + if (my_private_data == NULL) { + DEBUG(10,("check_smbserver_security: " + "password server is not connected\n")); + return NT_STATUS_LOGON_FAILURE; + } + state = talloc_get_type_abort(my_private_data, struct server_security_state); cli = state->cli; if (cli) { |