summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/negprot.c52
-rw-r--r--source4/smb_server/smb/receive.c6
-rw-r--r--source4/smb_server/smb/service.c2
-rw-r--r--source4/smb_server/smb/sesssetup.c2
-rw-r--r--source4/smb_server/smb/signing.c4
-rw-r--r--source4/smb_server/smb/trans2.c18
-rw-r--r--source4/smb_server/smb2/negprot.c8
-rw-r--r--source4/smb_server/smb2/receive.c2
-rw-r--r--source4/smb_server/smb_samba3.c16
-rw-r--r--source4/smb_server/smb_server.c20
10 files changed, 65 insertions, 65 deletions
diff --git a/source4/smb_server/smb/negprot.c b/source4/smb_server/smb/negprot.c
index fe6cd68f6e..656da4df20 100644
--- a/source4/smb_server/smb/negprot.c
+++ b/source4/smb_server/smb/negprot.c
@@ -88,7 +88,7 @@ this any more it probably doesn't matter
****************************************************************************/
static void reply_coreplus(struct smbsrv_request *req, uint16_t choice)
{
- uint16_t raw = (lp_readraw(req->smb_conn->lp_ctx)?1:0) | (lp_writeraw(req->smb_conn->lp_ctx)?2:0);
+ uint16_t raw = (lpcfg_readraw(req->smb_conn->lp_ctx)?1:0) | (lpcfg_writeraw(req->smb_conn->lp_ctx)?2:0);
smbsrv_setup_reply(req, 13, 0);
@@ -119,13 +119,13 @@ static void reply_coreplus(struct smbsrv_request *req, uint16_t choice)
****************************************************************************/
static void reply_lanman1(struct smbsrv_request *req, uint16_t choice)
{
- int raw = (lp_readraw(req->smb_conn->lp_ctx)?1:0) | (lp_writeraw(req->smb_conn->lp_ctx)?2:0);
+ int raw = (lpcfg_readraw(req->smb_conn->lp_ctx)?1:0) | (lpcfg_writeraw(req->smb_conn->lp_ctx)?2:0);
int secword=0;
time_t t = req->request_time.tv_sec;
- req->smb_conn->negotiate.encrypted_passwords = lp_encrypted_passwords(req->smb_conn->lp_ctx);
+ req->smb_conn->negotiate.encrypted_passwords = lpcfg_encrypted_passwords(req->smb_conn->lp_ctx);
- if (lp_security(req->smb_conn->lp_ctx) != SEC_SHARE)
+ if (lpcfg_security(req->smb_conn->lp_ctx) != SEC_SHARE)
secword |= NEGOTIATE_SECURITY_USER_LEVEL;
if (req->smb_conn->negotiate.encrypted_passwords)
@@ -142,7 +142,7 @@ static void reply_lanman1(struct smbsrv_request *req, uint16_t choice)
SSVAL(req->out.vwv, VWV(0), choice);
SSVAL(req->out.vwv, VWV(1), secword);
SSVAL(req->out.vwv, VWV(2), req->smb_conn->negotiate.max_recv);
- SSVAL(req->out.vwv, VWV(3), lp_maxmux(req->smb_conn->lp_ctx));
+ SSVAL(req->out.vwv, VWV(3), lpcfg_maxmux(req->smb_conn->lp_ctx));
SSVAL(req->out.vwv, VWV(4), 1);
SSVAL(req->out.vwv, VWV(5), raw);
SIVAL(req->out.vwv, VWV(6), req->smb_conn->connection->server_id.id);
@@ -177,13 +177,13 @@ static void reply_lanman1(struct smbsrv_request *req, uint16_t choice)
****************************************************************************/
static void reply_lanman2(struct smbsrv_request *req, uint16_t choice)
{
- int raw = (lp_readraw(req->smb_conn->lp_ctx)?1:0) | (lp_writeraw(req->smb_conn->lp_ctx)?2:0);
+ int raw = (lpcfg_readraw(req->smb_conn->lp_ctx)?1:0) | (lpcfg_writeraw(req->smb_conn->lp_ctx)?2:0);
int secword=0;
time_t t = req->request_time.tv_sec;
- req->smb_conn->negotiate.encrypted_passwords = lp_encrypted_passwords(req->smb_conn->lp_ctx);
+ req->smb_conn->negotiate.encrypted_passwords = lpcfg_encrypted_passwords(req->smb_conn->lp_ctx);
- if (lp_security(req->smb_conn->lp_ctx) != SEC_SHARE)
+ if (lpcfg_security(req->smb_conn->lp_ctx) != SEC_SHARE)
secword |= NEGOTIATE_SECURITY_USER_LEVEL;
if (req->smb_conn->negotiate.encrypted_passwords)
@@ -196,7 +196,7 @@ static void reply_lanman2(struct smbsrv_request *req, uint16_t choice)
SSVAL(req->out.vwv, VWV(0), choice);
SSVAL(req->out.vwv, VWV(1), secword);
SSVAL(req->out.vwv, VWV(2), req->smb_conn->negotiate.max_recv);
- SSVAL(req->out.vwv, VWV(3), lp_maxmux(req->smb_conn->lp_ctx));
+ SSVAL(req->out.vwv, VWV(3), lpcfg_maxmux(req->smb_conn->lp_ctx));
SSVAL(req->out.vwv, VWV(4), 1);
SSVAL(req->out.vwv, VWV(5), raw);
SIVAL(req->out.vwv, VWV(6), req->smb_conn->connection->server_id.id);
@@ -211,7 +211,7 @@ static void reply_lanman2(struct smbsrv_request *req, uint16_t choice)
get_challenge(req->smb_conn, req->out.data);
}
- req_push_str(req, NULL, lp_workgroup(req->smb_conn->lp_ctx), -1, STR_TERMINATE);
+ req_push_str(req, NULL, lpcfg_workgroup(req->smb_conn->lp_ctx), -1, STR_TERMINATE);
if (req->smb_conn->signing.mandatory_signing) {
smbsrv_terminate_connection(req->smb_conn,
@@ -233,8 +233,8 @@ static void reply_nt1_orig(struct smbsrv_request *req)
req->out.ptr += 8;
SCVAL(req->out.vwv+1, VWV(16), 8);
}
- req_push_str(req, NULL, lp_workgroup(req->smb_conn->lp_ctx), -1, STR_UNICODE|STR_TERMINATE|STR_NOALIGN);
- req_push_str(req, NULL, lp_netbios_name(req->smb_conn->lp_ctx), -1, STR_UNICODE|STR_TERMINATE|STR_NOALIGN);
+ req_push_str(req, NULL, lpcfg_workgroup(req->smb_conn->lp_ctx), -1, STR_UNICODE|STR_TERMINATE|STR_NOALIGN);
+ req_push_str(req, NULL, lpcfg_netbios_name(req->smb_conn->lp_ctx), -1, STR_UNICODE|STR_TERMINATE|STR_NOALIGN);
DEBUG(3,("not using extended security (SPNEGO or NTLMSSP)\n"));
}
@@ -257,24 +257,24 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice)
CAP_NT_FIND | CAP_LOCK_AND_READ |
CAP_LEVEL_II_OPLOCKS | CAP_NT_SMBS | CAP_RPC_REMOTE_APIS;
- req->smb_conn->negotiate.encrypted_passwords = lp_encrypted_passwords(req->smb_conn->lp_ctx);
+ req->smb_conn->negotiate.encrypted_passwords = lpcfg_encrypted_passwords(req->smb_conn->lp_ctx);
/* do spnego in user level security if the client
supports it and we can do encrypted passwords */
if (req->smb_conn->negotiate.encrypted_passwords &&
- (lp_security(req->smb_conn->lp_ctx) != SEC_SHARE) &&
- lp_use_spnego(req->smb_conn->lp_ctx) &&
+ (lpcfg_security(req->smb_conn->lp_ctx) != SEC_SHARE) &&
+ lpcfg_use_spnego(req->smb_conn->lp_ctx) &&
(req->flags2 & FLAGS2_EXTENDED_SECURITY)) {
negotiate_spnego = true;
capabilities |= CAP_EXTENDED_SECURITY;
}
- if (lp_unix_extensions(req->smb_conn->lp_ctx)) {
+ if (lpcfg_unix_extensions(req->smb_conn->lp_ctx)) {
capabilities |= CAP_UNIX;
}
- if (lp_large_readwrite(req->smb_conn->lp_ctx)) {
+ if (lpcfg_large_readwrite(req->smb_conn->lp_ctx)) {
capabilities |= CAP_LARGE_READX | CAP_LARGE_WRITEX | CAP_W2K_SMBS;
}
@@ -283,25 +283,25 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice)
capabilities |= CAP_LARGE_FILES;
}
- if (lp_readraw(req->smb_conn->lp_ctx) &&
- lp_writeraw(req->smb_conn->lp_ctx)) {
+ if (lpcfg_readraw(req->smb_conn->lp_ctx) &&
+ lpcfg_writeraw(req->smb_conn->lp_ctx)) {
capabilities |= CAP_RAW_MODE;
}
/* allow for disabling unicode */
- if (lp_unicode(req->smb_conn->lp_ctx)) {
+ if (lpcfg_unicode(req->smb_conn->lp_ctx)) {
capabilities |= CAP_UNICODE;
}
- if (lp_nt_status_support(req->smb_conn->lp_ctx)) {
+ if (lpcfg_nt_status_support(req->smb_conn->lp_ctx)) {
capabilities |= CAP_STATUS32;
}
- if (lp_host_msdfs(req->smb_conn->lp_ctx)) {
+ if (lpcfg_host_msdfs(req->smb_conn->lp_ctx)) {
capabilities |= CAP_DFS;
}
- if (lp_security(req->smb_conn->lp_ctx) != SEC_SHARE) {
+ if (lpcfg_security(req->smb_conn->lp_ctx) != SEC_SHARE) {
secword |= NEGOTIATE_SECURITY_USER_LEVEL;
}
@@ -328,7 +328,7 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice)
this is the one and only SMB packet that is malformed in
the specification - all the command words after the secword
are offset by 1 byte */
- SSVAL(req->out.vwv+1, VWV(1), lp_maxmux(req->smb_conn->lp_ctx));
+ SSVAL(req->out.vwv+1, VWV(1), lpcfg_maxmux(req->smb_conn->lp_ctx));
SSVAL(req->out.vwv+1, VWV(2), 1); /* num vcs */
SIVAL(req->out.vwv+1, VWV(3), req->smb_conn->negotiate.max_recv);
SIVAL(req->out.vwv+1, VWV(5), 0x10000); /* raw size. full 64k */
@@ -518,9 +518,9 @@ void smbsrv_reply_negprot(struct smbsrv_request *req)
for (protocol = 0; supported_protocols[protocol].proto_name; protocol++) {
int i;
- if (supported_protocols[protocol].protocol_level > lp_srv_maxprotocol(req->smb_conn->lp_ctx))
+ if (supported_protocols[protocol].protocol_level > lpcfg_srv_maxprotocol(req->smb_conn->lp_ctx))
continue;
- if (supported_protocols[protocol].protocol_level < lp_srv_minprotocol(req->smb_conn->lp_ctx))
+ if (supported_protocols[protocol].protocol_level < lpcfg_srv_minprotocol(req->smb_conn->lp_ctx))
continue;
for (i = 0; i < protos_count; i++) {
diff --git a/source4/smb_server/smb/receive.c b/source4/smb_server/smb/receive.c
index f58071bf55..c2503efabc 100644
--- a/source4/smb_server/smb/receive.c
+++ b/source4/smb_server/smb/receive.c
@@ -663,12 +663,12 @@ NTSTATUS smbsrv_init_smb_connection(struct smbsrv_connection *smb_conn, struct l
/* this is the size that w2k uses, and it appears to be important for
good performance */
- smb_conn->negotiate.max_recv = lp_max_xmit(lp_ctx);
+ smb_conn->negotiate.max_recv = lpcfg_max_xmit(lp_ctx);
smb_conn->negotiate.zone_offset = get_time_zone(time(NULL));
- smb_conn->config.security = lp_security(lp_ctx);
- smb_conn->config.nt_status_support = lp_nt_status_support(lp_ctx);
+ smb_conn->config.security = lpcfg_security(lp_ctx);
+ smb_conn->config.nt_status_support = lpcfg_nt_status_support(lp_ctx);
status = smbsrv_init_sessions(smb_conn, UINT16_MAX);
NT_STATUS_NOT_OK_RETURN(status);
diff --git a/source4/smb_server/smb/service.c b/source4/smb_server/smb/service.c
index 4d5b6ff462..7be21c14bd 100644
--- a/source4/smb_server/smb/service.c
+++ b/source4/smb_server/smb/service.c
@@ -191,7 +191,7 @@ NTSTATUS smbsrv_tcon_backend(struct smbsrv_request *req, union smb_tcon *con)
con->tconx.out.tid = req->tcon->tid;
con->tconx.out.options = SMB_SUPPORT_SEARCH_BITS | (share_int_option(req->tcon->ntvfs->config, SHARE_CSC_POLICY, SHARE_CSC_POLICY_DEFAULT) << 2);
- if (share_bool_option(req->tcon->ntvfs->config, SHARE_MSDFS_ROOT, SHARE_MSDFS_ROOT_DEFAULT) && lp_host_msdfs(req->smb_conn->lp_ctx)) {
+ if (share_bool_option(req->tcon->ntvfs->config, SHARE_MSDFS_ROOT, SHARE_MSDFS_ROOT_DEFAULT) && lpcfg_host_msdfs(req->smb_conn->lp_ctx)) {
con->tconx.out.options |= SMB_SHARE_IN_DFS;
}
diff --git a/source4/smb_server/smb/sesssetup.c b/source4/smb_server/smb/sesssetup.c
index b61fce0887..7372347e9a 100644
--- a/source4/smb_server/smb/sesssetup.c
+++ b/source4/smb_server/smb/sesssetup.c
@@ -46,7 +46,7 @@ static void sesssetup_common_strings(struct smbsrv_request *req,
(*os) = talloc_asprintf(req, "Unix");
(*lanman) = talloc_asprintf(req, "Samba %s", SAMBA_VERSION_STRING);
(*domain) = talloc_asprintf(req, "%s",
- lp_workgroup(req->smb_conn->lp_ctx));
+ lpcfg_workgroup(req->smb_conn->lp_ctx));
}
static void smbsrv_sesssetup_backend_send(struct smbsrv_request *req,
diff --git a/source4/smb_server/smb/signing.c b/source4/smb_server/smb/signing.c
index 0b5cf56fdb..94ea74681c 100644
--- a/source4/smb_server/smb/signing.c
+++ b/source4/smb_server/smb/signing.c
@@ -82,7 +82,7 @@ bool smbsrv_init_signing(struct smbsrv_connection *smb_conn)
return false;
}
- switch (lp_server_signing(smb_conn->lp_ctx)) {
+ switch (lpcfg_server_signing(smb_conn->lp_ctx)) {
case SMB_SIGNING_OFF:
smb_conn->signing.allow_smb_signing = false;
break;
@@ -99,7 +99,7 @@ bool smbsrv_init_signing(struct smbsrv_connection *smb_conn)
* attacks on communications between us and the
* clients */
- if (lp_server_role(smb_conn->lp_ctx) == ROLE_DOMAIN_CONTROLLER) {
+ if (lpcfg_server_role(smb_conn->lp_ctx) == ROLE_DOMAIN_CONTROLLER) {
smb_conn->signing.allow_smb_signing = true;
smb_conn->signing.mandatory_signing = true;
} else {
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index 42a217d19d..38381fd2c1 100644
--- a/source4/smb_server/smb/trans2.c
+++ b/source4/smb_server/smb/trans2.c
@@ -1215,8 +1215,8 @@ static NTSTATUS dodomain_referral(TALLOC_CTX *ctx,
DATA_BLOB outblob;
enum ndr_err_code ndr_err;
NTSTATUS status;
- const char *dns_domain = lp_dnsdomain(lp_ctx);
- const char *netbios_domain = lp_workgroup(lp_ctx);
+ const char *dns_domain = lpcfg_dnsdomain(lp_ctx);
+ const char *netbios_domain = lpcfg_workgroup(lp_ctx);
struct dfs_referral_resp resp;
struct dfs_referral_type *tab;
struct dfs_referral_type *referral;
@@ -1226,7 +1226,7 @@ static NTSTATUS dodomain_referral(TALLOC_CTX *ctx,
uint32_t current_pos = 0;
TALLOC_CTX *context;
- if (lp_server_role(lp_ctx) != ROLE_DOMAIN_CONTROLLER) {
+ if (lpcfg_server_role(lp_ctx) != ROLE_DOMAIN_CONTROLLER) {
DEBUG(10 ,("Received a domain referral request on a non DC\n"));
return NT_STATUS_INVALID_PARAMETER;
}
@@ -1372,8 +1372,8 @@ static NTSTATUS dodc_or_sysvol_referral(TALLOC_CTX *ctx,
unsigned int num_domain = 1;
enum ndr_err_code ndr_err;
const char *requesteddomain;
- const char *realm = lp_realm(lp_ctx);
- const char *domain = lp_workgroup(lp_ctx);
+ const char *realm = lpcfg_realm(lp_ctx);
+ const char *domain = lpcfg_workgroup(lp_ctx);
const char *site_name = NULL; /* Name of the site where the client is */
char *share = NULL;
bool found = false;
@@ -1387,7 +1387,7 @@ static NTSTATUS dodc_or_sysvol_referral(TALLOC_CTX *ctx,
char *client_addr = NULL;
TALLOC_CTX *context;
- if (lp_server_role(lp_ctx) != ROLE_DOMAIN_CONTROLLER) {
+ if (lpcfg_server_role(lp_ctx) != ROLE_DOMAIN_CONTROLLER) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -1613,7 +1613,7 @@ static NTSTATUS trans2_getdfsreferral(struct smbsrv_request *req,
NTSTATUS status;
lp_ctx = req->tcon->ntvfs->lp_ctx;
- if (!lp_host_msdfs(lp_ctx)) {
+ if (!lpcfg_host_msdfs(lp_ctx)) {
return NT_STATUS_NOT_IMPLEMENTED;
}
@@ -1651,8 +1651,8 @@ static NTSTATUS trans2_getdfsreferral(struct smbsrv_request *req,
return dodomain_referral(op, &dfsreq, ldb, trans, lp_ctx);
}
- realm = lp_realm(lp_ctx);
- nbname = lp_netbios_name(lp_ctx);
+ realm = lpcfg_realm(lp_ctx);
+ nbname = lpcfg_netbios_name(lp_ctx);
fqdn = talloc_asprintf(context, "%s.%s", nbname, realm);
if ((strncasecmp(requestedname+1, nbname, strlen(nbname)) == 0) ||
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c
index 260822f2c5..da60676322 100644
--- a/source4/smb_server/smb2/negprot.c
+++ b/source4/smb_server/smb2/negprot.c
@@ -119,7 +119,7 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2
boot_time = timeval_current(); /* TODO: fix me */
ZERO_STRUCT(io->out);
- switch (lp_server_signing(req->smb_conn->lp_ctx)) {
+ switch (lpcfg_server_signing(req->smb_conn->lp_ctx)) {
case SMB_SIGNING_OFF:
io->out.security_mode = 0;
break;
@@ -135,11 +135,11 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2
}
io->out.dialect_revision = dialect;
io->out.capabilities = 0;
- io->out.max_transact_size = lp_parm_ulong(req->smb_conn->lp_ctx, NULL,
+ io->out.max_transact_size = lpcfg_parm_ulong(req->smb_conn->lp_ctx, NULL,
"smb2", "max transaction size", 0x10000);
- io->out.max_read_size = lp_parm_ulong(req->smb_conn->lp_ctx, NULL,
+ io->out.max_read_size = lpcfg_parm_ulong(req->smb_conn->lp_ctx, NULL,
"smb2", "max read size", 0x10000);
- io->out.max_write_size = lp_parm_ulong(req->smb_conn->lp_ctx, NULL,
+ io->out.max_write_size = lpcfg_parm_ulong(req->smb_conn->lp_ctx, NULL,
"smb2", "max write size", 0x10000);
io->out.system_time = timeval_to_nttime(&current_time);
io->out.server_start_time = timeval_to_nttime(&boot_time);
diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c
index 26995b71ec..40a57b88f1 100644
--- a/source4/smb_server/smb2/receive.c
+++ b/source4/smb_server/smb2/receive.c
@@ -659,7 +659,7 @@ NTSTATUS smbsrv_init_smb2_connection(struct smbsrv_connection *smb_conn)
/* this is the size that w2k uses, and it appears to be important for
good performance */
- smb_conn->negotiate.max_recv = lp_max_xmit(smb_conn->lp_ctx);
+ smb_conn->negotiate.max_recv = lpcfg_max_xmit(smb_conn->lp_ctx);
smb_conn->negotiate.zone_offset = get_time_zone(time(NULL));
diff --git a/source4/smb_server/smb_samba3.c b/source4/smb_server/smb_samba3.c
index 10756396f3..5af2ce5042 100644
--- a/source4/smb_server/smb_samba3.c
+++ b/source4/smb_server/smb_samba3.c
@@ -50,7 +50,7 @@ static void samba3_smb_accept(struct stream_connection *conn)
close(i);
}
- prog = lp_parm_string(conn->lp_ctx, NULL, "samba3", "smbd");
+ prog = lpcfg_parm_string(conn->lp_ctx, NULL, "samba3", "smbd");
if (prog == NULL) {
argv[0] = talloc_asprintf(conn, "%s/%s", dyn_BINDIR, "smbd3");
@@ -92,7 +92,7 @@ static NTSTATUS samba3_add_socket(struct tevent_context *event_context,
const struct model_ops *model_ops,
const char *address)
{
- const char **ports = lp_smb_ports(lp_ctx);
+ const char **ports = lpcfg_smb_ports(lp_ctx);
int i;
NTSTATUS status;
@@ -102,7 +102,7 @@ static NTSTATUS samba3_add_socket(struct tevent_context *event_context,
status = stream_setup_socket(event_context, lp_ctx,
model_ops, &samba3_smb_stream_ops,
"ip", address, &port,
- lp_socket_options(lp_ctx),
+ lpcfg_socket_options(lp_ctx),
NULL);
NT_STATUS_NOT_OK_RETURN(status);
}
@@ -127,13 +127,13 @@ static void samba3_smb_task_init(struct task_server *task)
task_server_set_title(task, "task[samba3_smb]");
- if (lp_interfaces(task->lp_ctx)
- && lp_bind_interfaces_only(task->lp_ctx)) {
+ if (lpcfg_interfaces(task->lp_ctx)
+ && lpcfg_bind_interfaces_only(task->lp_ctx)) {
int num_interfaces;
int i;
struct interface *ifaces;
- load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
+ load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
num_interfaces = iface_count(ifaces);
@@ -149,10 +149,10 @@ static void samba3_smb_task_init(struct task_server *task)
if (!NT_STATUS_IS_OK(status)) goto failed;
}
} else {
- /* Just bind to lp_socket_address() (usually 0.0.0.0) */
+ /* Just bind to lpcfg_socket_address() (usually 0.0.0.0) */
status = samba3_add_socket(task->event_ctx, task->lp_ctx,
model_ops,
- lp_socket_address(task->lp_ctx));
+ lpcfg_socket_address(task->lp_ctx));
if (!NT_STATUS_IS_OK(status)) goto failed;
}
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index b0a37adba0..6ebefc6eba 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -63,7 +63,7 @@ static NTSTATUS smbsrv_recv_generic_request(void *private_data, DATA_BLOB blob)
packet_set_callback(smb_conn->packet, smbsrv_recv_smb_request);
return smbsrv_recv_smb_request(smb_conn, blob);
case SMB2_MAGIC:
- if (lp_srv_maxprotocol(smb_conn->lp_ctx) < PROTOCOL_SMB2) break;
+ if (lpcfg_srv_maxprotocol(smb_conn->lp_ctx) < PROTOCOL_SMB2) break;
status = smbsrv_init_smb2_connection(smb_conn);
NT_STATUS_NOT_OK_RETURN(status);
packet_set_callback(smb_conn->packet, smbsrv_recv_smb2_request);
@@ -157,7 +157,7 @@ static void smbsrv_accept(struct stream_connection *conn)
irpc_add_name(conn->msg_ctx, "smb_server");
- if (!NT_STATUS_IS_OK(share_get_context_by_name(smb_conn, lp_share_backend(smb_conn->lp_ctx),
+ if (!NT_STATUS_IS_OK(share_get_context_by_name(smb_conn, lpcfg_share_backend(smb_conn->lp_ctx),
smb_conn->connection->event.ctx,
smb_conn->lp_ctx, &(smb_conn->share_context)))) {
smbsrv_terminate_connection(smb_conn, "share_init failed!");
@@ -180,17 +180,17 @@ _PUBLIC_ NTSTATUS smbsrv_add_socket(struct tevent_context *event_context,
const struct model_ops *model_ops,
const char *address)
{
- const char **ports = lp_smb_ports(lp_ctx);
+ const char **ports = lpcfg_smb_ports(lp_ctx);
int i;
NTSTATUS status;
for (i=0;ports[i];i++) {
uint16_t port = atoi(ports[i]);
if (port == 0) continue;
- status = stream_setup_socket(event_context, lp_ctx,
+ status = stream_setup_socket(event_context, lp_ctx,
model_ops, &smb_stream_ops,
"ipv4", address, &port,
- lp_socket_options(lp_ctx),
+ lpcfg_socket_options(lp_ctx),
NULL);
NT_STATUS_NOT_OK_RETURN(status);
}
@@ -208,12 +208,12 @@ static void smbsrv_task_init(struct task_server *task)
task_server_set_title(task, "task[smbsrv]");
- if (lp_interfaces(task->lp_ctx) && lp_bind_interfaces_only(task->lp_ctx)) {
+ if (lpcfg_interfaces(task->lp_ctx) && lpcfg_bind_interfaces_only(task->lp_ctx)) {
int num_interfaces;
int i;
struct interface *ifaces;
- load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
+ load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
num_interfaces = iface_count(ifaces);
@@ -227,9 +227,9 @@ static void smbsrv_task_init(struct task_server *task)
if (!NT_STATUS_IS_OK(status)) goto failed;
}
} else {
- /* Just bind to lp_socket_address() (usually 0.0.0.0) */
- status = smbsrv_add_socket(task->event_ctx, task->lp_ctx, task->model_ops,
- lp_socket_address(task->lp_ctx));
+ /* Just bind to lpcfg_socket_address() (usually 0.0.0.0) */
+ status = smbsrv_add_socket(task->event_ctx, task->lp_ctx, task->model_ops,
+ lpcfg_socket_address(task->lp_ctx));
if (!NT_STATUS_IS_OK(status)) goto failed;
}