mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
parent
0ab3df9c58
commit
5f9abf527a
@ -158,7 +158,8 @@ static void dgm_socket_handler(struct event_context *ev, struct fd_event *fde,
|
|||||||
then operations will use that event context
|
then operations will use that event context
|
||||||
*/
|
*/
|
||||||
struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
|
struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
|
||||||
struct event_context *event_ctx)
|
struct event_context *event_ctx,
|
||||||
|
struct smb_iconv_convenience *iconv_convenience)
|
||||||
{
|
{
|
||||||
struct nbt_dgram_socket *dgmsock;
|
struct nbt_dgram_socket *dgmsock;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
@ -187,7 +188,7 @@ struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
|
|||||||
dgmsock->send_queue = NULL;
|
dgmsock->send_queue = NULL;
|
||||||
dgmsock->incoming.handler = NULL;
|
dgmsock->incoming.handler = NULL;
|
||||||
dgmsock->mailslot_handlers = NULL;
|
dgmsock->mailslot_handlers = NULL;
|
||||||
dgmsock->iconv_convenience = lp_iconv_convenience(global_loadparm);
|
dgmsock->iconv_convenience = iconv_convenience;
|
||||||
|
|
||||||
return dgmsock;
|
return dgmsock;
|
||||||
|
|
||||||
|
@ -93,7 +93,8 @@ NTSTATUS dgram_set_incoming_handler(struct nbt_dgram_socket *dgmsock,
|
|||||||
struct socket_address *),
|
struct socket_address *),
|
||||||
void *private);
|
void *private);
|
||||||
struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
|
struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx,
|
||||||
struct event_context *event_ctx);
|
struct event_context *event_ctx,
|
||||||
|
struct smb_iconv_convenience *);
|
||||||
|
|
||||||
const char *dgram_mailslot_name(struct nbt_dgram_packet *packet);
|
const char *dgram_mailslot_name(struct nbt_dgram_packet *packet);
|
||||||
struct dgram_mailslot_handler *dgram_mailslot_find(struct nbt_dgram_socket *dgmsock,
|
struct dgram_mailslot_handler *dgram_mailslot_find(struct nbt_dgram_socket *dgmsock,
|
||||||
|
@ -73,7 +73,9 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
|
|||||||
|
|
||||||
if (strcmp("0.0.0.0", iface->netmask) != 0) {
|
if (strcmp("0.0.0.0", iface->netmask) != 0) {
|
||||||
/* listen for broadcasts on port 138 */
|
/* listen for broadcasts on port 138 */
|
||||||
bcast_dgmsock = nbt_dgram_socket_init(iface, nbtsrv->task->event_ctx);
|
bcast_dgmsock = nbt_dgram_socket_init(iface,
|
||||||
|
nbtsrv->task->event_ctx,
|
||||||
|
lp_iconv_convenience(nbtsrv->task->lp_ctx));
|
||||||
if (!bcast_dgmsock) {
|
if (!bcast_dgmsock) {
|
||||||
talloc_free(tmp_ctx);
|
talloc_free(tmp_ctx);
|
||||||
return NT_STATUS_NO_MEMORY;
|
return NT_STATUS_NO_MEMORY;
|
||||||
@ -100,7 +102,8 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* listen for unicasts on port 138 */
|
/* listen for unicasts on port 138 */
|
||||||
iface->dgmsock = nbt_dgram_socket_init(iface, nbtsrv->task->event_ctx);
|
iface->dgmsock = nbt_dgram_socket_init(iface, nbtsrv->task->event_ctx,
|
||||||
|
lp_iconv_convenience(nbtsrv->task->lp_ctx));
|
||||||
if (!iface->dgmsock) {
|
if (!iface->dgmsock) {
|
||||||
talloc_free(tmp_ctx);
|
talloc_free(tmp_ctx);
|
||||||
return NT_STATUS_NO_MEMORY;
|
return NT_STATUS_NO_MEMORY;
|
||||||
|
@ -64,7 +64,8 @@ static void netlogon_handler(struct dgram_mailslot_handler *dgmslot,
|
|||||||
static bool nbt_test_netlogon(struct torture_context *tctx)
|
static bool nbt_test_netlogon(struct torture_context *tctx)
|
||||||
{
|
{
|
||||||
struct dgram_mailslot_handler *dgmslot;
|
struct dgram_mailslot_handler *dgmslot;
|
||||||
struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL);
|
struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL,
|
||||||
|
lp_iconv_convenience(tctx->lp_ctx));
|
||||||
struct socket_address *dest;
|
struct socket_address *dest;
|
||||||
const char *myaddress;
|
const char *myaddress;
|
||||||
struct nbt_netlogon_packet logon;
|
struct nbt_netlogon_packet logon;
|
||||||
@ -146,7 +147,8 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
|
|||||||
static bool nbt_test_netlogon2(struct torture_context *tctx)
|
static bool nbt_test_netlogon2(struct torture_context *tctx)
|
||||||
{
|
{
|
||||||
struct dgram_mailslot_handler *dgmslot;
|
struct dgram_mailslot_handler *dgmslot;
|
||||||
struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL);
|
struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL,
|
||||||
|
lp_iconv_convenience(tctx->lp_ctx));
|
||||||
struct socket_address *dest;
|
struct socket_address *dest;
|
||||||
const char *myaddress;
|
const char *myaddress;
|
||||||
struct nbt_netlogon_packet logon;
|
struct nbt_netlogon_packet logon;
|
||||||
@ -255,7 +257,8 @@ static void ntlogon_handler(struct dgram_mailslot_handler *dgmslot,
|
|||||||
static bool nbt_test_ntlogon(struct torture_context *tctx)
|
static bool nbt_test_ntlogon(struct torture_context *tctx)
|
||||||
{
|
{
|
||||||
struct dgram_mailslot_handler *dgmslot;
|
struct dgram_mailslot_handler *dgmslot;
|
||||||
struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL);
|
struct nbt_dgram_socket *dgmsock = nbt_dgram_socket_init(tctx, NULL,
|
||||||
|
lp_iconv_convenience(tctx->lp_ctx));
|
||||||
struct socket_address *dest;
|
struct socket_address *dest;
|
||||||
struct test_join *join_ctx;
|
struct test_join *join_ctx;
|
||||||
struct cli_credentials *machine_credentials;
|
struct cli_credentials *machine_credentials;
|
||||||
|
Loading…
Reference in New Issue
Block a user