abartlet/samba.git/.git
16 years agor5300: more uint32 and system/filesys.h build fixes when developer mode is enabled
Andrew Tridgell [Thu, 10 Feb 2005 05:22:53 +0000 (05:22 +0000)]
r5300: more uint32 and system/filesys.h build fixes when developer mode is enabled
(This used to be commit 93931b1a741a3722c311ada80c4c9d3d670f91b2)

16 years agor5299: fixed an include ordering problem
Andrew Tridgell [Thu, 10 Feb 2005 05:15:37 +0000 (05:15 +0000)]
r5299: fixed an include ordering problem
(This used to be commit 483b7af1fd6e3caa1db2f6b31ac6165d29ea7512)

16 years agor5298: - got rid of pstring.h from includes.h. This at least makes it a bit
Andrew Tridgell [Thu, 10 Feb 2005 05:09:35 +0000 (05:09 +0000)]
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 9db6c79e902ec538108d6b7d3324039aabe1704f)

16 years agor5297: ensure pstring is not in the generated prototypes
Andrew Tridgell [Thu, 10 Feb 2005 05:06:41 +0000 (05:06 +0000)]
r5297: ensure pstring is not in the generated prototypes
(This used to be commit b4103d9f2b809408572521f385d4e7a5ba412169)

16 years agor5296: - only include the tdb headers where they are needed
Andrew Tridgell [Thu, 10 Feb 2005 03:48:43 +0000 (03:48 +0000)]
r5296: - only include the tdb headers where they are needed

- removed the u32 hack in events.c as I think this was only needed as
  tdb.h defines u32. Metze, can you check that this hack is indeed no
  longer needed on your suse system?
(This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)

16 years agor5294: - added a separate NBT-WINS test for WINS operations (register, refresh, relea...
Andrew Tridgell [Thu, 10 Feb 2005 03:22:47 +0000 (03:22 +0000)]
r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)

- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr"
  I think that in general we should move towards "const char *" for
  all IP addresses, as this makes IPv6 much easier, and is also easier
  to debug. Andrew, when you get a chance, could you fix some of the
  auth code to use strings for IPs ?

- return a NTSTATUS error on bad name queries and node status instead
  of using rcode. This makes the calling code simpler.

- added low level name release code in libcli/nbt/

- use a real IP in the register and wins nbt torture tests, as w2k3
  WINS server silently rejects some operations that don't come from the
  IP being used (eg. it says "yes" to a release, but does not in fact
  release the name)
(This used to be commit bb1ab11d8e0ea0bd9ae34aebeb565d36fe4b495f)

16 years agor5293: Map an empty policy handle to None when creating policy handles, and
Tim Potter [Thu, 10 Feb 2005 03:19:21 +0000 (03:19 +0000)]
r5293: Map an empty policy handle to None when creating policy handles, and
refuse to accept None as a policy handle when accepting them.  Now we
don't segfault after running the samr_Shutdown() test.
(This used to be commit 2f0419c4d8100864ddddf5629d1808b655da9d76)

16 years agor5292: ensure we cleanup the epoll_fd on event context destruction
Andrew Tridgell [Thu, 10 Feb 2005 03:16:33 +0000 (03:16 +0000)]
r5292: ensure we cleanup the epoll_fd on event context destruction
(This used to be commit e820fca5062026810c5bd4827941f34c19a5e847)

16 years agor5291: fixed ncacn_ip_tcp against windows
Andrew Tridgell [Thu, 10 Feb 2005 01:19:26 +0000 (01:19 +0000)]
r5291: fixed ncacn_ip_tcp against windows
(This used to be commit 8df8308f7f7c937ea8bcbb4336e98911824ece48)

16 years agor5288: Make alignment code more generic
Jelmer Vernooij [Wed, 9 Feb 2005 21:53:25 +0000 (21:53 +0000)]
r5288: Make alignment code more generic
(This used to be commit 5c2f0df566804cf0b8879504f5e41a8100a7fd40)

16 years agor5286: Some first steps in making the pidl code somewhat more generic for the
Jelmer Vernooij [Wed, 9 Feb 2005 21:10:23 +0000 (21:10 +0000)]
r5286: Some first steps in making the pidl code somewhat more generic for the
various data types:

Add ndr_flags argument to all ndr push/pull scalar functions
(This used to be commit ab490c0c882bb13de190546c50a0631ecb8255ad)

16 years agor5285: add a generic dlist_item struct which has a void *ptr for the data
Stefan Metzmacher [Wed, 9 Feb 2005 17:29:09 +0000 (17:29 +0000)]
r5285: add a generic dlist_item struct which has a void *ptr for the data

metze
(This used to be commit 7dbd9e7aab0720c76561b4c9a2d38b82b3a8bfe4)

16 years agor5284: this is needed on my server
Stefan Metzmacher [Wed, 9 Feb 2005 13:51:14 +0000 (13:51 +0000)]
r5284: this is needed on my server

+/* this #undef is needed on my SuSE 9.2 Box with glibc-devel-2.3.3-118 */
+#undef u32

as sys/epoll.h has this:
typedef union epoll_data
{
  void *ptr;
  int fd;
  uint32_t u32;
  uint64_t u64;
} epoll_data_t;

metze
(This used to be commit b4928f3ea8f6530317dfa76593cf93e6acd4337a)

16 years agor5282: merging autogen fixes from 3_0
Gerald Carter [Tue, 8 Feb 2005 22:55:24 +0000 (22:55 +0000)]
r5282: merging autogen fixes from 3_0
(This used to be commit ece7a3918ec33b4b8b61b50277c5a1e484c55e3b)

16 years agor5277: initialise the multi_homed flag in the name registration test
Andrew Tridgell [Tue, 8 Feb 2005 01:10:34 +0000 (01:10 +0000)]
r5277: initialise the multi_homed flag in the name registration test
(This used to be commit d51fcee29a8d8bf253b3a6d0b7b741f9b55af94a)

16 years agor5276: - added support for NBT_OPCODE_REFRESH2 (type 0x9)
Andrew Tridgell [Tue, 8 Feb 2005 01:09:21 +0000 (01:09 +0000)]
r5276: - added support for NBT_OPCODE_REFRESH2 (type 0x9)

- when registering with a WINS server, initially use multi-homed
  registration, then switch to name refresh requests. Send refresh
  requests only to the WINS server that responded to our
  registration. If that server goes away, then start the registration
  from scratch. This makes registration more robust to WINS server
  failure.

- send WINS registration requests out on our first interface rather
  than an unbound interface, to avoid the problem of WACK replies
  being sent to the wrong port (w2k3 WINS server does this)
(This used to be commit f7712ac7468184c07b3e3c10cb7b847ad1791dd2)

16 years agor5275: - added support for NBT_OPCODE_MULTI_HOME_REG (opcode 0xf) for WINS name regis...
Andrew Tridgell [Tue, 8 Feb 2005 01:05:41 +0000 (01:05 +0000)]
r5275: - added support for NBT_OPCODE_MULTI_HOME_REG (opcode 0xf) for WINS name registrations

- fixed a bug in the send queue handling on timeouts

- added support for handling unexpected replies (replies to the wrong
  port) at the nbtsocket layer

- added separate layer 2 code for wins refresh and wins registration
(This used to be commit 2502b02898407e3262c09a5a4aa573c5f87b8f5f)

16 years agor5274: fixed some const warnings by making the str_list_ functions return "const...
Andrew Tridgell [Tue, 8 Feb 2005 01:02:56 +0000 (01:02 +0000)]
r5274: fixed some const warnings by making the str_list_ functions return "const char **"
(This used to be commit 4165f2163530c7d2ffbea2922fbfe942eee85e7a)

16 years agor5273: fixed another bug in the code that keeps timed events
Andrew Tridgell [Tue, 8 Feb 2005 01:01:22 +0000 (01:01 +0000)]
r5273: fixed another bug in the code that keeps timed events
sorted. Hopefully it really works now :-)
(This used to be commit 34e1a3ad7849df913584074ec406c2fcc40212fc)

16 years agor5266: This is a nice typo ;-)
Günther Deschner [Mon, 7 Feb 2005 22:02:05 +0000 (22:02 +0000)]
r5266: This is a nice typo ;-)

Guenther
(This used to be commit 77b99c03b85827a1e70b0de41c8070e38af27374)

16 years agor5261: translate nbt rcode errors to NTSTATUS codes
Andrew Tridgell [Mon, 7 Feb 2005 12:10:38 +0000 (12:10 +0000)]
r5261: translate nbt rcode errors to NTSTATUS codes
(This used to be commit 554d1b70e73faeb1f5ecf88f31c5810d86d76200)

16 years agor5260: - show an error message on nmblookup failure
Andrew Tridgell [Mon, 7 Feb 2005 11:56:34 +0000 (11:56 +0000)]
r5260: - show an error message on nmblookup failure

- always try to enable broadcast on nbt name sockets (this matches
  samba3 behaviour better)
(This used to be commit 919bc14e7bbc04479cf11f7a7fd4c5e46616ef46)

16 years agor5259: make sure we give the ip of the interface that a name query comes in
Andrew Tridgell [Mon, 7 Feb 2005 11:49:55 +0000 (11:49 +0000)]
r5259: make sure we give the ip of the interface that a name query comes in
on as the first IP in a multi-homed reply
(This used to be commit a9128f6544d56a637e28430cbd2907acbb978281)

16 years agor5256: More verbose description of functions (as I learn the code).
Rafal Szczesniak [Sun, 6 Feb 2005 23:06:27 +0000 (23:06 +0000)]
r5256: More verbose description of functions (as I learn the code).

rafal
(This used to be commit 38ac6b8d570fa02bc32899521d42ba7237f77024)

16 years agor5253: need to pre-declare some structures
Andrew Tridgell [Sun, 6 Feb 2005 08:33:22 +0000 (08:33 +0000)]
r5253: need to pre-declare some structures
(This used to be commit a4d44d4a9d7cf51a9a4e47dce8e603ba22324d99)

16 years agor5252: - fixed nmblookup for the nbt api changes
Andrew Tridgell [Sun, 6 Feb 2005 08:27:12 +0000 (08:27 +0000)]
r5252: - fixed nmblookup for the nbt api changes

- added a simple WINS server name registration and query test
(This used to be commit d56e68ebf584e50aa409d22b1ca7c9276abea962)

16 years agor5251: - renamed the nbtd server side structures to have a nbtd_ prefix, to
Andrew Tridgell [Sun, 6 Feb 2005 08:25:53 +0000 (08:25 +0000)]
r5251: - renamed the nbtd server side structures to have a nbtd_ prefix, to
  be consistent with the function names

- added WINS client support to the NBT server. It will do initial WINS
  registration, and WINS refresh, automatically failing over to
  secondary WINS servers and handling multi-homed servers where we need
  to register multiple IPs.

- added support for multi-homed name query replies, which are
  essential for multi-homed registration as the WINS server will query
  us to ensure we have the names when doing the secondary IPs in
  multi-homed registration
(This used to be commit a1553fa8054dc7d33f5d77f8f95d3ffd90392b2a)

16 years agor5250: - added low level support for retrying nbt name queries, rather than
Andrew Tridgell [Sun, 6 Feb 2005 08:22:18 +0000 (08:22 +0000)]
r5250: - added low level support for retrying nbt name queries, rather than
  having the 2nd layer functions do retries themselves. This makes the
  code simpler, and allows the TRN_ID to be reused in the retry (which
  is how it is supposed to work).

- added support for WACK replies to nbt name requests. A WACK reply
  specifies a timeout to wait for the real reply.

- added WINS name refresh async calls, supporting multiple wins
  servers and multiple IPs to register
(This used to be commit 76be35cb990de830c2451d9e48cb2c40a4befdb7)

16 years agor5249: don't include ';' in the default list separators for parsing
Andrew Tridgell [Sun, 6 Feb 2005 08:16:18 +0000 (08:16 +0000)]
r5249: don't include ';' in the default list separators for parsing
smb.conf. It was rarely (if ever?) used, and poses problems as it is
not multi-byte safe for character searches
(This used to be commit 75a6cfb2f6b4ef85cf7e49958cccae9d35c4e5a2)

16 years agor5248: fixed a silly bug in DLIST_ADD_AFTER()
Andrew Tridgell [Sun, 6 Feb 2005 08:14:44 +0000 (08:14 +0000)]
r5248: fixed a silly bug in DLIST_ADD_AFTER()
(This used to be commit e36b6882fdd1bb331f297b3b82bc3621b8ba0586)

16 years agor5247: Fix rpcclient to work with new swig interface.
Tim Potter [Sun, 6 Feb 2005 04:34:29 +0000 (04:34 +0000)]
r5247: Fix rpcclient to work with new swig interface.
(This used to be commit ad12a90d0e0fe7106b1845097d8fc71be3b8e378)

16 years agor5245: Remove dead code.
Tim Potter [Sun, 6 Feb 2005 00:50:55 +0000 (00:50 +0000)]
r5245: Remove dead code.
(This used to be commit 949f31ad2865699da0f3a9e827606abd762b10b7)

16 years agor5244: Convert this module to use the new structure mapping SWIG stuff instead of
Tim Potter [Sun, 6 Feb 2005 00:38:10 +0000 (00:38 +0000)]
r5244: Convert this module to use the new structure mapping SWIG stuff instead of
the old dictionary based routines.  The SAMR connect, close, enumdomains,
opendomain, enum{users,aliases,groups} functions now work again!
(This used to be commit 53b361657fe892ad7b9d781450ad841a6b1072e5)

16 years agor5243: Woohoo - memory leak city! Comment out talloc_free() call until I
Tim Potter [Sun, 6 Feb 2005 00:35:58 +0000 (00:35 +0000)]
r5243: Woohoo - memory leak city!  Comment out talloc_free() call until I
figure out a better way to pass tallocated memory around with SWIG.
(This used to be commit c63668cbbe393a78ccd9a86a33fb4bd7bb9af16d)

16 years agor5242: Check that argument is an integer or a long for uint32_t input
Tim Potter [Sun, 6 Feb 2005 00:34:44 +0000 (00:34 +0000)]
r5242: Check that argument is an integer or a long for uint32_t input
typemap.

The uint32_t output typemap must return a Python long as an unsigned
uint32_t cannot be fully represented by a Python int.

Likewise for the NTSTATUS typemap.
(This used to be commit 6dba5d6fb43f87bedc380c4f82b1d5f90b70325a)

16 years agor5241: Generate swig wrappers for unions as well as structures.
Tim Potter [Sun, 6 Feb 2005 00:18:46 +0000 (00:18 +0000)]
r5241: Generate swig wrappers for unions as well as structures.
(This used to be commit e65741159d8578d629ccfcd863f034fda895f9fe)

16 years agor5240: Don't return WERR_OK when no values were found (reported by Matt Cobb)
Jelmer Vernooij [Sat, 5 Feb 2005 23:10:31 +0000 (23:10 +0000)]
r5240: Don't return WERR_OK when no values were found (reported by Matt Cobb)
(This used to be commit f2e6d71584672e9bf0eaa7176d76781a30d317d1)

16 years agor5237: Add error code for "class not registered"
Jelmer Vernooij [Sat, 5 Feb 2005 14:40:47 +0000 (14:40 +0000)]
r5237: Add error code for "class not registered"
(This used to be commit b72a0ac654857273eaaf3c5e32d86abed0af3ceb)

16 years agor5224: Add in/out typemaps for resume handles. This saves us having to much
Tim Potter [Fri, 4 Feb 2005 06:35:45 +0000 (06:35 +0000)]
r5224: Add in/out typemaps for resume handles.  This saves us having to much
around with pointers to just one uint32.

Add an output typemap to copy a policy handle as the talloc context is
destroyed before the wrapper function returns.  More work here needed
to avoid memory leaks.

Use the swig carrays.i file to create accessor and setter functions
for fixed width integer types.  Also add functions for struct samr_SamEntry
as it's returned by the LookupDomain RPC.  This really needs to be
done by pidl so I don't have to go through and find all the structures
that are returned in arrays.

Include security.i to give us SIDs and security descriptors.
(This used to be commit 5a1f6c999ef5e84e93ec8f07b9751d795c4566a5)

16 years agor5223: Rename dom_sid2 to dom_sid as we don't care about the difference
Tim Potter [Fri, 4 Feb 2005 06:28:50 +0000 (06:28 +0000)]
r5223: Rename dom_sid2 to dom_sid as we don't care about the difference
for the swig wrappers.
(This used to be commit edb32b9b5175f720bce110bf2bb4cf136ed47142)

16 years agor5222: made the nbtd_self_packet() code more efficient
Andrew Tridgell [Fri, 4 Feb 2005 05:13:46 +0000 (05:13 +0000)]
r5222: made the nbtd_self_packet() code more efficient
(This used to be commit 8fe477955d0e28c891281803d625d80cb78a51b0)

16 years agor5221: replace the str_list_*() code with new code based on talloc(). This is
Andrew Tridgell [Fri, 4 Feb 2005 04:58:48 +0000 (04:58 +0000)]
r5221: replace the str_list_*() code with new code based on talloc(). This is
a precursor to adding the wins client code in the nbt server.
(This used to be commit e8e499755ab667015740b35a7787134ebe852954)

16 years agor5217: avoid epoll_ctl() if the event flags are already set correctly
Andrew Tridgell [Fri, 4 Feb 2005 02:35:13 +0000 (02:35 +0000)]
r5217: avoid epoll_ctl() if the event flags are already set correctly
(This used to be commit d89b493aaf690ceb107bd62df75f1bba82284f90)

16 years agor5216: don't defend group names against incoming name registration requests
Andrew Tridgell [Fri, 4 Feb 2005 02:31:04 +0000 (02:31 +0000)]
r5216: don't defend group names against incoming name registration requests
(This used to be commit c5f5e1d4012c9f4fd4ea78a4276e6766727a5494)

16 years agor5215: register aliases as both client and server node types, so nmblookup can see...
Andrew Tridgell [Fri, 4 Feb 2005 02:22:01 +0000 (02:22 +0000)]
r5215: register aliases as both client and server node types, so nmblookup can see them
(This used to be commit 3e9788691fe6d618b1e170494e818d0cbdc64eae)

16 years agor5214: added support for "netbios aliases" in smb.conf
Andrew Tridgell [Fri, 4 Feb 2005 02:20:55 +0000 (02:20 +0000)]
r5214: added support for "netbios aliases" in smb.conf
(This used to be commit 3270b07539d9a50763f4f15c7aa8fee028928b29)

16 years agor5213: do our name broadcast refresh requests as register packets not refresh
Andrew Tridgell [Fri, 4 Feb 2005 02:16:59 +0000 (02:16 +0000)]
r5213: do our name broadcast refresh requests as register packets not refresh
packets, as w2k3 and Samba3 do not defend against broadcast name
refresh packets
(This used to be commit 3935b5f7c57be46042110911ba5b00ac39b0f41a)

16 years agor5212: added checking for receiving our own packets as broadcasts
Andrew Tridgell [Fri, 4 Feb 2005 02:05:27 +0000 (02:05 +0000)]
r5212: added checking for receiving our own packets as broadcasts
(This used to be commit 290dbd8cdcfa6a897647768dcbbd03f22fc7cf36)

16 years agor5211: added broadcast name defense against both registration and refresh
Andrew Tridgell [Fri, 4 Feb 2005 01:55:50 +0000 (01:55 +0000)]
r5211: added broadcast name defense against both registration and refresh
requests
(This used to be commit 9eafe2cacaef64384febe6bb0938294f7c1ee6bf)

16 years agor5210: changed server side nbt functions to be prefixed with nbtd_ instead of
Andrew Tridgell [Fri, 4 Feb 2005 01:39:10 +0000 (01:39 +0000)]
r5210: changed server side nbt functions to be prefixed with nbtd_ instead of
nbt_, so as to more clearly separate them from the client code in
libcli/nbt/
(This used to be commit b07a7e35f26204055a99abf72438b5cd7ec35d3b)

16 years agor5209: Fix the endpoint mapper to work with IPX endpoints (which
Jelmer Vernooij [Fri, 4 Feb 2005 01:32:19 +0000 (01:32 +0000)]
r5209: Fix the endpoint mapper to work with IPX endpoints (which
accidently have the same protocol id as UUID's)
Before this, Samba would give NDR errors when contacting
a remote server that has IPX support enabled.

This one was on my long due bugs list.
(This used to be commit 7b847de64f35b8e897b64ad047d8aea3813214f8)

16 years agor5199: fix some minor configure bugs
Stefan Metzmacher [Thu, 3 Feb 2005 13:00:16 +0000 (13:00 +0000)]
r5199: fix some minor configure bugs

metze
(This used to be commit 274ef2a206aa00b3155adc27f5b7e35d3fa52bf6)

16 years agor5198: don't consider failure to remove an epoll event as enough reason to
Andrew Tridgell [Thu, 3 Feb 2005 12:26:28 +0000 (12:26 +0000)]
r5198: don't consider failure to remove an epoll event as enough reason to
fallback to select(). This can happen in too many situations.
(This used to be commit 2d7242f2ec945c1e5fbc6f256265471f60ac8cd9)

16 years agor5197: moved events code to lib/events/ (suggestion from metze)
Andrew Tridgell [Thu, 3 Feb 2005 11:56:03 +0000 (11:56 +0000)]
r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339f36aa43c9340be70ab7f0067593ef2)

16 years agor5196: fixed sily bug (that metze found)
Andrew Tridgell [Thu, 3 Feb 2005 11:30:36 +0000 (11:30 +0000)]
r5196: fixed sily bug (that metze found)
(This used to be commit 180f29f9e05e75e8ed32d010bc0c57a55ea9d843)

16 years agor5195: most events don't need the time of the event, so save a gettimeofday() call
Andrew Tridgell [Thu, 3 Feb 2005 11:25:52 +0000 (11:25 +0000)]
r5195: most events don't need the time of the event, so save a gettimeofday() call
and just use timeval_current() when its actually needed
(This used to be commit 236403cc4dc2924ed6a898acae0bb44cc1688dcc)

16 years agor5194: added support for using epoll instead of select() on systems that have
Andrew Tridgell [Thu, 3 Feb 2005 08:24:08 +0000 (08:24 +0000)]
r5194: added support for using epoll instead of select() on systems that have
it. epoll is much more scalable than select(), but only exists on some
systems (such as Linux with the 2.6.x kernel). The code detects any
epoll system call failures at runtime and falls back to select() if
there is a problem, so it should be safe to compile this on a 2.6
kernel and run it on a 2.4.x kernel.

The speedup is quite large. It gains 20% in packet rate in the
BENCH-NBT test, on top of another 20% gain from the better timer
handling I added earlier. The really big gain will be when we are
dealing with large numbers of file descriptors. With epoll we can
handle hundreds of file descriptors all O(1), whereas with select it
is O(n).
(This used to be commit 26aa1aa69377e43da2942a42d137b95801e9fa1a)

16 years agor5193: make sure we mark the event dead when we free it on a dead connection
Andrew Tridgell [Thu, 3 Feb 2005 08:20:31 +0000 (08:20 +0000)]
r5193: make sure we mark the event dead when we free it on a dead connection
(This used to be commit 90535bab957ddaa7bfcdf43e199581f3352bdc8a)

16 years agor5190: Grr - typo.
Tim Potter [Thu, 3 Feb 2005 04:22:37 +0000 (04:22 +0000)]
r5190: Grr - typo.
(This used to be commit 5f40ff0f554323ed0a806be7a4d0f1fac97e3ffb)

16 years agor5189: fixed a double free bug in the ltdb indexing code
Andrew Tridgell [Thu, 3 Feb 2005 04:03:28 +0000 (04:03 +0000)]
r5189: fixed a double free bug in the ltdb indexing code
(This used to be commit 7be0bc93bd6757e52fd10bd3d3b3d1a8f5221452)

16 years agor5188: Add config.mk file for swig.
Tim Potter [Thu, 3 Feb 2005 04:03:24 +0000 (04:03 +0000)]
r5188: Add config.mk file for swig.
(This used to be commit c40fb6625d5cc6b3ddadfdc3c63d7856a45ec134)

16 years agor5187: ordered the timed events in the events code, which makes processing
Andrew Tridgell [Thu, 3 Feb 2005 04:02:48 +0000 (04:02 +0000)]
r5187: ordered the timed events in the events code, which makes processing
events much more efficient (no linked lists need to be traversed, so
large numbers of timers are no problem)
(This used to be commit b45b9436d78b0ad288b27a1023579bb566ca6202)

16 years agor5185: make all the events data structures private to events.c. This will
Andrew Tridgell [Thu, 3 Feb 2005 02:35:52 +0000 (02:35 +0000)]
r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51342a65bf46fce772d313f92f8d73d3)

16 years agor5173: Refer to a proper zone file name in resulting message
Alexander Bokovoy [Wed, 2 Feb 2005 12:02:16 +0000 (12:02 +0000)]
r5173: Refer to a proper zone file name in resulting message
(This used to be commit 0c96cc8babf222731375a59e86c64468c6dbda33)

16 years agor5172: actually bind to the right address for the wildcard interface ....
Andrew Tridgell [Wed, 2 Feb 2005 10:35:25 +0000 (10:35 +0000)]
r5172: actually bind to the right address for the wildcard interface ....
(This used to be commit 7720d247fed3343a5bf39b2eedf34604f9203a37)

16 years agor5171: added support for "bind interfaces only" in nbtd. The solution was to
Andrew Tridgell [Wed, 2 Feb 2005 10:29:50 +0000 (10:29 +0000)]
r5171: added support for "bind interfaces only" in nbtd. The solution was to
bind twice on each interface, once using the broadcast address and
once using the specific IP. We then only listen on the wildcard
address if we don't have "bind interface only" set. This also happens
to simplify the code that finds the right interface for an incoming
request.
(This used to be commit b3edf17281c5d82abb40dab817bf2de43f9f6c3f)

16 years agor5170: fixed a bug handling events that have already timed out - they were
Andrew Tridgell [Wed, 2 Feb 2005 10:24:47 +0000 (10:24 +0000)]
r5170: fixed a bug handling events that have already timed out - they were
being treated as events that never time out, so they happened on the
next other event
(This used to be commit 2eefe4f8dea4a9060f229417777435133c684a0c)

16 years agor5169: As provisioning script generates everything under $newdb/ directory, put gener...
Alexander Bokovoy [Wed, 2 Feb 2005 09:59:01 +0000 (09:59 +0000)]
r5169: As provisioning script generates everything under $newdb/ directory, put generated domain zone there as well
(This used to be commit f4fc885c14da517051cbcf7296b804da0f5f70b4)

16 years agor5156: started on test driven development of the nbt server. This adds a
Andrew Tridgell [Tue, 1 Feb 2005 06:16:12 +0000 (06:16 +0000)]
r5156: started on test driven development of the nbt server. This adds a
NBT-REGISTER test that tests that a server correctly defends its name
against broadcast name registrations.

Jeremy, you might like to look at this. Samba3 nmbd fails to respond.
(This used to be commit bb1298a2eb192ec2cd547a299334cc82a63a5acc)

16 years agor5155: define ipv4address as a based IDL type, mapped to a "const char *" in
Andrew Tridgell [Tue, 1 Feb 2005 04:12:44 +0000 (04:12 +0000)]
r5155: define ipv4address as a based IDL type, mapped to a "const char *" in
the header, and defined on the wire as a 4 byte network byte order
IP. This means the calling code doesn't have to worry about network
byte order conversions.
(This used to be commit 72048e37179dd5b9ada0c5280d2f0d8c23d1a17d)

16 years agor5148: use ipv4_addr also in epmapper idl
Stefan Metzmacher [Mon, 31 Jan 2005 21:44:39 +0000 (21:44 +0000)]
r5148: use ipv4_addr also in epmapper idl

metze
(This used to be commit cbc1f172822363e1fc4495d27248464403748cae)

16 years agor5147: remove unused var
Stefan Metzmacher [Mon, 31 Jan 2005 17:26:47 +0000 (17:26 +0000)]
r5147: remove unused var

metze
(This used to be commit 79e79552e62bbef61eb4f3dff104c6415c3e2ef8)

16 years agor5145: define struct ipv4_addr in misc.idl,
Stefan Metzmacher [Mon, 31 Jan 2005 17:16:45 +0000 (17:16 +0000)]
r5145: define struct ipv4_addr in misc.idl,
so we can use it in nbt.idl and
get a nicer debug output

metze
(This used to be commit abacbc9192646f6f3c720758ab65889b82b9ae7b)

16 years agor5144: add more forward declarations
Stefan Metzmacher [Mon, 31 Jan 2005 16:47:47 +0000 (16:47 +0000)]
r5144: add more forward declarations

metze
(This used to be commit c5a24792db61b688f23cf7d2509993049cad4a75)

16 years agor5143: don't generate prototypes for lib/tdb/
Stefan Metzmacher [Mon, 31 Jan 2005 16:46:48 +0000 (16:46 +0000)]
r5143: don't generate prototypes for lib/tdb/

metze
(This used to be commit 1c48c30aaf58d069cdba2f59b5c012bc4bdd3efc)

16 years agor5142: fix compiler warning
Stefan Metzmacher [Mon, 31 Jan 2005 16:36:57 +0000 (16:36 +0000)]
r5142: fix compiler warning

metze
(This used to be commit d8aeb69ea85cc0df89e213482c446eb8e793bc86)

16 years agor5141: fix compiler warnings
Stefan Metzmacher [Mon, 31 Jan 2005 16:36:17 +0000 (16:36 +0000)]
r5141: fix compiler warnings

metze
(This used to be commit 12b0841b30fdb6d7ba8c3dc9991c172f7fb3d31f)

16 years agor5139: fix types
Stefan Metzmacher [Mon, 31 Jan 2005 16:10:36 +0000 (16:10 +0000)]
r5139: fix types

metze
(This used to be commit 8507a57b88c6acce84d9ccc580e17c7f96c6d7af)

16 years agor5138: don't create prototypes for samba3's winbind client lib
Stefan Metzmacher [Mon, 31 Jan 2005 16:07:56 +0000 (16:07 +0000)]
r5138: don't create prototypes for samba3's winbind client lib
they're in hand declared

metze
(This used to be commit fcc690a274963565d13fc358edc61db57c4111b9)

16 years agor5137: fix types
Stefan Metzmacher [Mon, 31 Jan 2005 16:06:21 +0000 (16:06 +0000)]
r5137: fix types

metze
(This used to be commit add1c579375d08040f722946da31ee3862f9e7ac)

16 years agor5136: fix types
Stefan Metzmacher [Mon, 31 Jan 2005 16:02:58 +0000 (16:02 +0000)]
r5136: fix types

metze
(This used to be commit 344367cc4cdb232c394ce45ab64cc357cce4259f)

16 years agor5135: I prepare a clean up in includes.h
Stefan Metzmacher [Mon, 31 Jan 2005 16:01:22 +0000 (16:01 +0000)]
r5135: I prepare a clean up in includes.h

metze
(This used to be commit 670e088e94468a5311353dbbaa7e34d200999313)

16 years agor5134: - fix types to always use _t types
Stefan Metzmacher [Mon, 31 Jan 2005 15:58:54 +0000 (15:58 +0000)]
r5134: - fix types to always use _t types

- add #include "system/filesys.h" where needed

metze
(This used to be commit 6bb07a0ed8a4baaeaa1d63bde8ce773364860fd2)

16 years agor5133: fix type mapping to internal types
Stefan Metzmacher [Mon, 31 Jan 2005 15:54:42 +0000 (15:54 +0000)]
r5133: fix type mapping to internal types

metze
(This used to be commit 4cebc7a85810395a0b095127925bd88c7caddb63)

16 years agor5130: added a single NBT name query benchmark. It keeps 10 queries in flight at...
Andrew Tridgell [Mon, 31 Jan 2005 09:54:39 +0000 (09:54 +0000)]
r5130: added a single NBT name query benchmark. It keeps 10 queries in flight at a time.
(This used to be commit 2d23c665ffda7619dc9b9c2dbcbc422b0854998c)

16 years agor5129: make sure we don't spin chewing CPU time due to my last change
Andrew Tridgell [Mon, 31 Jan 2005 09:53:21 +0000 (09:53 +0000)]
r5129: make sure we don't spin chewing CPU time due to my last change
(This used to be commit 69e97ad9c397261cd6edb6f7504021942f16c0ec)

16 years agor5126: the composite code is no longer client specific or smb specific, so
Andrew Tridgell [Mon, 31 Jan 2005 08:30:44 +0000 (08:30 +0000)]
r5126: the composite code is no longer client specific or smb specific, so
rename the core structure to composite_context and the wait routine to
composite_wait() (suggestion from metze)
(This used to be commit cf11d05e35179c2c3e51c5ab370cd0a3fb15f24a)

16 years agor5123: fixed a bug in the timed events handling. It was possible for a timed
Andrew Tridgell [Mon, 31 Jan 2005 08:18:52 +0000 (08:18 +0000)]
r5123: fixed a bug in the timed events handling. It was possible for a timed
event handler to trigger a free that could cause a timer to be
triggered twice. This changs fixes it properly by marking timer events
to be removed using a zero next_event time.

I also changed the default timeout for events.c to be infinite, so if
there are no events to handle then smbd will sit forever doing
nothing. That allows it to be swapped out completely when idle.
(This used to be commit 0f1fb7017ee441cbebcad45900435adb57ca1760)

16 years agor5122: fixed name of winbind stream ops
Andrew Tridgell [Mon, 31 Jan 2005 07:24:00 +0000 (07:24 +0000)]
r5122: fixed name of winbind stream ops
(This used to be commit 984c737c1b5e9106979be95738c11f52ae6cddc2)

16 years agor5121: added periodic name refresh requests for all our registered names, reporting any
Andrew Tridgell [Mon, 31 Jan 2005 06:55:25 +0000 (06:55 +0000)]
r5121: added periodic name refresh requests for all our registered names, reporting any
name conflicts
(This used to be commit 69e6a1cd4bac665debb10601d1a3ddc0ae86e779)

16 years agor5120: encode outgoing nbt packets when queueing them rather than in the send
Andrew Tridgell [Mon, 31 Jan 2005 04:53:53 +0000 (04:53 +0000)]
r5120: encode outgoing nbt packets when queueing them rather than in the send
event code, as elements of the callers packet structure could go away
while the queue is pending (if for example a name was de-registered
while a packet referencing that name is queued)
(This used to be commit 6726f15cf44388e5787eec223a8c9778110a508f)

16 years agor5119: fflush after talloc reports to ensure they are fully on disk when using tee
Andrew Tridgell [Mon, 31 Jan 2005 04:51:50 +0000 (04:51 +0000)]
r5119: fflush after talloc reports to ensure they are fully on disk when using tee
(This used to be commit e73e49aaa64f6f976918f087cf196b00eecc3eb2)

16 years agor5118: added support for node status replies in nbtd. nmblookup -S now works against...
Andrew Tridgell [Mon, 31 Jan 2005 04:15:58 +0000 (04:15 +0000)]
r5118: added support for node status replies in nbtd. nmblookup -S now works against Samba4.
Also added support for the '*' wildcard name
(This used to be commit 2dd7ccf72444db668fa970c3a95de1448baea224)

16 years agor5117: used a composite function to add 4 stage name registration. We send 3
Andrew Tridgell [Mon, 31 Jan 2005 03:14:15 +0000 (03:14 +0000)]
r5117: used a composite function to add 4 stage name registration. We send 3
broadcast name registration demands per name per interface at 1 second
intervals, then send a name overwrite request and demand. Any name
conflict replies are reported.
(This used to be commit d656fba6f1a2e9d8c03893741327e5fb59c5271e)

16 years agor5116: fixed build of the nbtlist code
Andrew Tridgell [Mon, 31 Jan 2005 02:50:49 +0000 (02:50 +0000)]
r5116: fixed build of the nbtlist code
(This used to be commit 506e1e823cd3f652a793db9f4c43147d298b9b8b)

16 years agor5115: enable the nbt daemon by default
Andrew Tridgell [Mon, 31 Jan 2005 02:02:34 +0000 (02:02 +0000)]
r5115: enable the nbt daemon by default
(This used to be commit 4c0cc5fc11241c8a19081c4944b162c29da31603)

16 years agor5114: the nbtd task can now act as a basic B-node server. It registers its
Andrew Tridgell [Mon, 31 Jan 2005 01:57:58 +0000 (01:57 +0000)]
r5114: the nbtd task can now act as a basic B-node server. It registers its
names on the network and answers name queries. Lots of details are
still missing, but at least this now means you don't need a Samba3
nmbd to use Samba4.

missing pieces include:

 - name registrations should be "shout 3 times, then demand"

 - no WINS server yet

 - no master browser code
(This used to be commit d7d31fdc6670f026f96b50e51a4de19f0b920e5b)

16 years agor5109: - fixed handling of zero-length subcontexts in the ndr library
Andrew Tridgell [Sun, 30 Jan 2005 10:41:15 +0000 (10:41 +0000)]
r5109: - fixed handling of zero-length subcontexts in the ndr library

- added error checking on socket startup in nbtd
(This used to be commit 5707ebc9ecdce5c195a2788ab1e4214788a086ea)

16 years agor5108: the beginnings of a nbtd server for Samba4. Currently just displays
Andrew Tridgell [Sun, 30 Jan 2005 10:24:36 +0000 (10:24 +0000)]
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 2fedca6adfd4df9e85cc86896dfa79630777a917)

16 years agor5107: moved the horrible ldap socket code, and the even worse
Andrew Tridgell [Sun, 30 Jan 2005 07:22:16 +0000 (07:22 +0000)]
r5107: moved the horrible ldap socket code, and the even worse
asn1-tied-to-blocking-sockets code into the ldap client and torture
suite, and out of the generic libs, so nobody else is tempted to use
it for any new code.
(This used to be commit 39d1ced21baeca40d1fca62ba65243ca8f15757e)