1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

47 Commits

Author SHA1 Message Date
Andrew Bartlett
f7a657721a A couple of coding syle updates to follow the re-indent.
(This used to be commit 7417d6f931)
2002-01-13 12:37:01 +00:00
Andrew Bartlett
fef35c5ce0 Re-indent these two functions to make it actually possible to understand their
contents...

Andrew Bartlett
(This used to be commit e20d69d518)
2002-01-13 12:33:42 +00:00
Andrew Bartlett
0d1ecbbb73 I'm doing some things towards the NamedPipes game with lckl and he has asked me
to move this from being a static to matching its mate in lib/util_sock.c.

In any case, this should discorage anybody from using the 'wrong' version of
this function.  (ie the one from TNG, which needs a bit more error checking
depending on use).

Andrew Bartlett
(This used to be commit e6a3a01f79)
2002-01-13 11:13:54 +00:00
Andrew Tridgell
93d458c5f6 fixed warnings on irix and crash bug on big endian machines
(This used to be commit cc6c263993)
2001-12-20 10:02:30 +00:00
Andrew Tridgell
ad2974cd05 added "net join" command
this completes the first stage of the smbd ADS support
(This used to be commit 058a5aee90)
2001-11-24 14:16:41 +00:00
Tim Potter
0c8ef48479 Removed unused function.
(This used to be commit ef06de2a1c)
2001-10-24 00:36:49 +00:00
Tim Potter
7cd889f566 Converted a bunch of 0x85 constants to SMBkeepalive.
(This used to be commit b16a15a13e)
2001-10-20 23:34:40 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Gerald Carter
2c4d1d39b1 OpenSSL merge from 2.2
(This used to be commit efc6df5a39)
2001-09-26 17:29:53 +00:00
Andrew Tridgell
5366c4c542 added a new global option "hostname lookups = yes/no"
This should finally kill off the remaining places where we
attempt reverse lookups of the IP of the client. It may be that some
pam modules called via the session code will need "hostname lookups = yes"
but I've left it off by default as most sites don't need it and so
many sites have broken reverse maps
(This used to be commit 2b83ad0396)
2001-09-13 00:30:47 +00:00
Andrew Tridgell
1f07993900 fixed typo
(This used to be commit 2d1829dfd0)
2001-08-28 01:28:01 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Jeremy Allison
cee2b0dc2c bzero is not used (deprecated) as it's a BSDism.
Syscalls must check for -1, not < 0 (POSIX).
Formating (tab) fixups.
Jeremy.
(This used to be commit 7263949584)
2001-08-26 19:11:33 +00:00
Christopher R. Hertel
1beb3867fb 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.
(This used to be commit 3031e7acdc)
2001-08-26 04:16:51 +00:00
Herb Lewis
18d3c23e36 get rid of old debug code and possible socket leak
(This used to be commit f942397d65)
2001-08-24 01:49:23 +00:00
Andrew Tridgell
c45fbe69f5 better error reporting for servers that don't do port 445
(This used to be commit a896dc299e)
2001-08-23 16:25:57 +00:00
Andrew Tridgell
575e609c3b 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
(This used to be commit a83d506e5c)
2001-07-10 02:53:48 +00:00
Andrew Tridgell
61e6d867c4 use alpha_strcpy on DNS names
(This used to be commit f6f9e95dd9)
2001-07-05 04:44:09 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
b470d157cd fixed socketpair_tcp for OpenBSD
(This used to be commit d99ce6a5e3)
2001-07-03 03:56:49 +00:00
Jeremy Allison
8f91108faf Syncup between 2.2 and HEAD.
Jeremy.
(This used to be commit 39d4131a45)
2001-06-27 17:26:29 +00:00
Andrew Tridgell
5ac133bac7 on sco2 socketpair_tcp needs a bind
(This used to be commit d8e5409ebb)
2001-06-27 13:58:44 +00:00
Andrew Tridgell
c6f647dfd9 handle EISCONN in socketpair_tcp
this should get the auto-tests working on IRIX
(This used to be commit 87f90d48d8)
2001-06-27 10:44:14 +00:00
Andrew Tridgell
8b79a473fa - 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
(This used to be commit 55109a7525)
2001-06-25 00:46:34 +00:00
Andrew Tridgell
868d010aa1 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.
(This used to be commit 7e8e6ae9a8)
2001-06-22 15:14:45 +00:00
Tim Potter
7b01c627c6 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.
(This used to be commit 720fea5360)
2001-06-18 05:42:18 +00:00
Jeremy Allison
f63ee18c68 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
(This used to be commit 1b3977c536)
2001-06-09 01:38:54 +00:00
Jeremy Allison
e8e07a26eb Changes to use new genrand code that got missed while I was in Japan.
Jeremy.
(This used to be commit 5a15831b9a)
2001-06-06 22:04:26 +00:00
Jeremy Allison
9ff6634db9 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.
(This used to be commit 19145bae72)
2001-05-24 19:28:22 +00:00
Tim Potter
9051f1e2c7 Bumped up debug level on set socket options from 3 to 5.
(This used to be commit f0b8ff4eeb)
2001-05-10 00:35:24 +00:00
Jeremy Allison
81275cbcf7 Print socket options - patch from Dave Collier-Brown @ Sun.
Jeremy.
(This used to be commit c18d6f8701)
2000-10-06 21:12:25 +00:00
Andrew Tridgell
8843a6379d 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.
(This used to be commit b28cc4163b)
2000-06-11 05:57:58 +00:00
Andrew Tridgell
612682354f - got rid of the "passive" option
- cleaned up the standard_sub_*() calls a lot
(This used to be commit 2c2d95d77d)
2000-04-19 04:01:16 +00:00
Andrew Tridgell
e52431f70a use interpret_addr2() instead of inet_aton()
(This used to be commit f65c6ec6db)
2000-04-14 04:34:08 +00:00
Andrew Tridgell
2fa922611b 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.
(This used to be commit 5937ab14d2)
2000-04-11 13:55:53 +00:00
Jeremy Allison
8b45838ffc Added support for SO_REUSEPORT for systems that have it.
Jeremy.
(This used to be commit 377515cf96)
2000-02-16 22:48:19 +00:00
Luke Leighton
fbd17c8daf simple mods to add msrpc pipe redirection. default behaviour: fall back
to using internal msrpc code in smbd.
(This used to be commit 8976e26d46)
2000-01-03 19:19:48 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
a0ba234cf9 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!!!
(This used to be commit 2245b0c6d1)
1999-12-06 00:44:32 +00:00
Luke Leighton
854f35e20f created create_pipe_socket() function.
(This used to be commit a3af3b4312)
1999-12-05 00:13:17 +00:00
Luke Leighton
f521205cb3 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).
(This used to be commit d923bc8da2)
1999-12-04 19:14:37 +00:00
Luke Leighton
6ddfc68e04 sys_select added one more argument (read, write selectors).
(This used to be commit e4d92ff9df)
1999-12-01 02:15:14 +00:00
Luke Leighton
7f8f5e15bd bertl <bs@niggard.org> patch for making samba listen on port 445, just like
nt 5 does.  cool!
(This used to be commit 727e1421b2)
1999-09-08 19:37:45 +00:00
Luke Leighton
f221bfa4ac debug info display (netbios layer).
(This used to be commit 5c974cc4a4)
1999-08-18 20:10:12 +00:00
Jeremy Allison
8fc1504ff8 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.
(This used to be commit 4c2b5a0098)
1998-11-13 21:41:01 +00:00
Jeremy Allison
2164685b9f 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.
(This used to be commit b62f008974)
1998-11-13 02:07:07 +00:00
Luke Leighton
748fe7a383 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
(This used to be commit 373f60256f)
1998-11-09 16:40:38 +00:00