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/lib/netapi/share.c

    r596 r745  
    2424#include "lib/netapi/netapi_private.h"
    2525#include "lib/netapi/libnetapi.h"
    26 #include "../librpc/gen_ndr/cli_srvsvc.h"
     26#include "../librpc/gen_ndr/c.h"
    2727
    2828/****************************************************************
     
    183183        WERROR werr;
    184184        NTSTATUS status;
    185         struct rpc_pipe_client *pipe_cli = NULL;
    186185        union srvsvc_NetShareInfo info;
     186
    187187
    188188        if (!r->in.buffer) {
     
    200200        }
    201201
    202         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    203                                    &ndr_table_srvsvc.syntax_id,
    204                                    &pipe_cli);
     202        werr = libnetapi_e(ctx, r->in.server_name,
     203                                   &ndr_table_srvsvc.syntax_id,
     204                                );
    205205        if (!W_ERROR_IS_OK(werr)) {
    206206                goto done;
     
    216216        }
    217217
    218         status = rpccli_srvsvc_NetShareAdd(pipe_cli, talloc_tos(),
     218        status = , talloc_tos(),
    219219                                           r->in.server_name,
    220220                                           r->in.level,
     
    222222                                           r->out.parm_err,
    223223                                           &werr);
     224
     225
     226
     227
     228
    224229        if (!W_ERROR_IS_OK(werr)) {
    225230                goto done;
     
    247252        WERROR werr;
    248253        NTSTATUS status;
    249         struct rpc_pipe_client *pipe_cli = NULL;
     254        struct ;
    250255
    251256        if (!r->in.net_name) {
     
    253258        }
    254259
    255         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    256                                    &ndr_table_srvsvc.syntax_id,
    257                                    &pipe_cli);
    258         if (!W_ERROR_IS_OK(werr)) {
    259                 goto done;
    260         }
    261 
    262         status = rpccli_srvsvc_NetShareDel(pipe_cli, talloc_tos(),
     260        werr = libnetapi_e(ctx, r->in.server_name,
     261                                   &ndr_table_srvsvc.syntax_id,
     262                                );
     263        if (!W_ERROR_IS_OK(werr)) {
     264                goto done;
     265        }
     266
     267        status = , talloc_tos(),
    263268                                           r->in.server_name,
    264269                                           r->in.net_name,
     
    291296        WERROR werr;
    292297        NTSTATUS status;
    293         struct rpc_pipe_client *pipe_cli = NULL;
    294298        struct srvsvc_NetShareInfoCtr info_ctr;
    295299        struct srvsvc_NetShareCtr0 ctr0;
     
    297301        struct srvsvc_NetShareCtr2 ctr2;
    298302        uint32_t i;
     303
    299304
    300305        if (!r->out.buffer) {
     
    316321        ZERO_STRUCT(info_ctr);
    317322
    318         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    319                                    &ndr_table_srvsvc.syntax_id,
    320                                    &pipe_cli);
     323        werr = libnetapi_e(ctx, r->in.server_name,
     324                                   &ndr_table_srvsvc.syntax_id,
     325                                );
    321326        if (!W_ERROR_IS_OK(werr)) {
    322327                goto done;
     
    339344        }
    340345
    341         status = rpccli_srvsvc_NetShareEnumAll(pipe_cli, talloc_tos(),
     346        status = , talloc_tos(),
    342347                                               r->in.server_name,
    343348                                               &info_ctr,
     
    346351                                               r->out.resume_handle,
    347352                                               &werr);
    348         if (NT_STATUS_IS_ERR(status)) {
     353        if (!NT_STATUS_IS_OK(status)) {
     354                werr = ntstatus_to_werror(status);
     355                goto done;
     356        }
     357
     358        if (!W_ERROR_IS_OK(werr) && !W_ERROR_EQUAL(werr, WERR_MORE_DATA)) {
    349359                goto done;
    350360        }
     
    371381                if (!NT_STATUS_IS_OK(status)) {
    372382                        werr = ntstatus_to_werror(status);
     383
    373384                }
    374385        }
     
    395406        WERROR werr;
    396407        NTSTATUS status;
    397         struct rpc_pipe_client *pipe_cli = NULL;
    398408        union srvsvc_NetShareInfo info;
    399409        uint32_t num_entries = 0;
     410
    400411
    401412        if (!r->in.net_name || !r->out.buffer) {
     
    417428        }
    418429
    419         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    420                                    &ndr_table_srvsvc.syntax_id,
    421                                    &pipe_cli);
    422         if (!W_ERROR_IS_OK(werr)) {
    423                 goto done;
    424         }
    425 
    426         status = rpccli_srvsvc_NetShareGetInfo(pipe_cli, talloc_tos(),
     430        werr = libnetapi_e(ctx, r->in.server_name,
     431                                   &ndr_table_srvsvc.syntax_id,
     432                                );
     433        if (!W_ERROR_IS_OK(werr)) {
     434                goto done;
     435        }
     436
     437        status = , talloc_tos(),
    427438                                               r->in.server_name,
    428439                                               r->in.net_name,
     
    430441                                               &info,
    431442                                               &werr);
     443
     444
     445
     446
    432447
    433448        if (!W_ERROR_IS_OK(werr)) {
     
    465480        WERROR werr;
    466481        NTSTATUS status;
    467         struct rpc_pipe_client *pipe_cli = NULL;
    468482        union srvsvc_NetShareInfo info;
     483
    469484
    470485        if (!r->in.buffer) {
     
    487502        }
    488503
    489         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    490                                    &ndr_table_srvsvc.syntax_id,
    491                                    &pipe_cli);
     504        werr = libnetapi_e(ctx, r->in.server_name,
     505                                   &ndr_table_srvsvc.syntax_id,
     506                                );
    492507        if (!W_ERROR_IS_OK(werr)) {
    493508                goto done;
     
    503518        }
    504519
    505         status = rpccli_srvsvc_NetShareSetInfo(pipe_cli, talloc_tos(),
     520        status = , talloc_tos(),
    506521                                               r->in.server_name,
    507522                                               r->in.net_name,
     
    510525                                               r->out.parm_err,
    511526                                               &werr);
     527
     528
     529
     530
     531
    512532        if (!W_ERROR_IS_OK(werr)) {
    513533                goto done;
Note: See TracChangeset for help on using the changeset viewer.