svn commit: samba r26310 - in branches/SAMBA_4_0: .
source/heimdal/lib/asn1 source/libcli/dgram
source/nbt_server/dgram source/rpc_server
source/rpc_server/common source/rpc_server/netlogon
source/torture/nbt
jelmer at samba.org
jelmer at samba.org
Thu Dec 6 16:36:55 GMT 2007
Author: jelmer
Date: 2007-12-06 16:36:54 +0000 (Thu, 06 Dec 2007)
New Revision: 26310
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26310
Log:
Remove more uses of global_loadparm.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/heimdal/lib/asn1/lex.c
branches/SAMBA_4_0/source/libcli/dgram/libdgram.h
branches/SAMBA_4_0/source/libcli/dgram/netlogon.c
branches/SAMBA_4_0/source/libcli/dgram/ntlogon.c
branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c
branches/SAMBA_4_0/source/nbt_server/dgram/ntlogon.c
branches/SAMBA_4_0/source/rpc_server/common/server_info.c
branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
branches/SAMBA_4_0/source/torture/nbt/query.c
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/SAMBA_4_0/source/heimdal/lib/asn1/lex.c
===================================================================
--- branches/SAMBA_4_0/source/heimdal/lib/asn1/lex.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/heimdal/lib/asn1/lex.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -343,6 +343,9 @@
typedef int yy_state_type;
extern int yylineno;
+
+int yylineno = 1;
+
extern char *yytext;
#define yytext_ptr yytext
@@ -849,7 +852,7 @@
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 @@
#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 @@
#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 @@
/* 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 @@
/** 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 @@
/* 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 @@
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.
Modified: branches/SAMBA_4_0/source/libcli/dgram/libdgram.h
===================================================================
--- branches/SAMBA_4_0/source/libcli/dgram/libdgram.h 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/libcli/dgram/libdgram.h 2007-12-06 16:36:54 UTC (rev 26310)
@@ -123,6 +123,7 @@
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 @@
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,
Modified: branches/SAMBA_4_0/source/libcli/dgram/netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/dgram/netlogon.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/libcli/dgram/netlogon.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -62,6 +62,7 @@
*/
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 @@
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);
Modified: branches/SAMBA_4_0/source/libcli/dgram/ntlogon.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/dgram/ntlogon.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/libcli/dgram/ntlogon.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -63,6 +63,7 @@
*/
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 @@
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,
Modified: branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -87,6 +87,7 @@
dgram_mailslot_netlogon_reply(reply_iface->dgmsock,
packet,
+ lp_netbios_name(global_loadparm),
netlogon->req.pdc.mailslot_name,
&reply);
}
@@ -210,6 +211,7 @@
dgram_mailslot_netlogon_reply(reply_iface->dgmsock,
packet,
+ lp_netbios_name(global_loadparm),
netlogon->req.pdc2.mailslot_name,
&reply);
}
Modified: branches/SAMBA_4_0/source/nbt_server/dgram/ntlogon.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/dgram/ntlogon.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/nbt_server/dgram/ntlogon.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -61,6 +61,7 @@
dgram_mailslot_ntlogon_reply(reply_iface->dgmsock,
packet,
+ lp_netbios_name(global_loadparm),
ntlogon->req.logon.mailslot_name,
&reply);
}
Modified: branches/SAMBA_4_0/source/rpc_server/common/server_info.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/common/server_info.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/rpc_server/common/server_info.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -118,7 +118,7 @@
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 {
Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -486,7 +486,7 @@
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 @@
}
/* 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 @@
}
/* 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;
Modified: branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -92,7 +92,8 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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);
Modified: branches/SAMBA_4_0/source/torture/nbt/query.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/query.c 2007-12-06 16:26:56 UTC (rev 26309)
+++ branches/SAMBA_4_0/source/torture/nbt/query.c 2007-12-06 16:36:54 UTC (rev 26310)
@@ -62,7 +62,7 @@
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;
More information about the samba-cvs
mailing list