1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

36 Commits

Author SHA1 Message Date
Andrew Tridgell
1d36250e33 converted another bunch of stuff to NTSTATUS -
Jeremy Allison
7263949584 bzero is not used (deprecated) as it's a BSDism.
Syscalls must check for -1, not < 0 (POSIX).
Formating (tab) fixups.
Jeremy.
-
Christopher R. Hertel
3031e7acdc Fussing with debug lines in open_socket_in(). I cleaned up some slightly
funky code that was simply setting a local int to 0 or 1 and also added
calls to strerror() in some of the debug lines.

The use of the dlevel parameter in this function is a little awkward.
There should probably be some comments about it in the source.
-
Herb Lewis
f942397d65 get rid of old debug code and possible socket leak -
Andrew Tridgell
a896dc299e better error reporting for servers that don't do port 445 -
Andrew Tridgell
a83d506e5c much better handling of broken DNS servers
we no longer lookup our own name when we create a socket in
open_socket_in(). That makes things work much better with the
broken DNS server at VA
-
Andrew Tridgell
f6f9e95dd9 use alpha_strcpy on DNS names -
Andrew Tridgell
c41fc06376 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. -
Andrew Tridgell
d99ce6a5e3 fixed socketpair_tcp for OpenBSD -
Jeremy Allison
39d4131a45 Syncup between 2.2 and HEAD.
Jeremy.
-
Andrew Tridgell
d8e5409ebb on sco2 socketpair_tcp needs a bind -
Andrew Tridgell
87f90d48d8 handle EISCONN in socketpair_tcp
this should get the auto-tests working on IRIX
-
Andrew Tridgell
55109a7525 - make the regresison test mode code build in by default. This should
allow us to have test targets without special configure options
- fixed make proto so that it actually does something
-
Andrew Tridgell
7e8e6ae9a8 added the ability to test smbd safely as an ordinary user. The way it works is
that libsmb/ creates a local tcp socket then launches smbd as a subprocess
attached to that socket. smbd thinks it is being launched from inetd.

to use it do the following:

- compile with -DSMB_REGRESSION_TEST
- run like this (also works with smbtorture etc)
    export SMBD_TEST=1
    export LIBSMB_PROG=bin/smbd
    smbclient //server/share -Uuser%pass

obviously you need to setup a smb.conf etc. Using --prefix to configure
is useful.

The aim of all this stuff is to add a decent set of regression tests
to the build farm, so we know if smbd actually runs correctly on all the
platforms, not just builds. We can run smbtorture, masktest, locktest etc,
plus a bunch of smbclient scripts and any new tests we write.

This doesn't help much with nmbd (at least not yet) but its a good start.
-
Tim Potter
720fea5360 Removed silly Get_Hostbyname() wrapper as DNS names are case-insensitive
and the use of this function only increased timeouts when Samba queries
a broken DNS server.
-
Jeremy Allison
1b3977c536 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
-
Jeremy Allison
5a15831b9a Changes to use new genrand code that got missed while I was in Japan.
Jeremy.
-
Jeremy Allison
19145bae72 Fixup the large_writex problem (a large_writex can send a full 64k of data,
we already have space for this we just need to understand the length correctly).
Jeremy.
-
Tim Potter
f0b8ff4eeb Bumped up debug level on set socket options from 3 to 5. -
Jeremy Allison
c18d6f8701 Print socket options - patch from Dave Collier-Brown @ Sun.
Jeremy.
-
Andrew Tridgell
b28cc4163b Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
-
Andrew Tridgell
2c2d95d77d - got rid of the "passive" option
- cleaned up the standard_sub_*() calls a lot
-
Andrew Tridgell
f65c6ec6db use interpret_addr2() instead of inet_aton() -
Andrew Tridgell
5937ab14d2 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.
-
Jeremy Allison
377515cf96 Added support for SO_REUSEPORT for systems that have it.
Jeremy.
-
Luke Leighton
8976e26d46 simple mods to add msrpc pipe redirection. default behaviour: fall back
to using internal msrpc code in smbd.
-
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch -
Luke Leighton
2245b0c6d1 the first independent msrpc daemon - lsarpcd.
one horrible cut / paste job from smbd, plus a code split of shared
components between the two.

the job is not _yet_ complete, as i need to be able to do a become_user()
call for security reasons.  i picked lsarpcd first because you don't
_need_ security on it (microsoft botched so badly on this one, it's not
real.  at least they fixed this in nt5 with restrictanonymous=0x2).
fixing this involves sending the current smb and unix credentials down
the unix pipe so that the daemon it eventually goes to can pick them
up at the other end.

i can't believe this all worked!!!
-
Luke Leighton
a3af3b4312 created create_pipe_socket() function. -
Luke Leighton
d923bc8da2 jeremy is going to hate me for this.
created an "nmb-agent" utility that, yes: it connects to the 137 socket
and accepts unix socket connections which it redirects onto port 137.

it uses the name_trn_id field to filter requests to the correct
location.

name_query() and name_status() are the first victims to use this
feature (by specifying a file descriptor of -1).
-
Luke Leighton
e4d92ff9df sys_select added one more argument (read, write selectors). -
Luke Leighton
727e1421b2 bertl <bs@niggard.org> patch for making samba listen on port 445, just like
nt 5 does.  cool!
-
Luke Leighton
5c974cc4a4 debug info display (netbios layer). -
Jeremy Allison
4c2b5a0098 Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf.
include/includes.h: Fix YP problem.
include/smb.h: Fix ZERO_STRUCTP.
lib/util_sock.c: Added strerror() in debugs.
passdb/ldap.c: Don't use snprinf, use slprintf.
rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf.
script/installman.sh: DGUX changes.
smbd/open.c smbd/oplock.c: Fixed gcc warnings.
web/swat.c: Changes USER to SWAT_USER.
-
Jeremy Allison
b62f008974 include/smb.h: Re-added zero pointer protection to ZERO_STRUCTP.
lib/util_sock.c: Added strerror() calls to getpeername failures (which seem to be giving IRIX trouble at the moment).
rpc_parse/parse_sec.c: Changed use of ZERO_STRUCTPN to ZERO_STRUCTP which again does zero pointer protection.
smbd/quotas.c: Fixed typo.
Jeremy.
-
Luke Leighton
373f60256f split socket util functions into util_sock.c. util.c NOT committed
and util_sock.c NOT included in Makefile.in.

registry commands added to rpcclient.

waiting for 2_0_0 split before committing modified files.  these files
are new modules, and are not referenced in the Makefile.in
-