Changeset 740 for vendor/current/source4/smb_server/smb_samba3.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified vendor/current/source4/smb_server/smb_samba3.c ¶
r414 r740 40 40 char *argv[2]; 41 41 char *reason; 42 extern char **environ;43 42 44 43 close(0); … … 51 50 } 52 51 53 prog = lp _parm_string(conn->lp_ctx, NULL, "samba3", "smbd");52 prog = lpcfg_parm_string(conn->lp_ctx, NULL, "samba3", "smbd"); 54 53 55 54 if (prog == NULL) { … … 66 65 argv[1] = NULL; 67 66 68 execv e(argv[0], argv, environ);67 execv(argv[0], argv); 69 68 70 69 /* … … 88 87 setup a listening socket on all the SMB ports for a particular address 89 88 */ 90 static NTSTATUS samba3_add_socket(struct tevent_context *event_context, 89 static NTSTATUS samba3_add_socket(struct task_server *task, 90 struct tevent_context *event_context, 91 91 struct loadparm_context *lp_ctx, 92 92 const struct model_ops *model_ops, 93 93 const char *address) 94 94 { 95 const char **ports = lp _smb_ports(lp_ctx);95 const char **ports = lpcfg_smb_ports(lp_ctx); 96 96 int i; 97 97 NTSTATUS status; … … 100 100 uint16_t port = atoi(ports[i]); 101 101 if (port == 0) continue; 102 status = stream_setup_socket( event_context, lp_ctx,102 status = stream_setup_socket(task, event_context, lp_ctx, 103 103 model_ops, &samba3_smb_stream_ops, 104 104 "ip", address, &port, 105 lp _socket_options(lp_ctx),105 lpcfg_socket_options(lp_ctx), 106 106 NULL); 107 107 NT_STATUS_NOT_OK_RETURN(status); … … 120 120 const struct model_ops *model_ops; 121 121 122 model_ops = process_model_startup( task->event_ctx,"standard");122 model_ops = process_model_startup("standard"); 123 123 124 124 if (model_ops == NULL) { … … 128 128 task_server_set_title(task, "task[samba3_smb]"); 129 129 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)) { 132 132 int num_interfaces; 133 133 int i; 134 134 struct interface *ifaces; 135 135 136 load_interfaces(task, lp _interfaces(task->lp_ctx), &ifaces);136 load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces); 137 137 138 138 num_interfaces = iface_count(ifaces); … … 144 144 for(i = 0; i < num_interfaces; i++) { 145 145 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, 147 148 task->lp_ctx, 148 149 model_ops, address); … … 150 151 } 151 152 } 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, 154 156 model_ops, 155 lp _socket_address(task->lp_ctx));157 lpcfg_socket_address(task->lp_ctx)); 156 158 if (!NT_STATUS_IS_OK(status)) goto failed; 157 159 }
Note:
See TracChangeset
for help on using the changeset viewer.