Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/winbindd/idmap_adex/cell_util.c

    r414 r745  
    2020
    2121#include "includes.h"
     22#include "ads.h"
     23#include "idmap.h"
    2224#include "idmap_adex.h"
     25#include "../libds/common/flags.h"
    2326
    2427#undef DBGC_CLASS
     
    139142        char *domain_dn = ads_build_dn(lp_realm());
    140143        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
    141         DOM_SID sid;
     144        struct dom_sid sid;
    142145        struct likewise_cell *cell = NULL;
    143146
  • trunk/server/source3/winbindd/idmap_adex/domain_util.c

    r414 r745  
    2020
    2121#include "includes.h"
     22#include "ads.h"
     23#include "idmap.h"
    2224#include "idmap_adex.h"
    2325
     
    209211                            LDAPMessage **msg,
    210212                            const char *dn,
    211                             const DOM_SID *sid)
     213                            const struct dom_sid *sid)
    212214{
    213215        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
  • trunk/server/source3/winbindd/idmap_adex/gc_util.c

    r414 r745  
    2020
    2121#include "includes.h"
     22#include "ads.h"
     23#include "idmap.h"
    2224#include "idmap_adex.h"
     25#include "libads/cldap.h"
     26#include "../libcli/ldap/ldap_ndr.h"
    2327
    2428#undef DBGC_CLASS
     
    546550 NTSTATUS gc_name_to_sid(const char *domain,
    547551                         const char *name,
    548                          DOM_SID *sid,
     552                         struct dom_sid *sid,
    549553                         enum lsa_SidType *sid_type)
    550554{
     
    704708 ********************************************************************/
    705709
    706  NTSTATUS gc_sid_to_name(const DOM_SID *sid,
     710 NTSTATUS gc_sid_to_name(const struct dom_sid *sid,
    707711                         char **name,
    708712                         enum lsa_SidType *sid_type)
     
    717721        *name = NULL;
    718722
    719         sid_string = sid_binstring(frame, sid);
     723        sid_string = ldap_encode_ndr_dom_sid(frame, sid);
    720724        BAIL_ON_PTR_ERROR(sid_string, nt_status);
    721725
  • trunk/server/source3/winbindd/idmap_adex/idmap_adex.c

    r414 r745  
    2020
    2121#include "includes.h"
     22#include "ads.h"
     23#include "idmap.h"
    2224#include "idmap_adex.h"
     25#include "nss_info.h"
     26#include "secrets.h"
    2327
    2428#undef DBGC_CLASS
     
    3943 *******************************************************************/
    4044
    41 static NTSTATUS _idmap_adex_init(struct idmap_domain *dom,
    42                                      const char *params)
     45static NTSTATUS _idmap_adex_init(struct idmap_domain *dom)
    4346{
    4447        ADS_STRUCT *ads = NULL;
    4548        ADS_STATUS status;
    4649        static NTSTATUS init_status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
    47         DOM_SID domain_sid;
     50        struct dom_sid domain_sid;
    4851        fstring dcname;
    4952        struct sockaddr_storage ip;
     
    165168        }
    166169       
    167         nt_status = _idmap_adex_init(dom, NULL);
     170        nt_status = _idmap_adex_init(dom);
    168171        if (!NT_STATUS_IS_OK(nt_status))
    169172                return nt_status;
     
    218221        }
    219222       
    220         nt_status = _idmap_adex_init(dom, NULL);
     223        nt_status = _idmap_adex_init(dom);
    221224        if (!NT_STATUS_IS_OK(nt_status))
    222225                return nt_status;
     
    251254}
    252255
    253 /**********************************************************************
    254  *********************************************************************/
    255 
    256 static NTSTATUS _idmap_adex_set_mapping(struct
    257                                             idmap_domain
    258                                             *dom, const struct
    259                                             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(struct
    269                                                idmap_domain
    270                                                *dom, const
    271                                                struct
    272                                                id_map
    273                                                *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_domain
    283                                      *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_domain
    292                                       *dom)
    293 {
    294         /* FIXME!  need to do cleanup here */
    295 
    296         return NT_STATUS_OK;
    297 }
    298 
    299256/*
    300257 * IdMap NSS plugin
     
    307264                                  *e)
    308265{
    309         return _idmap_adex_init(NULL, NULL);
     266        return _idmap_adex_init(NULL);
    310267}
    311268
     
    315272static NTSTATUS _nss_adex_get_info(struct
    316273                                      nss_domain_entry *e,
    317                                       const DOM_SID * sid,
     274                                      const struct dom_sid * sid,
    318275                                      TALLOC_CTX * ctx,
    319                                       ADS_STRUCT * ads,
    320                                       LDAPMessage * msg,
    321276                                      const char **homedir,
    322277                                      const char **shell,
     
    326281        struct likewise_cell *cell;
    327282
    328         nt_status = _idmap_adex_init(NULL, NULL);
     283        nt_status = _idmap_adex_init(NULL);
    329284        if (!NT_STATUS_IS_OK(nt_status))
    330285                return nt_status;
     
    348303        struct likewise_cell *cell = NULL;
    349304
    350         nt_status = _idmap_adex_init(NULL, NULL);
     305        nt_status = _idmap_adex_init(NULL);
    351306        BAIL_ON_NTSTATUS_ERROR(nt_status);
    352307
     
    379334        struct likewise_cell *cell = NULL;
    380335
    381         nt_status = _idmap_adex_init(NULL, NULL);
     336        nt_status = _idmap_adex_init(NULL);
    382337        BAIL_ON_NTSTATUS_ERROR(nt_status);
    383338
     
    417372        .unixids_to_sids  = _idmap_adex_get_sid_from_id,
    418373        .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_close
    423374};
    424375static struct nss_info_methods adex_nss_methods = {
     
    465416        return NT_STATUS_OK;
    466417}
    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  
    9292
    9393struct cell_provider_api {
    94         NTSTATUS(*get_sid_from_id) (DOM_SID * sid,
     94        NTSTATUS(*get_sid_from_id) (struct dom_sid * sid,
    9595                                    uint32_t id, enum id_type type);
    9696        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,
    9999                                 TALLOC_CTX * ctx,
    100100                                 const char **homedir,
     
    123123        ADS_STRUCT *conn;
    124124        struct likewise_cell *gc_search_cell;
    125         DOM_SID domain_sid;
     125        struct dom_sid domain_sid;
    126126        char *dns_domain;
    127127        char *forest_name;
     
    158158NTSTATUS cell_locate_membership(ADS_STRUCT * ads);
    159159NTSTATUS cell_lookup_settings(struct likewise_cell * cell);
    160 NTSTATUS cell_follow_links(struct likewise_cell *cell);
    161 NTSTATUS cell_set_local_provider(void);
    162160
    163161/* likewise_cell.c */
     
    171169void cell_list_destroy(void);
    172170void cell_destroy(struct likewise_cell *c);
    173 void cell_set_forest_searches(struct likewise_cell *c,
    174                                 bool search);
    175171void cell_set_dns_domain(struct likewise_cell *c,
    176172                           const char *dns_domain);
     
    180176                   const char *dn);
    181177void cell_set_domain_sid(struct likewise_cell *c,
    182                            DOM_SID *sid);
     178                           struct dom_sid *sid);
    183179void cell_set_flags(struct likewise_cell *c, uint32_t flags);
    184180void cell_clear_flags(struct likewise_cell *c, uint32_t flags);
     
    225221NTSTATUS gc_name_to_sid(const char *domain,
    226222                        const char *name,
    227                         DOM_SID *sid,
     223                        struct dom_sid *sid,
    228224                        enum lsa_SidType *sid_type);
    229225
    230 NTSTATUS gc_sid_to_name(const DOM_SID *sid,
     226NTSTATUS gc_sid_to_name(const struct dom_sid *sid,
    231227                        char **name,
    232228                        enum lsa_SidType *sid_type);
     
    253249                           LDAPMessage **msg,
    254250                           const char *dn,
    255                            const DOM_SID *user_sid);
     251                           const struct dom_sid *user_sid);
    256252
    257253
  • trunk/server/source3/winbindd/idmap_adex/likewise_cell.c

    r414 r745  
    2020
    2121#include "includes.h"
     22#include "ads.h"
     23#include "idmap.h"
    2224#include "idmap_adex.h"
     25#include "secrets.h"
     26#include "../libcli/security/dom_sid.h"
    2327
    2428#undef DBGC_CLASS
     
    177181 *********************************************************************/
    178182
    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)
    180184{
    181185        sid_copy(&c->domain_sid, sid);
  • trunk/server/source3/winbindd/idmap_adex/provider_unified.c

    r414 r745  
    2222
    2323#include "includes.h"
     24#include "ads.h"
     25#include "idmap.h"
    2426#include "idmap_adex.h"
     27#include "../libcli/ldap/ldap_ndr.h"
     28#include "../libcli/security/dom_sid.h"
    2529
    2630#undef DBGC_CLASS
     
    3640        bool use2307;
    3741        union {
    38                 DOM_SID sid;
     42                struct dom_sid sid;
    3943                struct {
    4044                        uint32_t id;
     
    246250                              LDAPMessage **msg,
    247251                              const char *dn,
    248                               const DOM_SID *sid)
     252                              const struct dom_sid *sid)
    249253{
    250254        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
     
    342346                                           int num_resp,
    343347                                           char **dn,
    344                                            DOM_SID *user_sid)
     348                                           struct dom_sid *user_sid)
    345349{
    346350        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
     
    466470        int num_resp = 0;
    467471        LDAPMessage *m;
    468         DOM_SID user_sid;
     472        struct dom_sid user_sid;
    469473        struct likewise_cell *domain_cell = NULL;
    470474
     
    484488                switch (fdata->ftype) {
    485489                case SidFilter:
    486                         sid_binstr = sid_binstring(frame, &fdata->filter.sid);
     490                        sid_binstr = ldap_encode_ndr_dom_sid(frame, &fdata->filter.sid);
    487491                        BAIL_ON_PTR_ERROR(sid_binstr, nt_status);
    488492
     
    612616static NTSTATUS pull_sid(struct likewise_cell *c,
    613617                         LDAPMessage *msg,
    614                          DOM_SID *sid)
     618                         struct dom_sid *sid)
    615619{
    616620        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
     
    968972 *******************************************************************/
    969973
    970 static NTSTATUS _ccp_get_sid_from_id(DOM_SID * sid,
     974static NTSTATUS _ccp_get_sid_from_id(struct dom_sid * sid,
    971975                                     uint32_t id, enum id_type type)
    972976{
     
    9971001static NTSTATUS _ccp_get_id_from_sid(uint32_t * id,
    9981002                                     enum id_type *type,
    999                                      const DOM_SID * sid)
     1003                                     const struct dom_sid * sid)
    10001004{
    10011005        struct likewise_cell *cell = NULL;
     
    10271031 *******************************************************************/
    10281032
    1029 static NTSTATUS _ccp_nss_get_info(const DOM_SID * sid,
     1033static NTSTATUS _ccp_nss_get_info(const struct dom_sid * sid,
    10301034                                  TALLOC_CTX * ctx,
    10311035                                  const char **homedir,
     
    10721076        TALLOC_CTX *frame = talloc_stackframe();
    10731077        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
    1074         DOM_SID sid;
     1078        struct dom_sid sid;
    10751079        struct likewise_cell *cell = NULL;
    10761080        LDAPMessage *msg = NULL;
     
    11171121        TALLOC_CTX *frame = talloc_stackframe();
    11181122        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
    1119         DOM_SID sid;
     1123        struct dom_sid sid;
    11201124        struct likewise_cell *cell_alias = NULL;
    11211125        LDAPMessage *msg_alias = NULL;
Note: See TracChangeset for help on using the changeset viewer.