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/source4/cldap_server/rootdse.c

    r414 r745  
    2222#include "includes.h"
    2323#include <tevent.h>
    24 #include "libcli/ldap/ldap.h"
    25 #include "lib/ldb/include/ldb.h"
    26 #include "lib/ldb/include/ldb_errors.h"
     24#include <ldb.h>
     25#include <ldb_errors.h>
    2726#include "smbd/service_task.h"
    2827#include "cldap_server/cldap_server.h"
     
    3837{
    3938        struct ldap_SearchResEntry *ent = NULL;
    40         struct ldb_dn *basedn;
    4139        struct ldb_result *res = NULL;
    4240        struct ldb_request *lreq;
    43         enum ldb_scope scope = LDB_SCOPE_DEFAULT;
    4441        const char **attrs = NULL;
    4542        const char *errstr = NULL;
    46         int ret = 0;
    47         int ldb_ret = -1;
    48 
    49         basedn = ldb_dn_new(mem_ctx, cldapd->samctx, NULL);
    50         if (basedn == NULL) goto nomem;
    51         scope = LDB_SCOPE_BASE;
     43        int ret = LDAP_SUCCESS, ldb_ret;
    5244
    5345        if (search->num_attributes >= 1) {
     
    6759
    6860        ldb_ret = ldb_build_search_req_ex(&lreq, cldapd->samctx, mem_ctx,
    69                                           basedn, scope,
     61                                          NULL, LDB_SCOPE_BASE,
    7062                                          search->tree, attrs,
    7163                                          NULL,
     
    108100                }
    109101                ent->num_attributes = res->msgs[0]->num_elements;
    110                 ent->attributes = talloc_array(ent, struct ldb_message_element, ent->num_attributes);
     102                ent->attributes = talloc_array(ent, struct ldb_message_element,
     103                                               ent->num_attributes);
    111104                if (ent->attributes == NULL) goto nomem;
    112105                for (j=0; j < ent->num_attributes; j++) {
    113                         ent->attributes[j].name = talloc_steal(ent->attributes, res->msgs[0]->elements[j].name);
     106                        ent->attributes[j].name = talloc_steal(ent->attributes,
     107                                                               res->msgs[0]->elements[j].name);
    114108                        ent->attributes[j].num_values = 0;
    115109                        ent->attributes[j].values = NULL;
     
    124118
    125119reply:
    126         if (ret) {
     120        if (ret != LDAP_SUCCESS) {
    127121                /* nothing ... */
    128122        } else if (ldb_ret == LDB_SUCCESS) {
     
    165159        reply.result            = &result;
    166160
    167         cldapd_rootdse_fill(cldapd, tmp_ctx, search, &reply.response, reply.result);
     161        cldapd_rootdse_fill(cldapd, tmp_ctx, search, &reply.response,
     162                            reply.result);
    168163
    169164        status = cldap_reply_send(cldap, &reply);
Note: See TracChangeset for help on using the changeset viewer.