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

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified vendor/current/source4/smb_server/smb_samba3.c

    r414 r740  
    4040        char *argv[2];
    4141        char *reason;
    42         extern char **environ;
    4342
    4443        close(0);
     
    5150        }
    5251
    53         prog = lp_parm_string(conn->lp_ctx, NULL, "samba3", "smbd");
     52        prog = lpcfg_parm_string(conn->lp_ctx, NULL, "samba3", "smbd");
    5453
    5554        if (prog == NULL) {
     
    6665        argv[1] = NULL;
    6766
    68         execve(argv[0], argv, environ);
     67        execv(argv[0], argv);
    6968
    7069        /*
     
    8887  setup a listening socket on all the SMB ports for a particular address
    8988*/
    90 static NTSTATUS samba3_add_socket(struct tevent_context *event_context,
     89static NTSTATUS samba3_add_socket(struct task_server *task,
     90                                  struct tevent_context *event_context,
    9191                                  struct loadparm_context *lp_ctx,
    9292                                  const struct model_ops *model_ops,
    9393                                  const char *address)
    9494{
    95         const char **ports = lp_smb_ports(lp_ctx);
     95        const char **ports = lpcfg_smb_ports(lp_ctx);
    9696        int i;
    9797        NTSTATUS status;
     
    100100                uint16_t port = atoi(ports[i]);
    101101                if (port == 0) continue;
    102                 status = stream_setup_socket(event_context, lp_ctx,
     102                status = stream_setup_socket(task, event_context, lp_ctx,
    103103                                             model_ops, &samba3_smb_stream_ops,
    104104                                             "ip", address, &port,
    105                                              lp_socket_options(lp_ctx),
     105                                             lpcfg_socket_options(lp_ctx),
    106106                                             NULL);
    107107                NT_STATUS_NOT_OK_RETURN(status);
     
    120120        const struct model_ops *model_ops;
    121121
    122         model_ops = process_model_startup(task->event_ctx, "standard");
     122        model_ops = process_model_startup("standard");
    123123
    124124        if (model_ops == NULL) {
     
    128128        task_server_set_title(task, "task[samba3_smb]");
    129129
    130         if (lp_interfaces(task->lp_ctx)
    131             && lp_bind_interfaces_only(task->lp_ctx)) {
     130        if (lpcfg_interfaces(task->lp_ctx)
     131            && lpcfg_bind_interfaces_only(task->lp_ctx)) {
    132132                int num_interfaces;
    133133                int i;
    134134                struct interface *ifaces;
    135135
    136                 load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
     136                load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
    137137
    138138                num_interfaces = iface_count(ifaces);
     
    144144                for(i = 0; i < num_interfaces; i++) {
    145145                        const char *address = iface_n_ip(ifaces, i);
    146                         status = samba3_add_socket(task->event_ctx,
     146                        status = samba3_add_socket(task,
     147                                                   task->event_ctx,
    147148                                                   task->lp_ctx,
    148149                                                   model_ops, address);
     
    150151                }
    151152        } else {
    152                 /* Just bind to lp_socket_address() (usually 0.0.0.0) */
    153                 status = samba3_add_socket(task->event_ctx, task->lp_ctx,
     153                /* Just bind to lpcfg_socket_address() (usually 0.0.0.0) */
     154                status = samba3_add_socket(task,
     155                                           task->event_ctx, task->lp_ctx,
    154156                                           model_ops,
    155                                            lp_socket_address(task->lp_ctx));
     157                                           lpcfg_socket_address(task->lp_ctx));
    156158                if (!NT_STATUS_IS_OK(status)) goto failed;
    157159        }
Note: See TracChangeset for help on using the changeset viewer.