diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-13 10:58:48 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-13 10:58:48 +0000 |
commit | d4705378ce88d1bb2f787338c531998d37d078ef (patch) | |
tree | 5c69c190347bd71067203aa89f0e99db4bc50a38 /source4/smbd/process_single.c | |
parent | 8faa77f177833eeee245391840d06771f46e0136 (diff) | |
download | samba-d4705378ce88d1bb2f787338c531998d37d078ef.tar.gz samba-d4705378ce88d1bb2f787338c531998d37d078ef.tar.bz2 samba-d4705378ce88d1bb2f787338c531998d37d078ef.zip |
dcerpc over tcp in the samba4 server now works to some extent. It
needs quite a bit more work to get it finished. The biggest missing
feature is the lack of NTLMSSP which is needed for basic
authentication over tcp
(This used to be commit 9fb0f0369356909c99389e2cbc525be27c08793c)
Diffstat (limited to 'source4/smbd/process_single.c')
-rw-r--r-- | source4/smbd/process_single.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c index e6bb9b6c9c..a19577b3cf 100644 --- a/source4/smbd/process_single.c +++ b/source4/smbd/process_single.c @@ -49,11 +49,32 @@ static void accept_connection(struct event_context *ev, struct fd_event *fde, ti /* create a smb server context and add it to out event handling */ - init_smbsession(ev, model_ops, accepted_fd); + init_smbsession(ev, model_ops, accepted_fd, smbd_read_handler); /* return to event handling */ } + +/* + called when a rpc listening socket becomes readable +*/ +static void accept_rpc_connection(struct event_context *ev, struct fd_event *fde, time_t t, uint16 flags) +{ + int accepted_fd; + struct sockaddr addr; + socklen_t in_addrlen = sizeof(addr); + + /* accept an incoming connection. */ + accepted_fd = accept(fde->fd,&addr,&in_addrlen); + if (accepted_fd == -1) { + DEBUG(0,("accept_connection_single: accept: %s\n", + strerror(errno))); + return; + } + + init_rpc_session(ev, fde->private, accepted_fd); +} + /* called when a SMB connection goes down */ static void terminate_connection(struct server_context *server, const char *reason) { @@ -77,6 +98,7 @@ void process_model_single_init(void) /* fill in all the operations */ ops.model_startup = model_startup; ops.accept_connection = accept_connection; + ops.accept_rpc_connection = accept_rpc_connection; ops.terminate_connection = terminate_connection; ops.exit_server = NULL; ops.get_id = get_id; |