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:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/winbindd/winbindd_proto.h

    r414 r745  
    2424#define _WINBINDD_PROTO_H_
    2525
    26 
    27 /* The following definitions come from auth/token_util.c  */
    28 
    29 bool nt_token_check_sid ( const DOM_SID *sid, const NT_USER_TOKEN *token );
    30 bool nt_token_check_domain_rid( NT_USER_TOKEN *token, uint32 rid );
    31 NT_USER_TOKEN *get_root_nt_token( void );
    32 NTSTATUS add_aliases(const DOM_SID *domain_sid,
    33                      struct nt_user_token *token);
    34 struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
    35                                             const DOM_SID *user_sid,
    36                                             bool is_guest,
    37                                             int num_groupsids,
    38                                             const DOM_SID *groupsids);
    39 void debug_nt_user_token(int dbg_class, int dbg_lev, NT_USER_TOKEN *token);
    40 void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
    41                            int n_groups, gid_t *groups);
    42 
    43 /* The following definitions come from smbd/connection.c  */
    44 
    45 bool yield_connection(connection_struct *conn, const char *name);
    46 int count_current_connections( const char *sharename, bool clear  );
    47 int count_all_current_connections(void);
    48 bool claim_connection(connection_struct *conn, const char *name,
    49                       uint32 msg_flags);
    50 bool register_message_flags(bool doreg, uint32 msg_flags);
    51 
    5226/* The following definitions come from winbindd/winbindd.c  */
    53 
    54 struct event_context *winbind_event_context(void);
    5527struct messaging_context *winbind_messaging_context(void);
    5628void request_error(struct winbindd_cli_state *state);
     
    6032bool winbindd_use_idmap_cache(void);
    6133bool winbindd_use_cache(void);
     34void winbindd_register_handlers(void);
     35const char *get_winbind_pipe_dir(void);
     36char *get_winbind_priv_pipe_dir(void);
    6237int main(int argc, char **argv, char **envp);
    6338
     
    8055                               struct dom_sid **sids,
    8156                               enum lsa_SidType **types);
    82 
    83 /* The following definitions come from winbindd/winbindd_async.c  */
    84 
    85 bool print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
    86                    size_t num_sids, char **result, ssize_t *len);
    87 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
    88                    DOM_SID **sids, size_t *num_sids);
     57NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx,
     58                         struct winbindd_domain *domain,
     59                         struct lsa_SidArray *sids,
     60                         struct lsa_RefDomainList **pdomains,
     61                         struct lsa_TransNameArray **pnames);
    8962
    9063/* The following definitions come from winbindd/winbindd_cache.c  */
    9164
    92 void winbindd_check_cache_size(time_t t);
    9365struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status);
    94 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const DOM_SID *sid);
     66NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
    9567NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
    9668                          TALLOC_CTX *mem_ctx,
    97                           const DOM_SID *sid,
     69                          const struct dom_sid *sid,
    9870                          const uint8 **cached_nt_pass,
    9971                          const uint8 **cached_salt);
    10072NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
    101                            TALLOC_CTX *mem_ctx,
    102                            const DOM_SID *sid,
     73                           const struct dom_sid *sid,
    10374                           const uint8 nt_pass[NT_HASH_LEN]);
    10475void wcache_invalidate_samlogon(struct winbindd_domain *domain,
    105                                 struct netr_SamInfo3 *info3);
     76                                const struct dom_sid *user_sid);
    10677bool wcache_invalidate_cache(void);
     78bool wcache_invalidate_cache_noinit(void);
    10779bool init_wcache(void);
    10880bool initialize_winbindd_cache(void);
     
    12092                                struct dom_sid **sid_mem, char ***names,
    12193                                uint32_t **name_types);
    122 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
     94bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
    12395                       char **domain_name, char **name,
    12496                       enum lsa_SidType *type);
    125 bool lookup_cached_name(TALLOC_CTX *mem_ctx,
    126                         const char *domain_name,
     97bool lookup_cached_name(const char *domain_name,
    12798                        const char *name,
    128                         DOM_SID *sid,
     99                        struct dom_sid *sid,
    129100                        enum lsa_SidType *type);
    130101void cache_name2sid(struct winbindd_domain *domain,
    131102                    const char *domain_name, const char *name,
    132                     enum lsa_SidType type, const DOM_SID *sid);
     103                    enum lsa_SidType type, const struct dom_sid *sid);
    133104NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain,
    134105                            const char *domain_name,
     
    142113NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
    143114                                   TALLOC_CTX *mem_ctx,
    144                                    uint32 num_sids, const DOM_SID *sids,
     115                                   uint32 num_sids, const struct dom_sid *sids,
    145116                                   uint32 *pnum_aliases, uint32 **paliases);
    146117NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
     
    152123void wcache_flush_cache(void);
    153124NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
    154 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const DOM_SID *sid) ;
     125NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
    155126bool set_global_winbindd_state_offline(void);
    156127void set_global_winbindd_state_online(void);
     
    162133bool wcache_tdc_add_domain( struct winbindd_domain *domain );
    163134struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
     135struct winbindd_tdc_domain* wcache_tdc_fetch_domainbysid(TALLOC_CTX *ctx, const struct dom_sid *sid);
    164136void wcache_tdc_clear( void );
     137#ifdef HAVE_ADS
     138struct ads_struct;
    165139NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
    166                               const DOM_SID *user_sid,
     140                              const struct dom_sid *user_sid,
    167141                              TALLOC_CTX *ctx,
    168                               ADS_STRUCT *ads, LDAPMessage *msg,
    169142                              const char **homedir, const char **shell,
    170143                              const char **gecos, gid_t *p_gid);
     144#endif
    171145bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
    172146                         time_t last_seq_check);
     
    182156                                                struct winbindd_cli_state *state);
    183157void winbindd_ccache_save(struct winbindd_cli_state *state);
    184 enum winbindd_result winbindd_dual_ccache_save(
    185         struct winbindd_domain *domain, struct winbindd_cli_state *state);
    186158
    187159/* The following definitions come from winbindd/winbindd_cm.c  */
     
    189161void set_domain_offline(struct winbindd_domain *domain);
    190162void set_domain_online_request(struct winbindd_domain *domain);
    191 void winbind_add_failed_connection_entry(const struct winbindd_domain *domain,
    192                                         const char *server,
    193                                         NTSTATUS result);
    194163void invalidate_cm_connection(struct winbindd_cm_conn *conn);
    195164void close_conns_after_fork(void);
     
    204173NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
    205174                             struct rpc_pipe_client **cli);
     175bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
     176                                    const char *domain_name,
     177                                    char **p_dc_name, char **p_dc_ip);
    206178
    207179/* The following definitions come from winbindd/winbindd_cred_cache.c  */
     
    236208NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
    237209                            TALLOC_CTX *mem_ctx,
    238                             const DOM_SID *sid,
     210                            const struct dom_sid *sid,
    239211                            struct netr_SamInfo3 **info3,
    240212                            const uint8 *cached_nt_pass[NT_HASH_LEN],
    241213                            const uint8 *cred_salt[NT_HASH_LEN]);
    242214NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
    243                               TALLOC_CTX *mem_ctx,
    244215                              const char *user,
    245216                              const char *pass,
    246                               struct netr_SamInfo3 *info3,
    247                               const DOM_SID *user_sid);
     217                              struct netr_SamInfo3 *info3);
    248218NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
    249                                         TALLOC_CTX *mem_ctx,
    250219                                        const char *user,
    251220                                        const char *pass,
    252221                                        struct netr_SamInfo3 *info3);
    253 NTSTATUS winbindd_update_creds_by_sid(struct winbindd_domain *domain,
    254                                       TALLOC_CTX *mem_ctx,
    255                                       const DOM_SID *sid,
    256                                       const char *pass);
    257222NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
    258                                        TALLOC_CTX *mem_ctx,
    259223                                       const char *user,
    260224                                       const char *pass);
     
    262226/* The following definitions come from winbindd/winbindd_domain.c  */
    263227
    264 void setup_domain_child(struct winbindd_domain *domain,
    265                         struct winbindd_child *child);
     228void setup_domain_child(struct winbindd_domain *domain);
    266229
    267230/* The following definitions come from winbindd/winbindd_dual.c  */
     231
     232struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
     233struct winbindd_child *choose_domain_child(struct winbindd_domain *domain);
    268234
    269235struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
     
    280246                           struct winbindd_response **presponse, int *err);
    281247
    282 void async_domain_request(TALLOC_CTX *mem_ctx,
    283                           struct winbindd_domain *domain,
    284                           struct winbindd_request *request,
    285                           struct winbindd_response *response,
    286                           void (*continuation)(void *private_data_data, bool success),
    287                           void *private_data_data);
    288 void sendto_domain(struct winbindd_cli_state *state,
    289                    struct winbindd_domain *domain);
    290248void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
    291249                 const struct winbindd_child_dispatch_table *table,
     
    324282                                  struct server_id server_id,
    325283                                  DATA_BLOB *data);
    326 bool winbindd_reinit_after_fork(const char *logfilename);
     284void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
     285                            void *private_data,
     286                            uint32_t msg_type,
     287                            struct server_id server_id,
     288                            DATA_BLOB *data);
     289void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
     290                                   void *private_data,
     291                                   uint32_t msg_type,
     292                                   struct server_id server_id,
     293                                   DATA_BLOB *data);
     294NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
     295                                    const char *logfilename);
    327296struct winbindd_domain *wb_child_domain(void);
    328297
     
    350319void init_idmap_child(void);
    351320struct winbindd_child *idmap_child(void);
     321struct idmap_domain *idmap_find_domain(const char *domname);
    352322
    353323/* The following definitions come from winbindd/winbindd_locator.c  */
     
    362332                                                        struct winbindd_cli_state *state);
    363333void winbindd_show_sequence(struct winbindd_cli_state *state);
    364 enum winbindd_result winbindd_dual_show_sequence(struct winbindd_domain *domain,
    365                                                  struct winbindd_cli_state *state);
    366334void winbindd_domain_info(struct winbindd_cli_state *state);
     335void winbindd_dc_info(struct winbindd_cli_state *state);
    367336void winbindd_ping(struct winbindd_cli_state *state);
    368337void winbindd_info(struct winbindd_cli_state *state);
     
    373342
    374343/* The following definitions come from winbindd/winbindd_ndr.c  */
    375 
     344struct ndr_print;
    376345void ndr_print_winbindd_child(struct ndr_print *ndr,
    377346                              const char *name,
     
    390359
    391360bool check_request_flags(uint32_t flags);
     361uid_t get_uid_from_request(struct winbindd_request *request);
    392362struct winbindd_domain *find_auth_domain(uint8_t flags,
    393363                                         const char *domain_name);
    394 NTSTATUS check_info3_in_group(struct netr_SamInfo3 *info3,
    395                               const char *group_sid);
    396 NTSTATUS append_auth_data(struct winbindd_cli_state *state,
    397                           struct netr_SamInfo3 *info3,
    398                           const char *name_domain,
    399                           const char *name_user);
    400 void winbindd_pam_auth(struct winbindd_cli_state *state);
    401364enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
    402365                                            struct winbindd_cli_state *state) ;
    403 void winbindd_pam_auth_crap(struct winbindd_cli_state *state);
    404366enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
    405367                                                 struct winbindd_cli_state *state) ;
    406 void winbindd_pam_chauthtok(struct winbindd_cli_state *state);
    407368enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
    408369                                                 struct winbindd_cli_state *state);
    409 void winbindd_pam_logoff(struct winbindd_cli_state *state);
    410370enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
    411371                                              struct winbindd_cli_state *state) ;
    412 void winbindd_pam_chng_pswd_auth_crap(struct winbindd_cli_state *state);
    413372enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
    414373
     
    416375
    417376struct winbindd_domain *domain_list(void);
    418 void free_domain_list(void);
     377bool domain_is_forest_root(const struct winbindd_domain *domain);
    419378void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
    420379                            struct timeval now, void *private_data);
     
    422381                                                   struct winbindd_cli_state *state);
    423382bool init_domain_list(void);
    424 void check_domain_trusted( const char *name, const DOM_SID *user_sid );
    425383struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
    426384struct winbindd_domain *find_domain_from_name(const char *domain_name);
    427 struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid);
    428 struct winbindd_domain *find_domain_from_sid(const DOM_SID *sid);
     385struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
     386struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
    429387struct winbindd_domain *find_our_domain(void);
    430388struct winbindd_domain *find_root_domain(void);
    431389struct winbindd_domain *find_builtin_domain(void);
    432 struct winbindd_domain *find_lookup_domain_from_sid(const DOM_SID *sid);
     390struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
    433391struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
    434392bool parse_domain_user(const char *domuser, fstring domain, fstring user);
    435393bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
    436394                              char **domain, char **user);
    437 void parse_add_domuser(void *buf, char *domuser, int *len);
    438395bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
    439396void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
     
    442399                                  const char *user,
    443400                                  bool can_assume);
    444 const char *get_winbind_pipe_dir(void) ;
    445 char *get_winbind_priv_pipe_dir(void) ;
    446 int open_winbindd_socket(void);
    447 int open_winbindd_priv_socket(void);
    448401struct winbindd_cli_state *winbindd_client_list(void);
    449402void winbindd_add_client(struct winbindd_cli_state *cli);
    450403void winbindd_remove_client(struct winbindd_cli_state *cli);
    451 void winbindd_kill_all_clients(void);
    452404int winbindd_num_clients(void);
    453405NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
    454406                                  TALLOC_CTX *mem_ctx,
    455                                   const DOM_SID *user_sid,
    456                                   uint32 *p_num_groups, DOM_SID **user_sids);
     407                                  const struct dom_sid *user_sid,
     408                                  uint32 *p_num_groups, struct dom_sid **user_sids);
    457409
    458410NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
     
    479431void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
    480432bool is_domain_offline(const struct winbindd_domain *domain);
     433bool is_domain_online(const struct winbindd_domain *domain);
     434bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
     435                   struct dom_sid **sids, uint32_t *num_sids);
    481436
    482437/* The following definitions come from winbindd/winbindd_wins.c  */
     
    494449                                        struct winbindd_cli_state *state);
    495450
    496 struct rpc_pipe_client *wbint_rpccli_create(TALLOC_CTX *mem_ctx,
    497                                             struct winbindd_domain *domain,
    498                                             struct winbindd_child *child);
     451struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
     452                                                struct winbindd_domain *domain,
     453                                                struct winbindd_child *child);
    499454enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
    500455                                          struct winbindd_cli_state *state);
     
    513468NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
    514469                                 struct winbindd_response *response);
     470
     471struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
     472                                            struct tevent_context *ev,
     473                                            struct winbindd_cli_state *cli,
     474                                            struct winbindd_request *request);
     475NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
     476                                  struct winbindd_response *response);
    515477
    516478struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
     
    847809                                           struct winbindd_response *presp);
    848810
    849 struct tevent_req *winbindd_set_mapping_send(TALLOC_CTX *mem_ctx,
    850                                              struct tevent_context *ev,
    851                                              struct winbindd_cli_state *cli,
    852                                              struct winbindd_request *request);
    853 NTSTATUS winbindd_set_mapping_recv(struct tevent_req *req,
    854                                    struct winbindd_response *response);
    855 
    856 struct tevent_req *winbindd_remove_mapping_send(TALLOC_CTX *mem_ctx,
    857                                                 struct tevent_context *ev,
    858                                                 struct winbindd_cli_state *cli,
    859                                                 struct winbindd_request *request);
    860 NTSTATUS winbindd_remove_mapping_recv(struct tevent_req *req,
    861                                       struct winbindd_response *response);
    862 
    863 struct tevent_req *winbindd_set_hwm_send(TALLOC_CTX *mem_ctx,
    864                                          struct tevent_context *ev,
    865                                          struct winbindd_cli_state *cli,
    866                                          struct winbindd_request *request);
    867 NTSTATUS winbindd_set_hwm_recv(struct tevent_req *req,
    868                                struct winbindd_response *response);
     811struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
     812                                          struct tevent_context *ev,
     813                                          struct winbindd_cli_state *cli,
     814                                          struct winbindd_request *request);
     815NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
     816                                struct winbindd_response *response);
     817
     818struct tevent_req *winbindd_pam_auth_crap_send(
     819        TALLOC_CTX *mem_ctx,
     820        struct tevent_context *ev,
     821        struct winbindd_cli_state *cli,
     822        struct winbindd_request *request);
     823NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
     824                                     struct winbindd_response *response);
     825
     826struct tevent_req *winbindd_pam_chauthtok_send(
     827        TALLOC_CTX *mem_ctx,
     828        struct tevent_context *ev,
     829        struct winbindd_cli_state *cli,
     830        struct winbindd_request *request);
     831NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
     832                                     struct winbindd_response *response);
     833
     834struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
     835                                            struct tevent_context *ev,
     836                                            struct winbindd_cli_state *cli,
     837                                            struct winbindd_request *request);
     838NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
     839                                  struct winbindd_response *response);
     840
     841struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
     842        TALLOC_CTX *mem_ctx,
     843        struct tevent_context *ev,
     844        struct winbindd_cli_state *cli,
     845        struct winbindd_request *request);
     846NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
     847        struct tevent_req *req,
     848        struct winbindd_response *response);
     849
     850struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
     851                                      struct tevent_context *ev,
     852                                      struct dom_sid *sids,
     853                                      uint32_t num_sids);
     854NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
     855                            struct lsa_RefDomainList **domains,
     856                            struct lsa_TransNameArray **names);
     857
     858struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
     859                                              struct tevent_context *ev,
     860                                              struct winbindd_cli_state *cli,
     861                                              struct winbindd_request *request);
     862NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
     863                                    struct winbindd_response *response);
     864
     865
     866/* The following definitions come from winbindd/winbindd_samr.c  */
     867
     868NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
     869                                 struct winbindd_domain *domain,
     870                                 struct rpc_pipe_client **samr_pipe,
     871                                 struct policy_handle *samr_domain_hnd);
    869872
    870873#endif /*  _WINBINDD_PROTO_H_  */
Note: See TracChangeset for help on using the changeset viewer.