Lines Matching defs:state
87 /* We need to get our protocol handler into the right state. So first
126 static BOOL check_client_uid(struct winbindd_cli_state *state, uid_t uid)
133 ret = sys_getpeereid(state->sock, &ret_uid);
150 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state)
156 state->request.data.ccache_ntlm_auth.user[
157 sizeof(state->request.data.ccache_ntlm_auth.user)-1]='\0';
159 DEBUG(3, ("[%5lu]: perform NTLM auth on behalf of user %s\n", (unsigned long)state->pid,
160 state->request.data.ccache_ntlm_auth.user));
164 if (!canonicalize_username(state->request.data.ccache_ntlm_auth.user,
167 state->request.data.ccache_ntlm_auth.user));
168 request_error(state);
172 domain = find_auth_domain(state, name_domain);
177 request_error(state);
181 if (!check_client_uid(state, state->request.data.ccache_ntlm_auth.uid)) {
182 request_error(state);
186 sendto_domain(state, domain);
190 struct winbindd_cli_state *state)
199 state->request.data.ccache_ntlm_auth.user[
200 sizeof(state->request.data.ccache_ntlm_auth.user)-1]='\0';
203 "behalf of user %s (dual)\n", (unsigned long)state->pid,
204 state->request.data.ccache_ntlm_auth.user));
207 initial_blob_len = state->request.data.ccache_ntlm_auth.initial_blob_len;
208 challenge_blob_len = state->request.data.ccache_ntlm_auth.challenge_blob_len;
209 extra_len = state->request.extra_len;
225 if (!parse_domain_user(state->request.data.ccache_ntlm_auth.user, name_domain, name_user)) {
228 state->request.data.ccache_ntlm_auth.user));
232 entry = find_memory_creds_by_name(state->request.data.ccache_ntlm_auth.user);
236 state->request.data.ccache_ntlm_auth.user));
242 if (!client_can_access_ccache_entry(state->request.data.ccache_ntlm_auth.uid, entry)) {
249 state->response.data.ccache_ntlm_auth.auth_blob_len = 0;
253 initial = data_blob(state->request.extra_data.data, initial_blob_len);
254 challenge = data_blob(state->request.extra_data.data + initial_blob_len,
255 state->request.data.ccache_ntlm_auth.challenge_blob_len);
272 state->response.extra_data.data = smb_xmemdup(auth.data, auth.length);
273 if (!state->response.extra_data.data) {
277 state->response.length += auth.length;
278 state->response.data.ccache_ntlm_auth.auth_blob_len = auth.length;