Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/lib/netapi/netlogon.c

    r594 r740  
    2020#include "includes.h"
    2121
     22
    2223#include "librpc/gen_ndr/libnetapi.h"
    2324#include "lib/netapi/netapi.h"
    2425#include "lib/netapi/netapi_private.h"
    2526#include "lib/netapi/libnetapi.h"
    26 #include "../librpc/gen_ndr/cli_netlogon.h"
    2727
    2828static WERROR construct_data(enum netr_LogonControlCode function_code,
     
    4444                data_out->debug_level = atoi((const char *)data_in);
    4545                break;
     46
     47
     48
    4649        default:
    4750                return WERR_INVALID_PARAM;
     
    127130        WERROR werr;
    128131        NTSTATUS status;
    129         struct rpc_pipe_client *pipe_cli = NULL;
    130132        union netr_CONTROL_QUERY_INFORMATION query;
    131 
    132         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    133                                    &ndr_table_netlogon.syntax_id,
    134                                    &pipe_cli);
    135         if (!W_ERROR_IS_OK(werr)) {
    136                 goto done;
    137         }
    138 
    139         status = rpccli_netr_LogonControl(pipe_cli, talloc_tos(),
     133        struct dcerpc_binding_handle *b;
     134
     135        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
     136                                            &ndr_table_netlogon.syntax_id,
     137                                            &b);
     138        if (!W_ERROR_IS_OK(werr)) {
     139                goto done;
     140        }
     141
     142        status = dcerpc_netr_LogonControl(b, talloc_tos(),
    140143                                          r->in.server_name,
    141144                                          r->in.function_code,
     
    147150                goto done;
    148151        }
     152
     153
     154
    149155
    150156        werr = construct_buffer(ctx, r->in.query_level, &query,
     
    175181        WERROR werr;
    176182        NTSTATUS status;
    177         struct rpc_pipe_client *pipe_cli = NULL;
    178183        union netr_CONTROL_DATA_INFORMATION data;
    179184        union netr_CONTROL_QUERY_INFORMATION query;
     185
    180186
    181187        werr = construct_data(r->in.function_code, r->in.data, &data);
     
    184190        }
    185191
    186         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    187                                    &ndr_table_netlogon.syntax_id,
    188                                    &pipe_cli);
     192        werr = libnetapi_e(ctx, r->in.server_name,
     193                                   &ndr_table_netlogon.syntax_id,
     194                                );
    189195        if (!W_ERROR_IS_OK(werr)) {
    190196                goto done;
     
    194200        case NETLOGON_CONTROL_TC_VERIFY:
    195201        case NETLOGON_CONTROL_SET_DBFLAG:
    196                 status = rpccli_netr_LogonControl2Ex(pipe_cli, talloc_tos(),
     202        case NETLOGON_CONTROL_FORCE_DNS_REG:
     203                status = dcerpc_netr_LogonControl2Ex(b, talloc_tos(),
    197204                                                     r->in.server_name,
    198205                                                     r->in.function_code,
     
    203210                break;
    204211        default:
    205                 status = rpccli_netr_LogonControl2(pipe_cli, talloc_tos(),
     212                status = , talloc_tos(),
    206213                                                   r->in.server_name,
    207214                                                   r->in.function_code,
     
    213220        }
    214221
    215         if (!W_ERROR_IS_OK(werr)) {
    216                 goto done;
    217         }
    218 
    219222        if (!NT_STATUS_IS_OK(status)) {
    220223                werr = ntstatus_to_werror(status);
     
    222225        }
    223226
     227
     228
     229
     230
    224231        werr = construct_buffer(ctx, r->in.query_level, &query,
    225232                                r->out.buffer);
Note: See TracChangeset for help on using the changeset viewer.