finally got sick of the "extern int Client" code and the stupid
authorAndrew Tridgell <tridge@samba.org>
Tue, 11 Apr 2000 13:55:53 +0000 (13:55 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 11 Apr 2000 13:55:53 +0000 (13:55 +0000)
commit5937ab14d222696e40a3fc6f0e6a536f2d7305d3
treec55cd00dbbc16ffb66f21c2ee286c0bb7f16934f
parent707401fc1e697362cdaadcfaac4edc964b80b1a0
finally got sick of the "extern int Client" code and the stupid
assumption that we have one socket everywhere

while doing so I discovered a few bugs!

1) the clientgen session retarget code if used from smbd or nmbd would
cause a crash as it called close_sockets() which closed our main
socket! fixed by removing close_sockets() completely - it is unnecessary

2) the caching in client_addr() and client_name() was bogus - it could
easily get fooled and give the wrong result. fixed.

3) the retarget could could recurse, allowing an easy denial of
service attack on nmbd. fixed.
19 files changed:
source/lib/access.c
source/lib/util.c
source/lib/util_sock.c
source/libsmb/clientgen.c
source/nmbd/nmbd.c
source/rpc_server/srv_netlog.c
source/smbd/blocking.c
source/smbd/connection.c
source/smbd/ipc.c
source/smbd/nttrans.c
source/smbd/oplock.c
source/smbd/password.c
source/smbd/process.c
source/smbd/reply.c
source/smbd/server.c
source/smbd/service.c
source/smbd/ssl.c
source/smbd/trans2.c
source/web/cgi.c