From fbe6d155bf177c610ee549cc534650b0f0700e8a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 20 Jan 2011 23:39:37 +1100 Subject: s4-auth Remove special case for account_sid from auth_serversupplied_info This makes everything reference a server_info->sids list, which is now a struct dom_sid *, not a struct dom_sid **. This is in keeping with the other sid lists in the security_token etc. In the process, I also tidy up the talloc tree (move more structures under their logical parents) and check for some possible overflows in situations with a pathological number of sids. Andrew Bartlett --- source4/auth/ntlm/auth_server.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'source4/auth/ntlm/auth_server.c') diff --git a/source4/auth/ntlm/auth_server.c b/source4/auth/ntlm/auth_server.c index 898e2cce67..8e9e73c43d 100644 --- a/source4/auth/ntlm/auth_server.c +++ b/source4/auth/ntlm/auth_server.c @@ -159,15 +159,12 @@ static NTSTATUS server_check_password(struct auth_method_context *ctx, 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); + server_info->num_sids = 1; - /* 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; + /* This returns a pointer to a struct dom_sid, which is the + * same as a 1 element list of struct dom_sid */ + server_info->sids = dom_sid_parse_talloc(server_info, SID_NT_ANONYMOUS); + NT_STATUS_HAVE_NO_MEMORY(server_info->sids); /* annoying, but the Anonymous really does have a session key, and it is all zeros! */ -- cgit