Changeset 587 for vendor/current/source3/winbindd
- Timestamp:
- Jun 29, 2011, 7:36:41 AM (14 years ago)
- Location:
- vendor/current/source3/winbindd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/winbindd/winbindd_cm.c
r478 r587 2017 2017 ***********************************************************************/ 2018 2018 2019 static boolcm_get_schannel_creds(struct winbindd_domain *domain,2019 static NTSTATUS cm_get_schannel_creds(struct winbindd_domain *domain, 2020 2020 struct netlogon_creds_CredentialState **ppdc) 2021 2021 { 2022 NTSTATUS result ;2022 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 2023 2023 struct rpc_pipe_client *netlogon_pipe; 2024 2024 2025 2025 if (lp_client_schannel() == False) { 2026 return False;2026 return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;; 2027 2027 } 2028 2028 2029 2029 result = cm_connect_netlogon(domain, &netlogon_pipe); 2030 2030 if (!NT_STATUS_IS_OK(result)) { 2031 return False;2031 return result; 2032 2032 } 2033 2033 … … 2036 2036 2037 2037 if (!domain->conn.netlogon_pipe->dc) { 2038 return false;2038 return NT_STATUS_INTERNAL_ERROR; /* This shouldn't happen. */ 2039 2039 } 2040 2040 2041 2041 *ppdc = domain->conn.netlogon_pipe->dc; 2042 return True;2042 return NT_STATUS_OK; 2043 2043 } 2044 2044 … … 2137 2137 /* Fall back to schannel if it's a W2K pre-SP1 box. */ 2138 2138 2139 if (!cm_get_schannel_creds(domain, &p_creds)) { 2139 result = cm_get_schannel_creds(domain, &p_creds); 2140 if (!NT_STATUS_IS_OK(result)) { 2140 2141 /* If this call fails - conn->cli can now be NULL ! */ 2141 2142 DEBUG(10, ("cm_connect_sam: Could not get schannel auth info " 2142 "for domain %s, trying anon\n", domain->name)); 2143 "for domain %s (error %s), trying anon\n", 2144 domain->name, 2145 nt_errstr(result) )); 2143 2146 goto anonymous; 2144 2147 } … … 2232 2235 { 2233 2236 struct winbindd_cm_conn *conn; 2237 struct netlogon_creds_CredentialState *creds; 2234 2238 NTSTATUS status; 2235 2239 … … 2252 2256 TALLOC_FREE(conn->lsa_pipe_tcp); 2253 2257 2254 status = cli_rpc_pipe_open_schannel(conn->cli, 2255 &ndr_table_lsarpc.syntax_id, 2256 NCACN_IP_TCP, 2257 DCERPC_AUTH_LEVEL_PRIVACY, 2258 domain->name, 2259 &conn->lsa_pipe_tcp); 2258 status = cm_get_schannel_creds(domain, &creds); 2260 2259 if (!NT_STATUS_IS_OK(status)) { 2261 DEBUG(10,("cli_rpc_pipe_open_schannel failed: %s\n", 2260 goto done; 2261 } 2262 2263 status = cli_rpc_pipe_open_schannel_with_key(conn->cli, 2264 &ndr_table_lsarpc.syntax_id, 2265 NCACN_IP_TCP, 2266 DCERPC_AUTH_LEVEL_PRIVACY, 2267 domain->name, 2268 &creds, 2269 &conn->lsa_pipe_tcp); 2270 if (!NT_STATUS_IS_OK(status)) { 2271 DEBUG(10,("cli_rpc_pipe_open_schannel_with_key failed: %s\n", 2262 2272 nt_errstr(status))); 2263 2273 goto done; … … 2339 2349 /* Fall back to schannel if it's a W2K pre-SP1 box. */ 2340 2350 2341 if (!cm_get_schannel_creds(domain, &p_creds)) { 2351 result = cm_get_schannel_creds(domain, &p_creds); 2352 if (!NT_STATUS_IS_OK(result)) { 2342 2353 /* If this call fails - conn->cli can now be NULL ! */ 2343 2354 DEBUG(10, ("cm_connect_lsa: Could not get schannel auth info " 2344 "for domain %s, trying anon\n", domain->name)); 2355 "for domain %s (error %s), trying anon\n", 2356 domain->name, 2357 nt_errstr(result) )); 2345 2358 goto anonymous; 2346 2359 } -
vendor/current/source3/winbindd/winbindd_dual_srv.c
r414 r587 611 611 id.id = r->in.id; 612 612 613 switch ( id.type) {613 switch (r->in.type) { 614 614 case WBINT_ID_TYPE_UID: 615 615 id.type = ID_TYPE_UID; 616 616 status = idmap_set_uid_hwm(&id); 617 617 break; 618 case ID_TYPE_GID:618 case WBINT_ID_TYPE_GID: 619 619 id.type = ID_TYPE_GID; 620 620 status = idmap_set_gid_hwm(&id); -
vendor/current/source3/winbindd/winbindd_pam.c
r427 r587 802 802 { 803 803 struct winbindd_domain *domain; 804 fstring name_domain, name_user , mapped_user;804 fstring name_domain, name_user; 805 805 char *mapped = NULL; 806 806 NTSTATUS result; … … 829 829 &mapped); 830 830 831 /* If the name normalization didnt' actually do anything, 832 just use the original name */ 833 834 if (NT_STATUS_IS_OK(name_map_status) 835 ||NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED)) { 836 fstrcpy(mapped_user, mapped); 837 } else { 838 fstrcpy(mapped_user, state->request->data.auth.user); 839 } 840 841 if (!canonicalize_username(mapped_user, name_domain, name_user)) { 831 /* Update the auth name if we did any mapping */ 832 833 if (NT_STATUS_IS_OK(name_map_status) || 834 NT_STATUS_EQUAL(name_map_status, NT_STATUS_FILE_RENAMED)) 835 { 836 fstrcpy(state->request->data.auth.user, mapped); 837 } 838 839 if (!canonicalize_username(state->request->data.auth.user, name_domain, name_user)) { 842 840 result = NT_STATUS_NO_SUCH_USER; 843 841 goto done;
Note:
See TracChangeset
for help on using the changeset viewer.