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/serverinfo.c

    r594 r740  
    2424#include "lib/netapi/netapi_private.h"
    2525#include "lib/netapi/libnetapi.h"
    26 #include "libnet/libnet.h"
    27 #include "../librpc/gen_ndr/cli_srvsvc.h"
     26#include "../librpc/gen_ndr/ndr_srvsvc_c.h"
     27#include "lib/smbconf/smbconf.h"
     28#include "lib/smbconf/smbconf_reg.h"
    2829
    2930/****************************************************************
     
    480481                          struct NetServerGetInfo *r)
    481482{
    482         struct rpc_pipe_client *pipe_cli = NULL;
    483483        NTSTATUS status;
    484484        WERROR werr;
    485485        union srvsvc_NetSrvInfo info;
     486
    486487
    487488        if (!r->out.buffer) {
     
    502503        }
    503504
    504         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    505                                    &ndr_table_srvsvc.syntax_id,
    506                                    &pipe_cli);
     505        werr = libnetapi_e(ctx, r->in.server_name,
     506                                   &ndr_table_srvsvc.syntax_id,
     507                                );
    507508        if (!W_ERROR_IS_OK(werr)) {
    508509                goto done;
    509510        }
    510511
    511         status = rpccli_srvsvc_NetSrvGetInfo(pipe_cli, talloc_tos(),
     512        status = , talloc_tos(),
    512513                                             r->in.server_name,
    513514                                             r->in.level,
     
    519520        }
    520521
     522
     523
     524
     525
    521526        status = map_server_info_to_SERVER_INFO_buffer(ctx, r->in.level, &info,
    522527                                                       r->out.buffer);
     
    536541                                      struct NetServerSetInfo *r)
    537542{
    538         WERROR werr;
     543        WERROR werr = WERR_OK;
     544        sbcErr err;
    539545        struct smbconf_ctx *conf_ctx;
    540546        struct srvsvc_NetSrvInfo1005 *info1005;
     
    559565        }
    560566
    561         werr = smbconf_init_reg(ctx, &conf_ctx, NULL);
    562         if (!W_ERROR_IS_OK(werr)) {
    563                 goto done;
    564         }
    565 
    566         werr = smbconf_set_global_parameter(conf_ctx, "server string",
     567        err = smbconf_init_reg(ctx, &conf_ctx, NULL);
     568        if (!SBC_ERROR_IS_OK(err)) {
     569                libnetapi_set_error_string(ctx,
     570                        "Could not initialize backend: %s",
     571                        sbcErrorString(err));
     572                werr = WERR_NO_SUCH_SERVICE;
     573                goto done;
     574        }
     575
     576        err = smbconf_set_global_parameter(conf_ctx, "server string",
    567577                                            info1005->comment);
     578
     579
     580
     581
     582
     583
     584
    568585
    569586 done:
     
    594611                          struct NetServerSetInfo *r)
    595612{
    596         struct rpc_pipe_client *pipe_cli = NULL;
    597613        NTSTATUS status;
    598614        WERROR werr;
    599615        union srvsvc_NetSrvInfo info;
    600 
    601         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    602                                    &ndr_table_srvsvc.syntax_id,
    603                                    &pipe_cli);
     616        struct dcerpc_binding_handle *b;
     617
     618        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
     619                                            &ndr_table_srvsvc.syntax_id,
     620                                            &b);
    604621        if (!W_ERROR_IS_OK(werr)) {
    605622                goto done;
     
    615632        }
    616633
    617         status = rpccli_srvsvc_NetSrvSetInfo(pipe_cli, talloc_tos(),
     634        status = , talloc_tos(),
    618635                                             r->in.server_name,
    619636                                             r->in.level,
     
    636653                      struct NetRemoteTOD *r)
    637654{
    638         struct rpc_pipe_client *pipe_cli = NULL;
    639655        NTSTATUS status;
    640656        WERROR werr;
    641657        struct srvsvc_NetRemoteTODInfo *info = NULL;
    642 
    643         werr = libnetapi_open_pipe(ctx, r->in.server_name,
    644                                    &ndr_table_srvsvc.syntax_id,
    645                                    &pipe_cli);
     658        struct dcerpc_binding_handle *b;
     659
     660        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
     661                                            &ndr_table_srvsvc.syntax_id,
     662                                            &b);
    646663        if (!W_ERROR_IS_OK(werr)) {
    647664                goto done;
    648665        }
    649666
    650         status = rpccli_srvsvc_NetRemoteTOD(pipe_cli, talloc_tos(),
     667        status = , talloc_tos(),
    651668                                            r->in.server_name,
    652669                                            &info,
     
    657674        }
    658675
     676
     677
     678
     679
    659680        *r->out.buffer = (uint8_t *)talloc_memdup(ctx, info,
    660681                          sizeof(struct srvsvc_NetRemoteTODInfo));
Note: See TracChangeset for help on using the changeset viewer.