Changeset 745 for trunk/server/source3/winbindd/idmap_adex
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/winbindd/idmap_adex/cell_util.c
r414 r745 20 20 21 21 #include "includes.h" 22 #include "ads.h" 23 #include "idmap.h" 22 24 #include "idmap_adex.h" 25 #include "../libds/common/flags.h" 23 26 24 27 #undef DBGC_CLASS … … 139 142 char *domain_dn = ads_build_dn(lp_realm()); 140 143 NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; 141 DOM_SIDsid;144 struct dom_sid sid; 142 145 struct likewise_cell *cell = NULL; 143 146 -
trunk/server/source3/winbindd/idmap_adex/domain_util.c
r414 r745 20 20 21 21 #include "includes.h" 22 #include "ads.h" 23 #include "idmap.h" 22 24 #include "idmap_adex.h" 23 25 … … 209 211 LDAPMessage **msg, 210 212 const char *dn, 211 const DOM_SID*sid)213 const struct dom_sid *sid) 212 214 { 213 215 NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; -
trunk/server/source3/winbindd/idmap_adex/gc_util.c
r414 r745 20 20 21 21 #include "includes.h" 22 #include "ads.h" 23 #include "idmap.h" 22 24 #include "idmap_adex.h" 25 #include "libads/cldap.h" 26 #include "../libcli/ldap/ldap_ndr.h" 23 27 24 28 #undef DBGC_CLASS … … 546 550 NTSTATUS gc_name_to_sid(const char *domain, 547 551 const char *name, 548 DOM_SID*sid,552 struct dom_sid *sid, 549 553 enum lsa_SidType *sid_type) 550 554 { … … 704 708 ********************************************************************/ 705 709 706 NTSTATUS gc_sid_to_name(const DOM_SID*sid,710 NTSTATUS gc_sid_to_name(const struct dom_sid *sid, 707 711 char **name, 708 712 enum lsa_SidType *sid_type) … … 717 721 *name = NULL; 718 722 719 sid_string = sid_binstring(frame, sid);723 sid_string = ldap_encode_ndr_dom_sid(frame, sid); 720 724 BAIL_ON_PTR_ERROR(sid_string, nt_status); 721 725 -
trunk/server/source3/winbindd/idmap_adex/idmap_adex.c
r414 r745 20 20 21 21 #include "includes.h" 22 #include "ads.h" 23 #include "idmap.h" 22 24 #include "idmap_adex.h" 25 #include "nss_info.h" 26 #include "secrets.h" 23 27 24 28 #undef DBGC_CLASS … … 39 43 *******************************************************************/ 40 44 41 static NTSTATUS _idmap_adex_init(struct idmap_domain *dom, 42 const char *params) 45 static NTSTATUS _idmap_adex_init(struct idmap_domain *dom) 43 46 { 44 47 ADS_STRUCT *ads = NULL; 45 48 ADS_STATUS status; 46 49 static NTSTATUS init_status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND; 47 DOM_SIDdomain_sid;50 struct dom_sid domain_sid; 48 51 fstring dcname; 49 52 struct sockaddr_storage ip; … … 165 168 } 166 169 167 nt_status = _idmap_adex_init(dom , NULL);170 nt_status = _idmap_adex_init(dom); 168 171 if (!NT_STATUS_IS_OK(nt_status)) 169 172 return nt_status; … … 218 221 } 219 222 220 nt_status = _idmap_adex_init(dom , NULL);223 nt_status = _idmap_adex_init(dom); 221 224 if (!NT_STATUS_IS_OK(nt_status)) 222 225 return nt_status; … … 251 254 } 252 255 253 /**********************************************************************254 *********************************************************************/255 256 static NTSTATUS _idmap_adex_set_mapping(struct257 idmap_domain258 *dom, const struct259 id_map *map)260 {261 DEBUG(0, ("_idmap_adex_set_mapping: not implemented\n"));262 return NT_STATUS_NOT_IMPLEMENTED;263 }264 265 /**********************************************************************266 *********************************************************************/267 268 static NTSTATUS _idmap_adex_remove_mapping(struct269 idmap_domain270 *dom, const271 struct272 id_map273 *map)274 {275 DEBUG(0, ("_idmap_adex_remove_mapping: not implemented\n"));276 return NT_STATUS_NOT_IMPLEMENTED;277 }278 279 /**********************************************************************280 *********************************************************************/281 282 static NTSTATUS _idmap_adex_dump(struct idmap_domain283 *dom, struct id_map **maps, int *num_map)284 {285 return NT_STATUS_NOT_IMPLEMENTED;286 }287 288 /**********************************************************************289 *********************************************************************/290 291 static NTSTATUS _idmap_adex_close(struct idmap_domain292 *dom)293 {294 /* FIXME! need to do cleanup here */295 296 return NT_STATUS_OK;297 }298 299 256 /* 300 257 * IdMap NSS plugin … … 307 264 *e) 308 265 { 309 return _idmap_adex_init(NULL , NULL);266 return _idmap_adex_init(NULL); 310 267 } 311 268 … … 315 272 static NTSTATUS _nss_adex_get_info(struct 316 273 nss_domain_entry *e, 317 const DOM_SID* sid,274 const struct dom_sid * sid, 318 275 TALLOC_CTX * ctx, 319 ADS_STRUCT * ads,320 LDAPMessage * msg,321 276 const char **homedir, 322 277 const char **shell, … … 326 281 struct likewise_cell *cell; 327 282 328 nt_status = _idmap_adex_init(NULL , NULL);283 nt_status = _idmap_adex_init(NULL); 329 284 if (!NT_STATUS_IS_OK(nt_status)) 330 285 return nt_status; … … 348 303 struct likewise_cell *cell = NULL; 349 304 350 nt_status = _idmap_adex_init(NULL , NULL);305 nt_status = _idmap_adex_init(NULL); 351 306 BAIL_ON_NTSTATUS_ERROR(nt_status); 352 307 … … 379 334 struct likewise_cell *cell = NULL; 380 335 381 nt_status = _idmap_adex_init(NULL , NULL);336 nt_status = _idmap_adex_init(NULL); 382 337 BAIL_ON_NTSTATUS_ERROR(nt_status); 383 338 … … 417 372 .unixids_to_sids = _idmap_adex_get_sid_from_id, 418 373 .sids_to_unixids = _idmap_adex_get_id_from_sid, 419 .set_mapping = _idmap_adex_set_mapping,420 .remove_mapping = _idmap_adex_remove_mapping,421 .dump_data = _idmap_adex_dump,422 .close_fn = _idmap_adex_close423 374 }; 424 375 static struct nss_info_methods adex_nss_methods = { … … 465 416 return NT_STATUS_OK; 466 417 } 467 468 static NTSTATUS nss_info_adex_init(void)469 {470 return idmap_adex_init();471 } -
trunk/server/source3/winbindd/idmap_adex/idmap_adex.h
r414 r745 92 92 93 93 struct cell_provider_api { 94 NTSTATUS(*get_sid_from_id) ( DOM_SID* sid,94 NTSTATUS(*get_sid_from_id) (struct dom_sid * sid, 95 95 uint32_t id, enum id_type type); 96 96 NTSTATUS(*get_id_from_sid) (uint32_t * id, 97 enum id_type * type, const DOM_SID* sid);98 NTSTATUS(*get_nss_info) (const DOM_SID* sid,97 enum id_type * type, const struct dom_sid * sid); 98 NTSTATUS(*get_nss_info) (const struct dom_sid * sid, 99 99 TALLOC_CTX * ctx, 100 100 const char **homedir, … … 123 123 ADS_STRUCT *conn; 124 124 struct likewise_cell *gc_search_cell; 125 DOM_SIDdomain_sid;125 struct dom_sid domain_sid; 126 126 char *dns_domain; 127 127 char *forest_name; … … 158 158 NTSTATUS cell_locate_membership(ADS_STRUCT * ads); 159 159 NTSTATUS cell_lookup_settings(struct likewise_cell * cell); 160 NTSTATUS cell_follow_links(struct likewise_cell *cell);161 NTSTATUS cell_set_local_provider(void);162 160 163 161 /* likewise_cell.c */ … … 171 169 void cell_list_destroy(void); 172 170 void cell_destroy(struct likewise_cell *c); 173 void cell_set_forest_searches(struct likewise_cell *c,174 bool search);175 171 void cell_set_dns_domain(struct likewise_cell *c, 176 172 const char *dns_domain); … … 180 176 const char *dn); 181 177 void cell_set_domain_sid(struct likewise_cell *c, 182 DOM_SID*sid);178 struct dom_sid *sid); 183 179 void cell_set_flags(struct likewise_cell *c, uint32_t flags); 184 180 void cell_clear_flags(struct likewise_cell *c, uint32_t flags); … … 225 221 NTSTATUS gc_name_to_sid(const char *domain, 226 222 const char *name, 227 DOM_SID*sid,223 struct dom_sid *sid, 228 224 enum lsa_SidType *sid_type); 229 225 230 NTSTATUS gc_sid_to_name(const DOM_SID*sid,226 NTSTATUS gc_sid_to_name(const struct dom_sid *sid, 231 227 char **name, 232 228 enum lsa_SidType *sid_type); … … 253 249 LDAPMessage **msg, 254 250 const char *dn, 255 const DOM_SID*user_sid);251 const struct dom_sid *user_sid); 256 252 257 253 -
trunk/server/source3/winbindd/idmap_adex/likewise_cell.c
r414 r745 20 20 21 21 #include "includes.h" 22 #include "ads.h" 23 #include "idmap.h" 22 24 #include "idmap_adex.h" 25 #include "secrets.h" 26 #include "../libcli/security/dom_sid.h" 23 27 24 28 #undef DBGC_CLASS … … 177 181 *********************************************************************/ 178 182 179 void cell_set_domain_sid(struct likewise_cell *c, DOM_SID*sid)183 void cell_set_domain_sid(struct likewise_cell *c, struct dom_sid *sid) 180 184 { 181 185 sid_copy(&c->domain_sid, sid); -
trunk/server/source3/winbindd/idmap_adex/provider_unified.c
r414 r745 22 22 23 23 #include "includes.h" 24 #include "ads.h" 25 #include "idmap.h" 24 26 #include "idmap_adex.h" 27 #include "../libcli/ldap/ldap_ndr.h" 28 #include "../libcli/security/dom_sid.h" 25 29 26 30 #undef DBGC_CLASS … … 36 40 bool use2307; 37 41 union { 38 DOM_SIDsid;42 struct dom_sid sid; 39 43 struct { 40 44 uint32_t id; … … 246 250 LDAPMessage **msg, 247 251 const char *dn, 248 const DOM_SID*sid)252 const struct dom_sid *sid) 249 253 { 250 254 NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; … … 342 346 int num_resp, 343 347 char **dn, 344 DOM_SID*user_sid)348 struct dom_sid *user_sid) 345 349 { 346 350 NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; … … 466 470 int num_resp = 0; 467 471 LDAPMessage *m; 468 DOM_SIDuser_sid;472 struct dom_sid user_sid; 469 473 struct likewise_cell *domain_cell = NULL; 470 474 … … 484 488 switch (fdata->ftype) { 485 489 case SidFilter: 486 sid_binstr = sid_binstring(frame, &fdata->filter.sid);490 sid_binstr = ldap_encode_ndr_dom_sid(frame, &fdata->filter.sid); 487 491 BAIL_ON_PTR_ERROR(sid_binstr, nt_status); 488 492 … … 612 616 static NTSTATUS pull_sid(struct likewise_cell *c, 613 617 LDAPMessage *msg, 614 DOM_SID*sid)618 struct dom_sid *sid) 615 619 { 616 620 NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; … … 968 972 *******************************************************************/ 969 973 970 static NTSTATUS _ccp_get_sid_from_id( DOM_SID* sid,974 static NTSTATUS _ccp_get_sid_from_id(struct dom_sid * sid, 971 975 uint32_t id, enum id_type type) 972 976 { … … 997 1001 static NTSTATUS _ccp_get_id_from_sid(uint32_t * id, 998 1002 enum id_type *type, 999 const DOM_SID* sid)1003 const struct dom_sid * sid) 1000 1004 { 1001 1005 struct likewise_cell *cell = NULL; … … 1027 1031 *******************************************************************/ 1028 1032 1029 static NTSTATUS _ccp_nss_get_info(const DOM_SID* sid,1033 static NTSTATUS _ccp_nss_get_info(const struct dom_sid * sid, 1030 1034 TALLOC_CTX * ctx, 1031 1035 const char **homedir, … … 1072 1076 TALLOC_CTX *frame = talloc_stackframe(); 1073 1077 NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; 1074 DOM_SIDsid;1078 struct dom_sid sid; 1075 1079 struct likewise_cell *cell = NULL; 1076 1080 LDAPMessage *msg = NULL; … … 1117 1121 TALLOC_CTX *frame = talloc_stackframe(); 1118 1122 NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; 1119 DOM_SIDsid;1123 struct dom_sid sid; 1120 1124 struct likewise_cell *cell_alias = NULL; 1121 1125 LDAPMessage *msg_alias = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.