summaryrefslogtreecommitdiff
path: root/source4/auth/auth_anonymous.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-07-04 02:36:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:09 -0500
commitdbd2688c9042faaa44f4d89068a8351523233875 (patch)
tree31cc633ae8f0f6a2437b3f726455548d9a6a051e /source4/auth/auth_anonymous.c
parent06348629b921adb6262e0f3d9a9c244568e2a78f (diff)
downloadsamba-dbd2688c9042faaa44f4d89068a8351523233875.tar.gz
samba-dbd2688c9042faaa44f4d89068a8351523233875.tar.bz2
samba-dbd2688c9042faaa44f4d89068a8351523233875.zip
r8110: More PAC work. I still can't get WinXP to accept the PAC, but we are
much closer. This changes PIDL to allow a subcontext to have a pad8 flag, saying to pad behind to an 8 byte boundary. This is the only way I can explain the 4 trainling zeros in the signature struct. Far more importantly, the PAC code is now under self-test, both in creating/parsing our own PAC, but also a PAC from my win2k3 server. This required changing auth_anonymous, because I wanted to reuse the anonymous 'server_info' generation code. I'm still having trouble with PIDL, particulary as surrounds value(), but I'll follow up on the list. Andrew Bartlett (This used to be commit 50a54bf4e9bf04d2a8e0aebb3482a2ff655c8bbb)
Diffstat (limited to 'source4/auth/auth_anonymous.c')
-rw-r--r--source4/auth/auth_anonymous.c65
1 files changed, 1 insertions, 64 deletions
diff --git a/source4/auth/auth_anonymous.c b/source4/auth/auth_anonymous.c
index 4e78e77cc3..4325550413 100644
--- a/source4/auth/auth_anonymous.c
+++ b/source4/auth/auth_anonymous.c
@@ -37,74 +37,11 @@ static NTSTATUS anonymous_check_password(struct auth_method_context *ctx,
const struct auth_usersupplied_info *user_info,
struct auth_serversupplied_info **_server_info)
{
- struct auth_serversupplied_info *server_info;
-
if (user_info->account_name && *user_info->account_name) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- server_info = talloc(mem_ctx, struct auth_serversupplied_info);
- NT_STATUS_HAVE_NO_MEMORY(server_info);
-
- server_info->account_sid = dom_sid_parse_talloc(server_info, SID_NT_ANONYMOUS);
- NT_STATUS_HAVE_NO_MEMORY(server_info->account_sid);
-
- /* is this correct? */
- server_info->primary_group_sid = dom_sid_parse_talloc(server_info, SID_BUILTIN_GUESTS);
- NT_STATUS_HAVE_NO_MEMORY(server_info->primary_group_sid);
-
- server_info->n_domain_groups = 0;
- server_info->domain_groups = NULL;
-
- /* annoying, but the Anonymous really does have a session key,
- and it is all zeros! */
- server_info->user_session_key = data_blob_talloc(server_info, NULL, 16);
- NT_STATUS_HAVE_NO_MEMORY(server_info->user_session_key.data);
-
- server_info->lm_session_key = data_blob_talloc(server_info, NULL, 16);
- NT_STATUS_HAVE_NO_MEMORY(server_info->lm_session_key.data);
-
- data_blob_clear(&server_info->user_session_key);
- data_blob_clear(&server_info->lm_session_key);
-
- server_info->account_name = talloc_strdup(server_info, "ANONYMOUS LOGON");
- NT_STATUS_HAVE_NO_MEMORY(server_info->account_name);
-
- server_info->domain_name = talloc_strdup(server_info, "NT AUTHORITY");
- NT_STATUS_HAVE_NO_MEMORY(server_info->domain_name);
-
- server_info->full_name = talloc_strdup(server_info, "Anonymous Logon");
- NT_STATUS_HAVE_NO_MEMORY(server_info->full_name);
-
- server_info->logon_script = talloc_strdup(server_info, "");
- NT_STATUS_HAVE_NO_MEMORY(server_info->logon_script);
-
- server_info->profile_path = talloc_strdup(server_info, "");
- NT_STATUS_HAVE_NO_MEMORY(server_info->profile_path);
-
- server_info->home_directory = talloc_strdup(server_info, "");
- NT_STATUS_HAVE_NO_MEMORY(server_info->home_directory);
-
- server_info->home_drive = talloc_strdup(server_info, "");
- NT_STATUS_HAVE_NO_MEMORY(server_info->home_drive);
-
- server_info->last_logon = 0;
- server_info->last_logoff = 0;
- server_info->acct_expiry = 0;
- server_info->last_password_change = 0;
- server_info->allow_password_change = 0;
- server_info->force_password_change = 0;
-
- server_info->logon_count = 0;
- server_info->bad_password_count = 0;
-
- server_info->acct_flags = ACB_NORMAL;
-
- server_info->authenticated = False;
-
- *_server_info = server_info;
-
- return NT_STATUS_OK;
+ return auth_anonymous_server_info(mem_ctx, _server_info);
}
static struct auth_operations anonymous_auth_ops = {