Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

Location:
vendor/current/source4/cldap_server
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/cldap_server/cldap_server.c

    r740 r988  
    3535#include "param/param.h"
    3636#include "../lib/tsocket/tsocket.h"
     37#include "libds/common/roles.h"
     38
     39NTSTATUS server_service_cldapd_init(void);
    3740
    3841/*
     
    4649                                       struct cldapd_server);
    4750        struct ldap_SearchRequest *search;
     51
     52        if (in->ldap_msg->type == LDAP_TAG_AbandonRequest) {
     53                DEBUG(10,("Got (and ignoring) CLDAP AbandonRequest from %s.",
     54                          tsocket_address_string(in->src, in)));
     55                talloc_free(in);
     56                return;
     57        }
    4858
    4959        if (in->ldap_msg->type != LDAP_TAG_SearchRequest) {
     
    7989        }
    8090
    81         if (search->num_attributes == 1 &&
    82             strcasecmp(search->attributes[0], "netlogon") == 0) {
    83                 cldapd_netlogon_request(cldap,
    84                                         cldapd,
    85                                         in,
    86                                         in->ldap_msg->messageid,
    87                                         search->tree,
    88                                         in->src);
    89                 talloc_free(in);
    90                 return;
    91         }
    92 
    9391        cldapd_rootdse_request(cldap, cldapd, in,
    9492                               in->ldap_msg->messageid,
     
    115113                                                &socket_address);
    116114        if (ret != 0) {
    117                 status = map_nt_error_from_unix(errno);
     115                status = map_nt_error_from_unix_common(errno);
    118116                DEBUG(0,("invalid address %s:%d - %s:%s\n",
    119117                         address, lpcfg_cldap_port(lp_ctx),
     
    124122        /* listen for unicasts on the CLDAP port (389) */
    125123        status = cldap_socket_init(cldapd,
    126                                    cldapd->task->event_ctx,
    127124                                   socket_address,
    128125                                   NULL,
     
    137134        talloc_free(socket_address);
    138135
    139         cldap_set_incoming_handler(cldapsock, cldapd_request_handler, cldapd);
     136        cldap_set_incoming_handler(cldapsock, cldapd->task->event_ctx,
     137                                   cldapd_request_handler, cldapd);
    140138
    141139        return NT_STATUS_OK;
     
    152150        NTSTATUS status;
    153151
    154         num_interfaces = iface_count(ifaces);
     152        num_interfaces = iface_list_count(ifaces);
    155153
    156154        /* if we are allowing incoming packets from any address, then
    157155           we need to bind to the wildcard address */
    158156        if (!lpcfg_bind_interfaces_only(lp_ctx)) {
    159                 status = cldapd_add_socket(cldapd, lp_ctx, "0.0.0.0");
    160                 NT_STATUS_NOT_OK_RETURN(status);
     157                int num_binds = 0;
     158                char **wcard = iface_list_wildcard(cldapd);
     159                NT_STATUS_HAVE_NO_MEMORY(wcard);
     160                for (i=0; wcard[i]; i++) {
     161                        status = cldapd_add_socket(cldapd, lp_ctx, wcard[i]);
     162                        if (NT_STATUS_IS_OK(status)) {
     163                                num_binds++;
     164                        }
     165                }
     166                talloc_free(wcard);
     167                if (num_binds == 0) {
     168                        return NT_STATUS_INVALID_PARAMETER_MIX;
     169                }
    161170        }
    162171
     
    164173           so that replies always come from the right IP */
    165174        for (i=0; i<num_interfaces; i++) {
    166                 const char *address = talloc_strdup(tmp_ctx, iface_n_ip(ifaces, i));
     175                const char *address = talloc_strdup(tmp_ctx, iface_list_n_ip(ifaces, i));
    167176                status = cldapd_add_socket(cldapd, lp_ctx, address);
    168177                NT_STATUS_NOT_OK_RETURN(status);
     
    183192        struct interface *ifaces;
    184193       
    185         load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
    186 
    187         if (iface_count(ifaces) == 0) {
     194        load_interface_list(task, task->lp_ctx, &ifaces);
     195
     196        if (iface_list_count(ifaces) == 0) {
    188197                task_server_terminate(task, "cldapd: no network interfaces configured", false);
    189198                return;
     
    199208                                      false);
    200209                return;
    201         case ROLE_DOMAIN_CONTROLLER:
     210        case ROLE_ACTIVE_DIRECTORY_DC:
    202211                /* Yes, we want an CLDAP server */
    203212                break;
  • vendor/current/source4/cldap_server/cldap_server.h

    r740 r988  
    3333struct ldap_SearchRequest;
    3434
    35 /* used by netlogon DCE/RPC server */
    36 NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
    37                                          TALLOC_CTX *mem_ctx,
    38                                          const char *domain,
    39                                          const char *netbios_domain,
    40                                          struct dom_sid *domain_sid,
    41                                          const char *domain_guid,
    42                                          const char *user,
    43                                          uint32_t acct_control,
    44                                          const char *src_address,
    45                                          uint32_t version,
    46                                          struct loadparm_context *lp_ctx,
    47                                          struct netlogon_samlogon_response *netlogon,
    48                                          bool fill_on_blank_request);
    49 
    5035#include "cldap_server/proto.h"
  • vendor/current/source4/cldap_server/rootdse.c

    r740 r988  
    159159        reply.result            = &result;
    160160
     161        /* Note: The remoteAddress should rather be set on a ldb request.
     162         * We can set this savely on the context here,
     163         * since cldapd_rootdse_fill operates synchronously. */
     164        ldb_set_opaque(cldapd->samctx, "remoteAddress", src);
     165
    161166        cldapd_rootdse_fill(cldapd, tmp_ctx, search, &reply.response,
    162167                            reply.result);
  • vendor/current/source4/cldap_server/wscript_build

    r740 r988  
    1111
    1212bld.SAMBA_SUBSYSTEM('CLDAPD',
    13         source='netlogon.c rootdse.c',
     13        source='rootdse.c',
    1414        autoproto='proto.h',
    15         deps='LIBCLI_CLDAP ldbsamba'
     15        deps='cli_cldap ldbsamba'
    1616        )
    1717
Note: See TracChangeset for help on using the changeset viewer.