Andrew Tridgell [Sun, 6 Feb 2005 08:33:22 +0000 (08:33 +0000)]
r5253: need to pre-declare some structures
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
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
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
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
Andrew Tridgell [Sun, 6 Feb 2005 08:14:44 +0000 (08:14 +0000)]
r5248: fixed a silly bug in DLIST_ADD_AFTER()
Tim Potter [Sun, 6 Feb 2005 04:34:29 +0000 (04:34 +0000)]
r5247: Fix rpcclient to work with new swig interface.
Tim Potter [Sun, 6 Feb 2005 00:50:55 +0000 (00:50 +0000)]
r5245: Remove dead code.
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!
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.
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.
Tim Potter [Sun, 6 Feb 2005 00:18:46 +0000 (00:18 +0000)]
r5241: Generate swig wrappers for unions as well as structures.
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)
Jelmer Vernooij [Sat, 5 Feb 2005 14:40:47 +0000 (14:40 +0000)]
r5237: Add error code for "class not registered"
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.
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.
Andrew Tridgell [Fri, 4 Feb 2005 05:13:46 +0000 (05:13 +0000)]
r5222: made the nbtd_self_packet() code more efficient
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.
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
Andrew Tridgell [Fri, 4 Feb 2005 02:31:04 +0000 (02:31 +0000)]
r5216: don't defend group names against incoming name registration requests
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
Andrew Tridgell [Fri, 4 Feb 2005 02:20:55 +0000 (02:20 +0000)]
r5214: added support for "netbios aliases" in smb.conf
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
Andrew Tridgell [Fri, 4 Feb 2005 02:05:27 +0000 (02:05 +0000)]
r5212: added checking for receiving our own packets as broadcasts
Andrew Tridgell [Fri, 4 Feb 2005 01:55:50 +0000 (01:55 +0000)]
r5211: added broadcast name defense against both registration and refresh
requests
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/
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.
Stefan Metzmacher [Thu, 3 Feb 2005 13:00:16 +0000 (13:00 +0000)]
r5199: fix some minor configure bugs
metze
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.
Andrew Tridgell [Thu, 3 Feb 2005 11:56:03 +0000 (11:56 +0000)]
r5197: moved events code to lib/events/ (suggestion from metze)
Andrew Tridgell [Thu, 3 Feb 2005 11:30:36 +0000 (11:30 +0000)]
r5196: fixed sily bug (that metze found)
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
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).
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
Tim Potter [Thu, 3 Feb 2005 04:22:37 +0000 (04:22 +0000)]
r5190: Grr - typo.
Andrew Tridgell [Thu, 3 Feb 2005 04:03:28 +0000 (04:03 +0000)]
r5189: fixed a double free bug in the ltdb indexing code
Tim Potter [Thu, 3 Feb 2005 04:03:24 +0000 (04:03 +0000)]
r5188: Add config.mk file for swig.
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)
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)
Alexander Bokovoy [Wed, 2 Feb 2005 12:02:16 +0000 (12:02 +0000)]
r5173: Refer to a proper zone file name in resulting message
Andrew Tridgell [Wed, 2 Feb 2005 10:35:25 +0000 (10:35 +0000)]
r5172: actually bind to the right address for the wildcard interface ....
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.
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
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
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.
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.
Stefan Metzmacher [Mon, 31 Jan 2005 21:44:39 +0000 (21:44 +0000)]
r5148: use ipv4_addr also in epmapper idl
metze
Stefan Metzmacher [Mon, 31 Jan 2005 17:26:47 +0000 (17:26 +0000)]
r5147: remove unused var
metze
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
Stefan Metzmacher [Mon, 31 Jan 2005 16:47:47 +0000 (16:47 +0000)]
r5144: add more forward declarations
metze
Stefan Metzmacher [Mon, 31 Jan 2005 16:46:48 +0000 (16:46 +0000)]
r5143: don't generate prototypes for lib/tdb/
metze
Stefan Metzmacher [Mon, 31 Jan 2005 16:36:57 +0000 (16:36 +0000)]
r5142: fix compiler warning
metze
Stefan Metzmacher [Mon, 31 Jan 2005 16:36:17 +0000 (16:36 +0000)]
r5141: fix compiler warnings
metze
Stefan Metzmacher [Mon, 31 Jan 2005 16:10:36 +0000 (16:10 +0000)]
r5139: fix types
metze
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
Stefan Metzmacher [Mon, 31 Jan 2005 16:06:21 +0000 (16:06 +0000)]
r5137: fix types
metze
Stefan Metzmacher [Mon, 31 Jan 2005 16:02:58 +0000 (16:02 +0000)]
r5136: fix types
metze
Stefan Metzmacher [Mon, 31 Jan 2005 16:01:22 +0000 (16:01 +0000)]
r5135: I prepare a clean up in includes.h
metze
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
Stefan Metzmacher [Mon, 31 Jan 2005 15:54:42 +0000 (15:54 +0000)]
r5133: fix type mapping to internal types
metze
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.
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
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)
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.
Andrew Tridgell [Mon, 31 Jan 2005 07:24:00 +0000 (07:24 +0000)]
r5122: fixed name of winbind stream ops
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
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)
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
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
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.
Andrew Tridgell [Mon, 31 Jan 2005 02:50:49 +0000 (02:50 +0000)]
r5116: fixed build of the nbtlist code
Andrew Tridgell [Mon, 31 Jan 2005 02:02:34 +0000 (02:02 +0000)]
r5115: enable the nbt daemon by default
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
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
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.
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.
Andrew Tridgell [Sun, 30 Jan 2005 07:08:08 +0000 (07:08 +0000)]
r5106: removed a bunch of unused socket functions. We still need
open_socket_out() as its used by the ldap client code (uggh)
Andrew Tridgell [Sun, 30 Jan 2005 07:07:11 +0000 (07:07 +0000)]
r5105: removed some unused events functions. These are no longer needed as
destructors are used to remove pending socket events
Andrew Tridgell [Sun, 30 Jan 2005 02:55:30 +0000 (02:55 +0000)]
r5104: - added support for task based servers. These are servers that within
themselves are run as a single process, but run as a child of the
main process when smbd is run in the standard model, and run as part
of the main process when in the single mode.
- rewrote the winbind template code to use the new task services. Also
fixed the packet queueing
- got rid of event_context_merge() as it is no longer needed
Andrew Tridgell [Sun, 30 Jan 2005 00:55:49 +0000 (00:55 +0000)]
r5103: forgot to add two new files
these are the stream server helper functions
Andrew Tridgell [Sun, 30 Jan 2005 00:54:57 +0000 (00:54 +0000)]
r5102: This is a major simplification of the logic for controlling top level
servers in smbd. The old code still contained a fairly bit of legacy
from the time when smbd was only handling SMB connection. The new code
gets rid of all of the smb_server specific code in smbd/, and creates
a much simpler infrastructures for new server code.
Major changes include:
- simplified the process model code a lot.
- got rid of the top level server and service structures
completely. The top level context is now the event_context. This
got rid of service.h and server.h completely (they were the most
confusing parts of the old code)
- added service_stream.[ch] for the helper functions that are
specific to stream type services (services that handle streams, and
use a logically separate process per connection)
- got rid of the builtin idle_handler code in the service logic, as
none of the servers were using it, and it can easily be handled by
a server in future by adding its own timed_event to the event
context.
- fixed some major memory leaks in the rpc server code.
- added registration of servers, rather than hard coding our list of
possible servers. This allows for servers as modules in the future.
- temporarily disabled the winbind code until I add the helper
functions for that type of server
- added error checking on service startup. If a configured server
fails to startup then smbd doesn't startup.
- cleaned up the command line handling in smbd, removing unused options
Tim Potter [Sat, 29 Jan 2005 05:05:17 +0000 (05:05 +0000)]
r5095: uint32 -> uint32_t
%include misc.i to get definition of struct policy_handle
Remove #includes we aren't using just now.
Tim Potter [Sat, 29 Jan 2005 05:04:23 +0000 (05:04 +0000)]
r5094: Use builtin swig types for converting between fixed width integer types.
Andrew Bartlett [Sat, 29 Jan 2005 04:11:04 +0000 (04:11 +0000)]
r5093: Make debugs less confusing when a 0 NTTIME is printed.
Andrew Bartlett
Andrew Bartlett [Sat, 29 Jan 2005 04:04:38 +0000 (04:04 +0000)]
r5092: Add a bit more const - moving it further into the LDB layer.
Andrew Bartlett
Andrew Bartlett [Sat, 29 Jan 2005 04:03:12 +0000 (04:03 +0000)]
r5091: The Kerberos secrets are queried by realm
Andrew Bartlett
Andrew Bartlett [Sat, 29 Jan 2005 04:02:13 +0000 (04:02 +0000)]
r5090: Fix up the IDL for LogonGetDomainInfo in NETLOGON.
Andrew Bartlett
Andrew Bartlett [Sat, 29 Jan 2005 04:01:23 +0000 (04:01 +0000)]
r5089: Fix indentation.
Andrew Bartlett [Sat, 29 Jan 2005 04:00:29 +0000 (04:00 +0000)]
r5088: Push some of the heimdal tests into a 'if we didn't have krb5-config' block.
This lets krb5-config handle this without us stuffing things up.
Add back the test tridge removed
Andrew Bartlett
Tim Potter [Sat, 29 Jan 2005 04:00:14 +0000 (04:00 +0000)]
r5087: Add --swig to pidl flags so that swig .i files are generated with
make idl.
Andrew Bartlett [Sat, 29 Jan 2005 03:58:44 +0000 (03:58 +0000)]
r5086: Fix list of binaries to install:
- nmblookup and net are generic, not torture programs.
- Add ntlm_auth
Andrew Bartlett
Andrew Tridgell [Sat, 29 Jan 2005 03:44:47 +0000 (03:44 +0000)]
r5085: add net and nmblookup to installed binaries
metze, can you look at automating this when you get time? We really
need a flag in config.mk for "BINARY::" sections for the install
location, something like:
[BINARY::nmblookup]
OBJ_FILES = \
utils/nmblookup.o
INSTALL_IN = bin
Andrew Tridgell [Sat, 29 Jan 2005 03:17:14 +0000 (03:17 +0000)]
r5084: - handle arbitrary data in the NULL record reply type for nbt name queries
- fixed unaligned pulls at the end of the packet in the ndr lib
Andrew Tridgell [Sat, 29 Jan 2005 03:12:00 +0000 (03:12 +0000)]
r5083: removed the libcrypto test that is forcing the pull in of the MIT krb5 libs when you
have openssl-dev installed
Andrew Tridgell [Sat, 29 Jan 2005 02:46:37 +0000 (02:46 +0000)]
r5080: patch from ronnie to make our samr IDL a little more consistent
Andrew Tridgell [Sat, 29 Jan 2005 02:41:46 +0000 (02:41 +0000)]
r5079: don't look for gss_display_status() in libgssapi_krb5 unless we
haven't already got it from libgssapi. This should fix the problem of
building with heimdal when we have MIT installed
Tim Potter [Sat, 29 Jan 2005 01:42:09 +0000 (01:42 +0000)]
r5074: Remove dead code.
Tim Potter [Sat, 29 Jan 2005 01:39:50 +0000 (01:39 +0000)]
r5073: Call new autogenerator function for swig stuff instead of old one.
Tim Potter [Sat, 29 Jan 2005 00:19:23 +0000 (00:19 +0000)]
r5072: oDecrease the amount of autogenerated code (sorry tridge) and use swig's
structure mapping features instead of doing it all ourselves.
This basically works, but has broken all the existing checked in Python
code.
Sample:
pipe = dcerpc.pipe_connect(binding,
dcerpc.DCERPC_SAMR_UUID, int(dcerpc.DCERPC_SAMR_VERSION),
domain, username, password)
r = dcerpc.samr_Connect2()
r.data_in.system_name = 'foo'
r.data_in.access_mask = 0x02000000
result = dcerpc.dcerpc_samr_Connect2(pipe, r)
Jeremy Allison [Fri, 28 Jan 2005 23:57:03 +0000 (23:57 +0000)]
r5071: Reverted (per tridge request).
Jeremy.