1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

300 Commits

Author SHA1 Message Date
Jelmer Vernooij
71b4fd9792 r14477: Remove the NOPROTO property - it's no longer used as proto.h is gone.
(This used to be commit 9c37f847d3)
2007-10-10 13:57:30 -05:00
Andrew Tridgell
cd63d287df r14307: fixed dereference of my_address->addr when NULL
(This used to be commit e017246f10)
2007-10-10 13:57:10 -05:00
Stefan Metzmacher
bdfbcf5d8a r13956: make more functions public
metze
(This used to be commit d099282d49)
2007-10-10 13:52:31 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Jelmer Vernooij
57a55df196 r13662: Typo fix, add more public headers
(This used to be commit d98948716f)
2007-10-10 13:52:05 -05:00
Stefan Metzmacher
b156fb83db r12959: hopefully fix bug #3365 this time
metze
(This used to be commit 8fc2b68aa8)
2007-10-10 13:51:12 -05:00
Stefan Metzmacher
c582cb23f7 r12911: try to fix bug #3365
metze
(This used to be commit e70ca698ce)
2007-10-10 13:51:02 -05:00
Andrew Bartlett
f55ea8bb3d r12804: This patch reworks the Samba4 sockets layer to use a socket_address
structure that is more generic than just 'IP/port'.

It now passes make test, and has been reviewed and updated by
metze. (Thankyou *very* much).

This passes 'make test' as well as kerberos use (not currently in the
testsuite).

The original purpose of this patch was to have Samba able to pass a
socket address stucture from the BSD layer into the kerberos routines
and back again.   It also removes nbt_peer_addr, which was being used
for a similar purpose.

It is a large change, but worthwhile I feel.

Andrew Bartlett
(This used to be commit 88198c4881)
2007-10-10 13:49:57 -05:00
Andrew Bartlett
37bc6b5f81 r12728: Revive testparm.
It needs work to not dump defaults from loadparm.c, but otherwise it works.

Andrew Bartlett
(This used to be commit 1260fcf465)
2007-10-10 13:49:46 -05:00
Jelmer Vernooij
bc4aebfaec r12670: Make a couple of dependencies stricter
Re-introduce and use the OUTPUT_TYPE property for MODULEs to force
specific modules to always be included
(This used to be commit f9eede3d40)
2007-10-10 13:49:35 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
46aa296cc9 r12592: Remove some useless dependencies
(This used to be commit ca8db1a0cd)
2007-10-10 13:49:00 -05:00
Jelmer Vernooij
d8e35f8828 r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
(This used to be commit b24f2583ed)
2007-10-10 13:47:45 -05:00
Stefan Metzmacher
bdc2a850da r12239: as we only get error from our events system when we wait for read events,
we need to initialy ask for read events too, otherwise we'll never get an
error back from socket_connect()

metze
(This used to be commit 7d94054d0f)
2007-10-10 13:47:23 -05:00
Andrew Tridgell
111a920fdb r12116: got rid of composite_trigger_done() and composite_trigger_error(), and
instead make the normal composite_done() and composite_error()
functions automatically trigger a delayed callback if the caller has
had no opportunity to setup a async callback

this removes one of the common mistakes in writing a composite function
(This used to be commit f9413ce792)
2007-10-10 13:47:11 -05:00
Andrew Tridgell
93e83f4086 r11823: make the socket_connect_send() context a child of the local state
this fixes a valgrind error
(This used to be commit db9c0887bd)
2007-10-10 13:46:34 -05:00
Andrew Tridgell
eeb093f6a9 r11822: reworked the socket_connect_multi() code so it is built on top of
socket_connect_send() rather than the lower level socket code. Also
simplified the state structures a fair bit, and added name resolution,
fixing a bug where the multi-port connect code did a separate name
resolution for each port being tried.
(This used to be commit 3e6888156c)
2007-10-10 13:46:34 -05:00
Andrew Tridgell
8486606576 r11821: got rid of two more unnecessary variables and made the variable names
a bit more consistent
(This used to be commit 4b6e9c7c97)
2007-10-10 13:46:33 -05:00
Andrew Tridgell
37279b1363 r11820: fixed some problems with the socket socket.c code.
- removed the duplicate calls to socket_connect(), instead creating a
   common function socket_send_connect() used by both code paths

 - fixed some NULL ptr checks (probably was cut-and-paste bugs)

 - ensure we use the result of the name resolution

 - added a few comments

 - use 'fde' for the file description event. The variable name
  'connect_ev' immediately made me think of an event context, not a
  fde. Using common variable name conventions makes code a bit easier
  to read
(This used to be commit 37b73521b4)
2007-10-10 13:46:33 -05:00
Volker Lendecke
b31fe2d42b r11811: Revert 11808, this broke the selftest. No idea why though. Why do we to the
resolve_name if it's not used?

I know this is my code, but I don't understand why it breaks tests.

Volker
(This used to be commit 577a5639d3)
2007-10-10 13:46:31 -05:00
Volker Lendecke
218ea5a5c7 r11808: Fix socket_connect_ev
(This used to be commit 95bd3ffaf7)
2007-10-10 13:46:31 -05:00
Jelmer Vernooij
a4e7bf3a89 r11382: Require number of required M4 macros
Make MODULE handling a bit more like BINARY, LIBRARY and SUBSYSTEM
Add some more PUBLIC_HEADERS
(This used to be commit 875eb8f4cc)
2007-10-10 13:45:29 -05:00
Volker Lendecke
134b2488c8 r11369: Implement socket_connect_multi: Connect to multiple ipv4 tcp ports in
sequence, with a 2-millisecond timeout between firing the syn packets. Build
smbcli_sock_connect_send upon that.

Volker
(This used to be commit 5718df44d9)
2007-10-10 13:45:27 -05:00
Volker Lendecke
d6e070b74a r11274: Start a connection attempt to the DC's port 389. To do this properly, make
socket_connect and ldap_connect properly async.

Volker
(This used to be commit bcc71fc1de)
2007-10-10 13:45:12 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e1030090)
2007-10-10 13:45:06 -05:00
Jelmer Vernooij
f4d590662e r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html)
(This used to be commit 7fffc5c917)
2007-10-10 13:45:03 -05:00
Stefan Metzmacher
cffd522b5c r11052: bring samba4 uptodate with the samba4-winsrepl branch,
before the bad merge

metze
(This used to be commit 471c0ca4ab)
2007-10-10 13:44:43 -05:00
Stefan Metzmacher
2ecb46d595 r11037:
(This used to be commit 6913e33840)
2007-10-10 13:42:33 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
d345bab9c0 r10531: (hopefully) improve detection of socket-related functions in external libraries
(This used to be commit 20a1aba500)
2007-10-10 13:39:02 -05:00
Jelmer Vernooij
e337caeed1 r10509: Some more sconscript fixes. Now getting to link stage for smbclient
(This used to be commit 6df956edba)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
4be0ae794e r10456: More SCons fixes:
- Add framework for fallback generating code
 - Move pread / pwrite replacement functions to libreplace
 - Support pidl builds correctly
 - Support asn1 builds correctly
 - Move OS-specific checks to lib/replace/SConscript
(This used to be commit fbbfad0a1f)
2007-10-10 13:38:48 -05:00
Jelmer Vernooij
b85f7857dc r10452: Couple of small scons updates - ignore .sconsign files
(This used to be commit b2d2b4f233)
2007-10-10 13:38:47 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Jelmer Vernooij
5b02ee9b9d r10336: Add sconscript for a couple more subsystems.
(This used to be commit 59d4450453)
2007-10-10 13:38:29 -05:00
Andrew Tridgell
45f760973d r10200: added a composite_trigger_done() call that allows a composite function
to cause an event to happen immediately. This allows metzes patch for
recognising IPs in resolve_name() to work, and also allows us to
remove some of the other code where we currently do specific checks
for is_ipaddress().
(This used to be commit 9cc000d868)
2007-10-10 13:38:08 -05:00
Andrew Tridgell
1ef362c89d r9705: r9685@blu: tridge | 2005-08-27 19:43:44 +1000
set the backend_name on socket_accept() too
(This used to be commit 10ac273288)
2007-10-10 13:34:52 -05:00
Andrew Tridgell
75c29073ce r9704: r9684@blu: tridge | 2005-08-27 19:38:31 +1000
don't try to call the name resolver on non-ipv4 names!
(This used to be commit 4bb3d36fe6)
2007-10-10 13:34:52 -05:00
Andrew Tridgell
c98c6aa561 r9702: r9680@blu: tridge | 2005-08-27 18:45:08 +1000
- fixed ncacn_ip_tcp to use the generic async name resolution methods,
   so NBT names now work (as requested several times by abartlet!)

 - changed resolve_name() to take an event_context, so it doesn't cause
   the whole process to block

 - cleaned up the talloc_find_parent_bytype() calls to go via a cleaner
   event_context_find() call
(This used to be commit b3d491b210)
2007-10-10 13:34:51 -05:00
Stefan Metzmacher
0bbe88c859 r9110: use printf again
metyze
(This used to be commit 99537d35cb)
2007-10-10 13:31:17 -05:00
Stefan Metzmacher
224a2a62b5 r9106: look for something more usefull in the -lnsl
(this is for solaris)

metze
(This used to be commit f37bb2a838)
2007-10-10 13:31:17 -05:00
Stefan Metzmacher
56c112bbbc r9063: - don't pollute the global $LIBS variable with -ldl
- -lresolve seems to not being needed any more
  (it's actually not used, and the build farm seem to happy with it)

- move socket and netif configure test to seperate files
- don't pollute the global $LIBS variable with -lsocket ...
- actually make use of the -lsocket when needed
  (should fix the solaris build)

metze
(This used to be commit adebd56be6)
2007-10-10 13:31:13 -05:00
Andrew Tridgell
d1291dacbd r8408: its quite common in our code to free up a connection when we get an
error, but sometimes a socket option may then happen on the NULL
socket. This has been handled by the individual libraries up to now,
but its cleaner to centralise it here
(This used to be commit d9864e1f9a)
2007-10-10 13:22:59 -05:00
Love Hörnquist Åstrand
61edb97bdf r8394: Make sure the argument to ctype is*(3) macros are unsigned char as
required by ISO C99.
(This used to be commit 56fd21c806)
2007-10-10 13:20:14 -05:00
Stefan Metzmacher
5d55ee570b r8044: give a better error code
metze
(This used to be commit fdbf822f1c)
2007-10-10 13:19:02 -05:00
Andrew Tridgell
44a04d74cd r7668: - setup HAVE_ILDAP to enable the ildap backend in ldb
- fixed a bug in socket_connect_ev()
(This used to be commit 3f77b879a0)
2007-10-10 13:18:20 -05:00
Andrew Tridgell
11bc3f3589 r7660: improved error handling in socket_connect_ev() (it matters when name
resolution fails)
(This used to be commit 4013c2ddea)
2007-10-10 13:18:18 -05:00
Andrew Tridgell
bab977dad7 r7626: a new ldap client library. Main features are:
- hooked into events system, so requests can be truly async and won't
   interfere with other processing happening at the same time

 - uses NTSTATUS codes for errors (previously errors were mostly
   ignored). In a similar fashion to the DOS error handling, I have
   reserved a range of the NTSTATUS code 32 bit space for LDAP error
   codes, so a function can return a LDAP error code in a NTSTATUS

 - much cleaner packet handling
(This used to be commit 2e3c660b2f)
2007-10-10 13:18:14 -05:00
Andrew Tridgell
b1b134084f r7476: ensure dgram sockets are created non-blocking. As they usually skip
the connect() stage, we were missing this
(This used to be commit f5102b886c)
2007-10-10 13:17:57 -05:00
Andrew Tridgell
1692bbf2e2 r7227: added a socket_pending() call to abstract away the FIONREAD ioctl. It
will be interesting to see if this causes any portability problems, as
it is a less commonly used call.
(This used to be commit f6993db31d)
2007-10-10 13:17:28 -05:00
Andrew Tridgell
e83b74244d r7205: added support for sendto() on unix domain sockets
(This used to be commit 35ef6e3b15)
2007-10-10 13:17:26 -05:00
Jelmer Vernooij
5b18cf2268 r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb899)
2007-10-10 13:16:44 -05:00
Andrew Tridgell
b2584a403c r6562: added support for datagram unix domain sockets in the socket library
(This used to be commit 23b2046dcb)
2007-10-10 13:16:25 -05:00
Jelmer Vernooij
5ae38fb963 r6070: Fix typo's and fallback to "" as default user name if no
other username could be guessed.
(This used to be commit 7fe77cd659)
2007-10-10 13:11:17 -05:00
Andrew Bartlett
63b5ad6d54 r5903: While I can't test IPv6, metze asked me to commit a matching change
for unknown hosts that I just did for IPv4.

Andrew Bartlett
(This used to be commit 7e1d82a200)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
3240f01636 r5898: Handle errors in the 'sync' name and IP address handling code.
Andrew Bartlett
(This used to be commit 6b8b40f73b)
2007-10-10 13:11:07 -05:00
Andrew Tridgell
bed7c9ec32 r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
c7ded5ab0a r5108: the beginnings of a nbtd server for Samba4. Currently just displays
the packets it receives, but it at least shows how the server
structure will work.

To implement it I extended the libcli/nbt/ library to allow for an
incoming packet handler to be registered. That allows the nbt client
library to be used for low level processing of the nbtd server packets.

Other changes:

 - made the socket library always set SO_REUSEADDR when binding to an
   interface, to ensure that restarts of a server don't have to wait
   for a couple of minutes.

 - made the nbt port configurable. Defaults to 137, but other ports
   will be useful for testing.
(This used to be commit 2fedca6adf)
2007-10-10 13:09:23 -05:00
Andrew Tridgell
759da3b915 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
8783aa8ea5 r4831: added udp support to our generic sockets library.
I decided to incorporate the udp support into the socket_ipv4.c
backend (and later in socket_ipv6.c) rather than doing a separate
backend, as so much of the code is shareable. Basically this adds a
socket_sendto() and a socket_recvfrom() call and not much all.

For udp servers, I decided to keep the call as socket_listen(), even
though dgram servers don't actually call listen(). This keeps the API
consistent.

I also added a simple local sockets testsuite in smbtorture,
LOCAL-SOCKET
(This used to be commit 9f12a45a05)
2007-10-10 13:08:59 -05:00
Andrew Tridgell
21aafc3536 r4753: added the ability for the generic socket library to handle async
connect(). This required a small API change (the addition of
a socket_connect_complete() method)
(This used to be commit b787dd166f)
2007-10-10 13:08:50 -05:00
Stefan Metzmacher
ffb8c82424 r4686: cerate a function to create a socket by specifying an socket_ops struct
metze
(This used to be commit 894f402b01)
2007-10-10 13:08:43 -05:00
Jelmer Vernooij
5b397619cc r3753: Have some modules default to "NOT" and enable them again when
their dependencies are found
(This used to be commit 8e7e98ae5f)
2007-10-10 13:05:51 -05:00
Jelmer Vernooij
8e16d8a76f r3733: More build system fixes/features:
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure
 - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities)
(This used to be commit 64826da834)
2007-10-10 13:05:47 -05:00
Jelmer Vernooij
71db46ea66 r3586: Fix some of the issues with the module init functions.
Both subsystems and modules can now have init functions, which can be
specified in .mk files (INIT_FUNCTION = ...)

The build system will define :
 - SUBSYSTEM_init_static_modules that calls the init functions of all statically compiled modules. Failing to load will generate an error which is not fatal
 - BINARY_init_subsystems that calls the init functions (if defined) for the subsystems the binary depends on

This removes the hack with the "static bool Initialised = " and the
"lazy_init" functions
(This used to be commit 7a8244761b)
2007-10-10 13:05:36 -05:00
Andrew Tridgell
e8e94a93b5 r3482: fixed a warning and an error from the IRIX 6.4 build
(This used to be commit 8ec3cf8b2b)
2007-10-10 13:05:20 -05:00
Andrew Tridgell
5011f901aa r3457: s_addr is a macro on solaris, so we can't use it in structure names. arrgh.
(This used to be commit 7842b23d01)
2007-10-10 13:05:15 -05:00
Andrew Tridgell
452ddd94ba r3450: portability fixes
- fix rep_inet_ntoa() for IRIX
 - lib/signal.c needs system/wait.h
 - some systems define a macro "accept", which breaks the lib/socket/ structures.
   use fn_ as a prefix for the structure elements to avoid the problem
(This used to be commit ced1a0fcdc)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
26c6b4c70b r3449: more include file reduction
the ldb part isn't ideal, I will have to think of a better solution
(This used to be commit 6b1f86aea8)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
284349482f r3443: the next stage in the include files re-organisation.
I have created the include/system/ directory, which will contain the
wrappers for the system includes for logical subsystems. So far I have
created include/system/kerberos.h and include/system/network.h, which
contain all the system includes for kerberos code and networking code.
These are the included in subsystems that need kerberos or networking
respectively.

Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C
file, instead each C module includes the include/system/XXX.h file for
the logical system support it needs, and the details are kept isolated
in include/system/

This patch also creates a "struct ipv4_addr" which replaces "struct
in_addr" in our code. That avoids every C file needing to import all
the system networking headers.
(This used to be commit 2e25c71853)
2007-10-10 13:05:11 -05:00
Andrew Tridgell
0caeda53d3 r3356: in the standard process model we need to make sure we close all
listening sockets after the fork to prevent the child still listening
on incoming requests.

I have also added an optimisation where we use dup()/close() to lower
the file descriptor number of the new socket to the lowest possible
after closing our listening sockets. This keeps the max fd num passed
to select() low, which makes a difference to the speed of select().
(This used to be commit f2a9bbc317)
2007-10-10 13:05:00 -05:00
Andrew Tridgell
94c0b939c4 r3335: better configure support for ipv6 - thanks to a quick tutorial from metze
(This used to be commit 76c4ba6d29)
2007-10-10 13:04:56 -05:00
Jelmer Vernooij
08c4d0db0c r3334: Allow disabling IPv6 support using socket:noipv6
(This used to be commit 9c13f42c1f)
2007-10-10 13:04:56 -05:00
Andrew Tridgell
148f07c94b r3333: added configure tests for ipv6 support
(This used to be commit 9794570c6d)
2007-10-10 13:04:56 -05:00
Jelmer Vernooij
bb69e3bbe6 r3329: Add support for IPv6
(This used to be commit d829890124)
2007-10-10 13:04:56 -05:00
Andrew Tridgell
8c752ec861 r3318: generate random STATUS_MORE_ENTRIES errors (1 in 10 packets) as well
as randomly short recv/send when socket:testnonblock is enabled
(This used to be commit 718175a265)
2007-10-10 13:04:53 -05:00
Andrew Tridgell
990d76f7cb r3314: added a option "socket:testnonblock" to the generic socket code. If
you set this option (either on the command line using --option or in
smb.conf) then every socket recv or send will return short by random
amounts. This allows you to test that the non-blocking socket logic in
your code works correctly.

I also removed the flags argument to socket_accept(), and instead made
the new socket inherit the flags of the old socket, which makes more
sense to me.
(This used to be commit 406d356e69)
2007-10-10 13:04:53 -05:00
Andrew Tridgell
34cd0662f0 r3313: in socket_accept() make the new socket non-blocking unless SOCKET_FLAG_BLOCK is set.
(This used to be commit a2d92aa431)
2007-10-10 13:04:53 -05:00
Andrew Tridgell
c6888da148 r3304: changed the API to lib/socket/ a little.
The main change is to make socket_recv() take a pre-allocated buffer,
rather than allocating one itself. This allows non-blocking users of
this API to avoid a memcpy(). As a result our messaging code is now
about 10% faster, and the ncacn_ip_tcp and ncalrpc code is also
faster.

The second change was to remove the unused mem_ctx argument from
socket_send(). Having it there implied that memory could be allocated,
which meant the caller had to worry about freeing that memory (if for
example it is sending in a tight loop using the same memory
context). Removing that unused argument keeps life simpler for users.
(This used to be commit a16e4756cd)
2007-10-10 13:04:52 -05:00
Andrew Tridgell
93c32f81e2 r3300: initialise *sendlen on failure, to allow for callers to check only for
NT_STATUS_IS_ERR()
(This used to be commit 80a109de84)
2007-10-10 13:04:51 -05:00
Andrew Tridgell
1f6fd130a3 r3279: Removed MSG_DONTWAIT flags as many platform don't have it.
If a socket is non-blocking then adding MSG_DONTWAIT is pointless (it
does nothing), so all we lose is the ability to set non-blocking on a
packet-by-packet basis, which is not a very useful thing to have
anyway

if the socket is blocking then the code already adds MSG_WAITALL, so
MSG_DONTWAIT is also not needed in that case.
(This used to be commit b8a2afae67)
2007-10-10 13:04:49 -05:00
Andrew Tridgell
9d055846f2 r3278: - rewrote the client side rpc connection code to use lib/socket/
rather than doing everything itself. This greatly simplifies the
  code, although I really don't like the socket_recv() interface (it
  always allocates memory for you, which means an extra memcpy in this
  code)

- fixed several bugs in the socket_ipv4.c code, in particular client
  side code used a non-blocking connect but didn't handle EINPROGRESS,
  so it had no chance of working. Also fixed the error codes, using
  map_nt_error_from_unix()

- cleaned up and expanded map_nt_error_from_unix()

- changed interpret_addr2() to not take a mem_ctx. It makes absolutely
  no sense to allocate a fixed size 4 byte structure like this. Dozens
  of places in the code were also using interpret_addr2() incorrectly
  (precisely because the allocation made no sense)
(This used to be commit 7f2c771b0e)
2007-10-10 13:04:49 -05:00
Andrew Tridgell
6b280c1300 r3184: don't setup socket options on unix domain sockets (our smb.conf socket options are really meant for tcp)
(This used to be commit 238febb008)
2007-10-10 13:04:38 -05:00
Andrew Tridgell
75ed4f7cc4 r3183: moved the unlink of the messaging unixdom socket to the messaging destructor
(This used to be commit ab222b236a)
2007-10-10 13:04:37 -05:00
Jelmer Vernooij
d164190deb r3169: unlink() is called on the listening unix socket every time a child process
exits. Commenting it out until we have a clean way of doing this.
(This used to be commit fa0760dd5f)
2007-10-10 13:02:29 -05:00
Andrew Tridgell
b071fe60d7 r3020: better error handling in socket_unix
(This used to be commit 64514ff5b7)
2007-10-10 12:59:58 -05:00
Andrew Tridgell
6591a22614 r3016: - converted the events code to talloc
- added the new messaging system, based on unix domain sockets. It
  gets over 10k messages/second on my laptop without any socket
  cacheing, which is better than I expected.

- added a LOCAL-MESSAGING torture test
(This used to be commit 3af06478da)
2007-10-10 12:59:57 -05:00
Andrew Tridgell
844de2b65c r3015: fixed typo noticed by abartlett
(This used to be commit b367209a9f)
2007-10-10 12:59:57 -05:00
Andrew Tridgell
f42402da83 r3013: added support for unix domain sockets in the generic socket library. I
will shortly be using this for a rewrite of the intra-smbd messaging
library, which is needed to get lock timeouts working properly (and
share modes, oplocks etc)
(This used to be commit 6f4926d846)
2007-10-10 12:59:57 -05:00
Andrew Tridgell
5b44130afa r2671: we're getting too many errors caused by the talloc_realloc() API not
taking a context (so when you pass a NULL pointer you end up with
memory in a top level context). Fixed it by changing the API to take a
context. The context is only used if the pointer you are reallocing is
NULL.
(This used to be commit 8dc23821c9)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
764eddb696 r2646: - use a talloc destructor to ensure that sockets from the new socket
library are closed on abnormal termination

- convert the service.h structures to the new talloc methods
(This used to be commit 2dc334a328)
2007-10-10 12:59:16 -05:00
Andrew Tridgell
223e78990a r2628: got rid of some warnings and converted a few more places to use hierarchical memory allocation
(This used to be commit 26da45a801)
2007-10-10 12:59:14 -05:00
Andrew Tridgell
5abd7f8f5f r2622: to implement the SOCKET_FLAG_BLOCK option in the socket library we
need to add MSG_WAITALL to the recv() flags. This is needed by the
current server code or sometimes it will fail with a receive error.
(This used to be commit 4cb11fb77a)
2007-10-10 12:59:13 -05:00
Andrew Tridgell
fe45888e22 r2581: added "hosts allow" and "hosts deny" checking in smbd. I needed this
as my box keeps getting hit by viruses spreading on my companies
internal network, which screws up my debug log badly (sigh).

metze, I'm not sure if you think access.c should go in the socket
library or not. It is closely tied to the socket functions, but you
may prefer it separate.

The access.c code is a port from Samba3, but with some cleanups to
make it (slighly) less ugly.
(This used to be commit 058b2fd99e)
2007-10-10 12:59:07 -05:00
Stefan Metzmacher
e8d2442517 r2446: implement socket_get_<peer|my>_<addr|port>() for ipv4
metze
(This used to be commit a8ebb5c5bc)
2007-10-10 12:58:54 -05:00
Stefan Metzmacher
be61c9d877 r2439: - function that return just an int don't need a TALLOC_CTX
- fix some return and state bugs

metze
(This used to be commit 2757c593ab)
2007-10-10 12:58:53 -05:00
Stefan Metzmacher
bc6d0b0f0f r2365: remove MSG_NOSIGNAL
metze
(This used to be commit 8ade8ab65f)
2007-10-10 12:58:46 -05:00
Stefan Metzmacher
498ea8485f r2343: - make socket_get_*_addr() return char * not const char *
- add some error mappings
- use some flags SOCKET_FLAG_PEEK ans SOCKET_FLAG_BLOCK

metze
(This used to be commit a375c6b0b1)
2007-10-10 12:58:45 -05:00
Stefan Metzmacher
ce694e7051 r2328: add the start of a new system and protocol
independent socket library.

this is not used, but compiled currently

there're maybe some api changes later...

metze
(This used to be commit de4447d7a5)
2007-10-10 12:58:44 -05:00