summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/heimdal/lib/asn1/lex.c32
-rw-r--r--source4/libcli/dgram/libdgram.h2
-rw-r--r--source4/libcli/dgram/netlogon.c3
-rw-r--r--source4/libcli/dgram/ntlogon.c3
-rw-r--r--source4/nbt_server/dgram/netlogon.c2
-rw-r--r--source4/nbt_server/dgram/ntlogon.c1
-rw-r--r--source4/rpc_server/common/server_info.c2
-rw-r--r--source4/rpc_server/dcerpc_server.c6
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c18
-rw-r--r--source4/torture/nbt/query.c2
10 files changed, 53 insertions, 18 deletions
diff --git a/source4/heimdal/lib/asn1/lex.c b/source4/heimdal/lib/asn1/lex.c
index 638b182d13..86c4359f1a 100644
--- a/source4/heimdal/lib/asn1/lex.c
+++ b/source4/heimdal/lib/asn1/lex.c
@@ -343,6 +343,9 @@ FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern int yylineno;
+
+int yylineno = 1;
+
extern char *yytext;
#define yytext_ptr yytext
@@ -849,7 +852,7 @@ static unsigned lineno = 1;
static void unterminated(const char *, unsigned);
/* This is for broken old lexes (solaris 10 and hpux) */
-#line 852 "heimdal/lib/asn1/lex.c"
+#line 855 "heimdal/lib/asn1/lex.c"
#define INITIAL 0
@@ -1004,7 +1007,7 @@ YY_DECL
#line 68 "lex.l"
-#line 1007 "heimdal/lib/asn1/lex.c"
+#line 1010 "heimdal/lib/asn1/lex.c"
if ( !(yy_init) )
{
@@ -1673,7 +1676,7 @@ YY_RULE_SETUP
#line 274 "lex.l"
ECHO;
YY_BREAK
-#line 1676 "heimdal/lib/asn1/lex.c"
+#line 1679 "heimdal/lib/asn1/lex.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1904,7 +1907,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ (yy_n_chars), (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -2405,7 +2408,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
+ * @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
@@ -2483,6 +2486,15 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
/** Get the input stream.
*
*/
@@ -2516,6 +2528,16 @@ char *yyget_text (void)
return yytext;
}
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void yyset_lineno (int line_number )
+{
+
+ yylineno = line_number;
+}
+
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
diff --git a/source4/libcli/dgram/libdgram.h b/source4/libcli/dgram/libdgram.h
index 9f67d58ae2..6d4cdb2bdf 100644
--- a/source4/libcli/dgram/libdgram.h
+++ b/source4/libcli/dgram/libdgram.h
@@ -123,6 +123,7 @@ NTSTATUS dgram_mailslot_netlogon_send(struct nbt_dgram_socket *dgmsock,
struct nbt_netlogon_packet *request);
NTSTATUS dgram_mailslot_netlogon_reply(struct nbt_dgram_socket *dgmsock,
struct nbt_dgram_packet *request,
+ const char *my_netbios_name,
const char *mailslot_name,
struct nbt_netlogon_packet *reply);
NTSTATUS dgram_mailslot_netlogon_parse(struct dgram_mailslot_handler *dgmslot,
@@ -138,6 +139,7 @@ NTSTATUS dgram_mailslot_ntlogon_send(struct nbt_dgram_socket *dgmsock,
struct nbt_ntlogon_packet *request);
NTSTATUS dgram_mailslot_ntlogon_reply(struct nbt_dgram_socket *dgmsock,
struct nbt_dgram_packet *request,
+ const char *my_netbios_name,
const char *mailslot_name,
struct nbt_ntlogon_packet *reply);
NTSTATUS dgram_mailslot_ntlogon_parse(struct dgram_mailslot_handler *dgmslot,
diff --git a/source4/libcli/dgram/netlogon.c b/source4/libcli/dgram/netlogon.c
index f89c2c5644..92a66cddff 100644
--- a/source4/libcli/dgram/netlogon.c
+++ b/source4/libcli/dgram/netlogon.c
@@ -62,6 +62,7 @@ NTSTATUS dgram_mailslot_netlogon_send(struct nbt_dgram_socket *dgmsock,
*/
NTSTATUS dgram_mailslot_netlogon_reply(struct nbt_dgram_socket *dgmsock,
struct nbt_dgram_packet *request,
+ const char *my_netbios_name,
const char *mailslot_name,
struct nbt_netlogon_packet *reply)
{
@@ -79,7 +80,7 @@ NTSTATUS dgram_mailslot_netlogon_reply(struct nbt_dgram_socket *dgmsock,
return ndr_map_error2ntstatus(ndr_err);
}
- make_nbt_name_client(&myname, lp_netbios_name(global_loadparm));
+ make_nbt_name_client(&myname, my_netbios_name);
dest = socket_address_from_strings(tmp_ctx, dgmsock->sock->backend_name,
request->src_addr, request->src_port);
diff --git a/source4/libcli/dgram/ntlogon.c b/source4/libcli/dgram/ntlogon.c
index b4b548fb27..8cd69176a5 100644
--- a/source4/libcli/dgram/ntlogon.c
+++ b/source4/libcli/dgram/ntlogon.c
@@ -63,6 +63,7 @@ NTSTATUS dgram_mailslot_ntlogon_send(struct nbt_dgram_socket *dgmsock,
*/
NTSTATUS dgram_mailslot_ntlogon_reply(struct nbt_dgram_socket *dgmsock,
struct nbt_dgram_packet *request,
+ const char *my_netbios_name,
const char *mailslot_name,
struct nbt_ntlogon_packet *reply)
{
@@ -80,7 +81,7 @@ NTSTATUS dgram_mailslot_ntlogon_reply(struct nbt_dgram_socket *dgmsock,
return ndr_map_error2ntstatus(ndr_err);
}
- make_nbt_name_client(&myname, lp_netbios_name(global_loadparm));
+ make_nbt_name_client(&myname, my_netbios_name);
dest = socket_address_from_strings(tmp_ctx,
dgmsock->sock->backend_name,
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index 153d3ccfdd..5f0c81f94e 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -87,6 +87,7 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
dgram_mailslot_netlogon_reply(reply_iface->dgmsock,
packet,
+ lp_netbios_name(global_loadparm),
netlogon->req.pdc.mailslot_name,
&reply);
}
@@ -210,6 +211,7 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
dgram_mailslot_netlogon_reply(reply_iface->dgmsock,
packet,
+ lp_netbios_name(global_loadparm),
netlogon->req.pdc2.mailslot_name,
&reply);
}
diff --git a/source4/nbt_server/dgram/ntlogon.c b/source4/nbt_server/dgram/ntlogon.c
index ce1f725038..942fc77b98 100644
--- a/source4/nbt_server/dgram/ntlogon.c
+++ b/source4/nbt_server/dgram/ntlogon.c
@@ -61,6 +61,7 @@ static void nbtd_ntlogon_sam_logon(struct dgram_mailslot_handler *dgmslot,
dgram_mailslot_ntlogon_reply(reply_iface->dgmsock,
packet,
+ lp_netbios_name(global_loadparm),
ntlogon->req.logon.mailslot_name,
&reply);
}
diff --git a/source4/rpc_server/common/server_info.c b/source4/rpc_server/common/server_info.c
index aa8dd7cc33..cf46954c33 100644
--- a/source4/rpc_server/common/server_info.c
+++ b/source4/rpc_server/common/server_info.c
@@ -118,7 +118,7 @@ _PUBLIC_ uint32_t dcesrv_common_get_server_type(TALLOC_CTX *mem_ctx, struct dces
break;
}
/* open main ldb */
- samctx = samdb_connect(tmp_ctx, global_loadparm, anonymous_session(tmp_ctx, dce_ctx->lp_ctx));
+ samctx = samdb_connect(tmp_ctx, dce_ctx->lp_ctx, anonymous_session(tmp_ctx, dce_ctx->lp_ctx));
if (samctx == NULL) {
DEBUG(2,("Unable to open samdb in determining server announce flags\n"));
} else {
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index f5576c5a6c..256f20ed54 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -486,7 +486,7 @@ static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32_t reason)
NTSTATUS status;
/* setup a bind_nak */
- dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm));
+ dcesrv_init_hdr(&pkt, lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_BIND_NAK;
@@ -596,7 +596,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
}
/* setup a bind_ack */
- dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm));
+ dcesrv_init_hdr(&pkt, lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_BIND_ACK;
@@ -752,7 +752,7 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call)
}
/* setup a alter_resp */
- dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm));
+ dcesrv_init_hdr(&pkt, lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx));
pkt.auth_length = 0;
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_ALTER_RESP;
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index d7f9fdde3d..0ddc11c8b8 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -92,7 +92,8 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca
return NT_STATUS_ACCESS_DENIED;
}
- sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, global_loadparm));
+ sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx,
+ system_session(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
@@ -233,7 +234,8 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate2(struct dcesrv_call_state *dce_ca
the caller needs some of that information.
*/
-static NTSTATUS dcesrv_netr_creds_server_step_check(const char *computer_name,
+static NTSTATUS dcesrv_netr_creds_server_step_check(struct loadparm_context *lp_ctx,
+ const char *computer_name,
TALLOC_CTX *mem_ctx,
struct netr_Authenticator *received_authenticator,
struct netr_Authenticator *return_authenticator,
@@ -296,7 +298,8 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet(struct dcesrv_call_state *dce_call
struct ldb_context *sam_ctx;
NTSTATUS nt_status;
- nt_status = dcesrv_netr_creds_server_step_check(r->in.computer_name, mem_ctx,
+ nt_status = dcesrv_netr_creds_server_step_check(dce_call->conn->dce_ctx->lp_ctx,
+ r->in.computer_name, mem_ctx,
&r->in.credential, &r->out.return_authenticator,
&creds);
NT_STATUS_NOT_OK_RETURN(nt_status);
@@ -334,7 +337,8 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal
struct samr_CryptPassword password_buf;
- nt_status = dcesrv_netr_creds_server_step_check(r->in.computer_name, mem_ctx,
+ nt_status = dcesrv_netr_creds_server_step_check(dce_call->conn->dce_ctx->lp_ctx,
+ r->in.computer_name, mem_ctx,
&r->in.credential, &r->out.return_authenticator,
&creds);
NT_STATUS_NOT_OK_RETURN(nt_status);
@@ -583,7 +587,8 @@ static NTSTATUS dcesrv_netr_LogonSamLogonWithFlags(struct dcesrv_call_state *dce
return_authenticator = talloc(mem_ctx, struct netr_Authenticator);
NT_STATUS_HAVE_NO_MEMORY(return_authenticator);
- nt_status = dcesrv_netr_creds_server_step_check(r->in.computer_name, mem_ctx,
+ nt_status = dcesrv_netr_creds_server_step_check(dce_call->conn->dce_ctx->lp_ctx,
+ r->in.computer_name, mem_ctx,
r->in.credential, return_authenticator,
&creds);
NT_STATUS_NOT_OK_RETURN(nt_status);
@@ -879,7 +884,8 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
const char *local_domain;
- status = dcesrv_netr_creds_server_step_check(r->in.computer_name, mem_ctx,
+ status = dcesrv_netr_creds_server_step_check(dce_call->conn->dce_ctx->lp_ctx,
+ r->in.computer_name, mem_ctx,
r->in.credential,
r->out.return_authenticator,
NULL);
diff --git a/source4/torture/nbt/query.c b/source4/torture/nbt/query.c
index c5104f5f06..78210a2a07 100644
--- a/source4/torture/nbt/query.c
+++ b/source4/torture/nbt/query.c
@@ -62,7 +62,7 @@ static bool bench_namequery(struct torture_context *tctx)
io.in.name = name;
io.in.dest_addr = address;
- io.in.dest_port = lp_nbt_port(global_loadparm);
+ io.in.dest_port = lp_nbt_port(tctx->lp_ctx);
io.in.broadcast = false;
io.in.wins_lookup = false;
io.in.timeout = 1;