1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

387 Commits

Author SHA1 Message Date
Jelmer Vernooij
806c5c9621 r15371: Revert some of my previous patch as it was breaking the plain build
(This used to be commit fac9871122)
2007-10-10 14:05:28 -05:00
Jelmer Vernooij
47bf79eac5 r15370: Fix more dependencies for shared libs
(This used to be commit 9a518661fb)
2007-10-10 14:05:27 -05:00
Jelmer Vernooij
b00c236906 r15301: Use static libraries internally. This required a few hacks in the build
system - these should be removed later on.
(This used to be commit 0654739166)
2007-10-10 14:05:07 -05:00
Jelmer Vernooij
69b51f702a r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
(This used to be commit adc8a019b6)
2007-10-10 14:04:18 -05:00
Stefan Metzmacher
767685e9fd r14709: allways use the unicast socket of the interface, when reply to DGRAM
requests...

this fixes a bug where I thought windows would try KRB5 via broadcast...

metze
(This used to be commit 0e7b224294)
2007-10-10 13:59:11 -05:00
Jelmer Vernooij
bb1909e15e r14592: Add support for loading shared modules to LDB.
(This used to be commit f10fae23f0)
2007-10-10 13:58:58 -05:00
Jelmer Vernooij
9565c70898 r14567: Make some more functions public.
(This used to be commit 8e84e6cb6b)
2007-10-10 13:58:48 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Simo Sorce
753bf8fb99 r14459: Make this async compatible
(This used to be commit a71d762acf)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1df)
2007-10-10 13:57:16 -05:00
Stefan Metzmacher
651ca6553e r14079: I just found the setproctitle library from alt linux:-)
- add set_title hook to the process models
- use setproctitle library in process_model standard if available
- the the title for the task servers and on connections

metze
(This used to be commit 526f20bbec)
2007-10-10 13:56:49 -05:00
Stefan Metzmacher
60823d1878 r14078: move ldb_global_init() to the main smbd code,
to fix the process_model standard

metze
(This used to be commit a465126e15)
2007-10-10 13:56:49 -05:00
Jelmer Vernooij
ceb6e9717b r13960: Generate makefile rules for installing/removing shared modules.
(This used to be commit 2c74698032)
2007-10-10 13:52:32 -05:00
Stefan Metzmacher
c9e5d884fc r13941: fix the build
metze
(This used to be commit d9da948b0f)
2007-10-10 13:52:29 -05:00
Stefan Metzmacher
0cbc447101 r13933: fix dependency and make it possible to build as shared_library
metze
(This used to be commit 159a98a28a)
2007-10-10 13:52:28 -05:00
Jelmer Vernooij
9bd7dd9121 r13926: More header splitups.
(This used to be commit 930daa9f41)
2007-10-10 13:52:26 -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
Stefan Metzmacher
de3867e712 r13807: print out the netbios name the packet is for
metze
(This used to be commit e73cc5060c)
2007-10-10 13:52:12 -05:00
Jelmer Vernooij
26af14c39b r13786: [merge] Add registration functions for LDB modules
Applications that use LDB modules will now have to run ldb_global_init()
before they can use LDB.

The next step will be adding support for loading LDB modules from .so
files. This will also allow us to use one LDB without difference between the
standalone and the Samba-specific build
(This used to be commit 52a2356505)
2007-10-10 13:52:11 -05:00
Simo Sorce
d590dea10b r13615: Make ldb_set_errstring get ldb instead of module as parameter.
The module was just used to get to the ldb so it was meningless.

Also add LDB_WAIT_ONCE e relative code in ldb_ildap.c
(This used to be commit d5b467b7c1)
2007-10-10 13:51:59 -05:00
Andrew Tridgell
048704a7e5 r13505: allow servers to bind to non-broadcast interfaces. Servers now
specifically ask for iface_n_bcast() and have to check if it returns
NULL, in which case it is a non-broadcast interface
(This used to be commit d004e250b6)
2007-10-10 13:51:56 -05:00
Stefan Metzmacher
d3fd4c466f r13117: the caller may reference the winsdb_addr struct,
and as a winsdb_record has a short lifetime, it's no problem
to not free unused addresses directly

metze
(This used to be commit 2a7e22c117)
2007-10-10 13:51:27 -05:00
Stefan Metzmacher
8311b9e9e7 r13116: make sure we don't add more than 25 addresses to a record,
and don't return more than 25 in a name query reply

we now also order the addresses from the newest owned address
to the oldest replica address

metze
(This used to be commit 602ec0f1c6)
2007-10-10 13:51:27 -05:00
Stefan Metzmacher
5304f34132 r13115: call the wins hook script on modifications of the wins.ldb
tridge: can you please look at the /* TODO: close file handles */
        btw I'm not interessted in any result from the script...

metze
(This used to be commit 93409faddf)
2007-10-10 13:51:27 -05:00
Stefan Metzmacher
dd5afc5a77 r13087: don't store timestamps for static records
(only a per record timestamp when it's not active)

metze
(This used to be commit aba54b8708)
2007-10-10 13:51:23 -05:00
Stefan Metzmacher
f25ad21617 r13060: - return only active addresses in name query responses
- replicate only active addresses

metze
(This used to be commit 6325abd95c)
2007-10-10 13:51:20 -05:00
Stefan Metzmacher
eead6d310b r13007: let our winsclient code register multihomed records with
our winsserver and don't defend our local name against
our own register packets...

this won gave quite confusing logmessages...

metze
(This used to be commit 31ce24d7b1)
2007-10-10 13:51:17 -05:00
Stefan Metzmacher
c63937a1c0 r13006: always debug the unicast and broadcast address
metze
(This used to be commit f7481a4c8c)
2007-10-10 13:51:17 -05:00
Stefan Metzmacher
ba4df97eb9 r13005: - use nbtd:max_refresh_time=12345 also for name refresh with a wins server
metze
(This used to be commit 5e3639edaf)
2007-10-10 13:51:17 -05:00
Stefan Metzmacher
044c570ea9 r12958: don't bind to '255.255.255.255'
fix bug #3411

metze
(This used to be commit 2cb587c779)
2007-10-10 13:51:12 -05:00
Stefan Metzmacher
b71075e836 r12934: do somemore debugging of the received browse packets,
(so I may learn about the protocol, while watching the debug output)

metze
(This used to be commit 40d7033a14)
2007-10-10 13:51:11 -05:00
Stefan Metzmacher
cd9752d61f r12909: add an ldb module for the wins.ldb,
it currently doesn't do much, but it's later
prevent adding corrupted records via ldbedit,
and will take care of the versionID counter

metze
(This used to be commit a6f279bc43)
2007-10-10 13:51:02 -05:00
Stefan Metzmacher
4c117a001f r12906: return the correct nb_flags
metze
(This used to be commit c52436108d)
2007-10-10 13:51:01 -05:00
Stefan Metzmacher
c4a5381154 r12898: prepare the 'wins hook' feature, but we only debug out a 'TODO: run script ...'
metze
(This used to be commit d28c8ce66d)
2007-10-10 13:51:00 -05:00
Stefan Metzmacher
f3ef8fc691 r12897: make it possible to use nosync transaction to speed things up,
(just for testing)

metze
(This used to be commit 677c1aa466)
2007-10-10 13:51:00 -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
Stefan Metzmacher
d93e1b018e r12779: allow static tomstones
metze
(This used to be commit 966872646e)
2007-10-10 13:49:54 -05:00
Stefan Metzmacher
da8151ae9f r12755: check the return value of ldb_timestring(), as this fails,
when gmtime() fails...

metze
(This used to be commit 523746f271)
2007-10-10 13:49:50 -05:00
Stefan Metzmacher
a417674925 r12700: fix name release of replica records, we need to become the owner and allocate a new versionID
so that it gets replicated to the old owning wins server directly

metze
(This used to be commit 72198f00ea)
2007-10-10 13:49:41 -05:00
Stefan Metzmacher
6d16a217d3 r12673: create functions for get_maxVersion(), set_maxVersion() and get_seqnumber()
at the winsdb layer. the ones in wrepl_server/ will be removed later.

metze
(This used to be commit 22cdbc75df)
2007-10-10 13:49:36 -05:00
Stefan Metzmacher
c4d0b5729a r12648: implement the dns proxy feature
metze
(This used to be commit b07b201c86)
2007-10-10 13:49:34 -05:00
Stefan Metzmacher
24c54281a9 r12647: make use of the str_list_add function
metze
(This used to be commit e47873a1a3)
2007-10-10 13:49:34 -05:00
Stefan Metzmacher
706ef631f7 r12644: prepare the dns proxy feature for the wins server
metze
(This used to be commit 48842cd9ab)
2007-10-10 13:49:34 -05:00
Stefan Metzmacher
5a26b2d72b r12619: make sure we don't return more than 25 addresses, as w2k3 crashes in that case
I still need to make sure we didn't write such records to our database...

metze
(This used to be commit d0dc0ffa31)
2007-10-10 13:49:05 -05:00
Stefan Metzmacher
905c3ff8e1 r12618: use our primary interface address or the "winsdb:local_owner" -address
as winsOwner: attrbute for owned records

metze
(This used to be commit 37dece8304)
2007-10-10 13:49:05 -05:00
Stefan Metzmacher
0391b1cb3a r12617: create a winsdb_handle and pass that arround,
so we later can hang the local owner address, on this handle too

metze
(This used to be commit 49ba4cc111)
2007-10-10 13:49:05 -05:00
Stefan Metzmacher
bb8a5a2a1e r12609: - add some comments to a change that went in in the last 'fix the build' commit
- we need to reply to name queries with the recursion desired bit set,
  to pass the multi homed challenge, when registering our interfaces
  with a wins server

metze
(This used to be commit 9dfbce5f34)
2007-10-10 13:49:04 -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
Stefan Metzmacher
ab8cd4470c r12607: fix the build
metze
(This used to be commit 5cc955bf54)
2007-10-10 13:49:03 -05:00
Stefan Metzmacher
805f5d861f r12606: - fix multihomed registrations
always remove the addresses which are no longer valid
- use the wins_challenge_send/recv calls which are also used by the replication
  challenge

metze
(This used to be commit 037b5d9f36)
2007-10-10 13:49:03 -05:00
Stefan Metzmacher
70a15ba4df r12580: return the first 0x1B address as first address to 0x1C queries
metze
(This used to be commit 669009579d)
2007-10-10 13:48:56 -05:00
Stefan Metzmacher
2842acf5e3 r12578: - w2k3 allows entries with 127.0.0.1 as address, so we should do
to make it possible to add a static record for localhost or so...
- we already make sure we don't register 127.0.0.1 with our wins server,
  so the check for loopback in the non-wins name queries is enough

metze
(This used to be commit f68a883daf)
2007-10-10 13:48:56 -05:00
Stefan Metzmacher
8faa1f4f9a r12577: filter the loopback addresses like this 127.*.*.* and not only 127.0.0.1
metze
(This used to be commit 3b32d8b6b6)
2007-10-10 13:48:56 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Andrew Tridgell
c8531ef9c8 r12537: finally found the difference between us and w2k3 that caused w2k
domain joins to be agonisingly slow! The join is now instant, and
login is fast too
(This used to be commit 1b65713bbc)
2007-10-10 13:47:53 -05:00
Andrew Tridgell
1984ba6ee9 r12535: - simplify string list handling in a couple of places using str_list_add()
- don't reply with 127.0.0.1 in NBT or WINS name queries unless the
  query came in on the loopback interface. Otherwise clients can end
  up talking to themselves, which is not very productive :-)
(This used to be commit df00f8b342)
2007-10-10 13:47:53 -05:00
Jelmer Vernooij
0a3c167f6b r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.
(This used to be commit 87f665a1d5)
2007-10-10 13:47:51 -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
ac4ee3e20b r12440: fix crash bugs
metze
(This used to be commit c7049f8bb6)
2007-10-10 13:47:39 -05:00
Stefan Metzmacher
f76ee31ccf r12437: if the client gives us an unicast name query with recursion_desired,
it's a wins server request, even if it's a name of one of our interfaces

metze
(This used to be commit 33c1d4a078)
2007-10-10 13:47:39 -05:00
Stefan Metzmacher
9f270fd112 r12429: make static records always active with a max expire time
metze
(This used to be commit 387d680b6f)
2007-10-10 13:47:37 -05:00
Stefan Metzmacher
0e77fdc0b9 r12428: releases on 0x1D names are ignored
metze
(This used to be commit 84ba71ba27)
2007-10-10 13:47:37 -05:00
Stefan Metzmacher
b1ea93c016 r12426: w2k3 refused 0x1B names registered as group names
metze
(This used to be commit 4ce4baa1b9)
2007-10-10 13:47:37 -05:00
Stefan Metzmacher
aa682976cd r12425: match w2k3 and store 0x1D names when they're registered as group name,
but queries still give not found

metze
(This used to be commit 2e69a7cc21)
2007-10-10 13:47:36 -05:00
Stefan Metzmacher
8b7387ee13 r12424: static records should not be released
metze
(This used to be commit 3f90e72e5a)
2007-10-10 13:47:36 -05:00
Stefan Metzmacher
5b4acf8b10 r12412: - the 0x1E name must be registered as group name
- reject wins registration with a static record in the database

metze
(This used to be commit 66b57f5fbf)
2007-10-10 13:47:35 -05:00
Stefan Metzmacher
8a2385c933 r12287: move the wins.ldb into lockdir
metze
(This used to be commit bcf04a49e3)
2007-10-10 13:47:27 -05:00
Stefan Metzmacher
2e51b42c2c r12229: fix the expire time for released records
metze
(This used to be commit 6d355a9538)
2007-10-10 13:47:22 -05:00
Stefan Metzmacher
2759fc850b r12228: fix the expire time for RELEASED records
metze
(This used to be commit afb0f660a2)
2007-10-10 13:47:22 -05:00
Andrew Bartlett
a1827a1deb r12227: I realised that I wasn't yet seeing authenticated LDAP for the ldb
backend.

The idea is that every time we open an LDB, we can provide a
session_info and/or credentials.  This would allow any ldb to be remote
to LDAP.  We should also support provisioning to a authenticated ldap
server.

(They are separate so we can say authenticate as foo for remote, but
here we just want a token of SYSTEM).

Andrew Bartlett
(This used to be commit ae2f3a64ee)
2007-10-10 13:47:22 -05:00
Stefan Metzmacher
1fb792114a r12217: add my copyright
metze
(This used to be commit f251c57096)
2007-10-10 13:47:20 -05:00
Stefan Metzmacher
5c7707ddcb r12070: make sure a unique record with multiple addresses becauses mhomed
metze
(This used to be commit 4be3b576f2)
2007-10-10 13:47:05 -05:00
Stefan Metzmacher
7416dd1889 r12022: add NBTD IRPC proxy calls for wins challenge and wins release demand,
used for replication conflicts

metze
(This used to be commit d7d14cb2bd)
2007-10-10 13:47:00 -05:00
Stefan Metzmacher
363d2f69a8 r12021: remove shortpath for winsdb_lookup, this isn't needed
metze
(This used to be commit 8fb07b1ea8)
2007-10-10 13:47:00 -05:00
Tim Potter
03d301ead5 r11967: Fix more 64-bit warnings.
(This used to be commit 9c4436a124)
2007-10-10 13:46:52 -05:00
Stefan Metzmacher
c91bdb3af2 r11913: if we have a UNIQUE name with more than 1 address,
it becomes implicit an MHOMED record

metze
(This used to be commit a5bced92a9)
2007-10-10 13:46:48 -05:00
Stefan Metzmacher
3f80ecc0de r11912: fix nbt_name_registration, there's still some minor stuff todo,
e.g. to return the first address of the 0x1B address as first
     address in the 0x1C reply, and handle sgroup merge overflow
     of 25 addresses

metze
(This used to be commit a80280e061)
2007-10-10 13:46:48 -05:00
Stefan Metzmacher
d83048aac2 r11910: fix nbt_name_release and nbt_name_query, so that we pass the owned_released vs. replica
winsrepl torture test

metze
(This used to be commit c8c53593fc)
2007-10-10 13:46:47 -05:00
Stefan Metzmacher
dd47d5f93f r11900: - make sure address and registered_by are replaced when they're not present
- make sure we don't add active records with 0 addresses

metze
(This used to be commit 5e7324efb3)
2007-10-10 13:46:44 -05:00
Stefan Metzmacher
5257693496 r11877: - give winsdb_add/modify/delete() ldb_context as first argument
and add a flags argument to add and modify,the current flags are:

  WINSDB_FLAG_ALLOC_VERSION to allocate a new version id for the record
  WINSDB_FLAG_TAKE_OWNERSHIP to take the become the wins owner of the record
- fix handling of records with no addresses, this is valid for MHOMED and SGROUP
  records when they're not in ACTIVE state

metze
(This used to be commit 0ffea2a7b8)
2007-10-10 13:46:39 -05:00
Andrew Tridgell
cbb7a47cf2 r11711: fixed the nbt server to use the right interface for outgoing requests
(This used to be commit d87df5fe8e)
2007-10-10 13:46:16 -05:00
Stefan Metzmacher
3cdaf4c906 r11648: fix some bugs...
metze
(This used to be commit 475eb4cc96)
2007-10-10 13:46:08 -05:00
Simo Sorce
5c95905871 r11567: Ldb API change patch.
This patch changes the way lsb_search is called and the meaning of the returned integer.
The last argument of ldb_search is changed from struct ldb_message to struct ldb_result
which contains a pointer to a struct ldb_message list and a count of the number of messages.
The return is not the count of messages anymore but instead it is an ldb error value.

I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good
amount of places. I also tried to double check all my changes being sure that the calling
functions would still behave as before. But this patch is big enough that I fear some bug
may have been introduced anyway even if it passes the test suite. So if you are currently
working on any file being touched please give it a deep look and blame me for any error.

Simo.
(This used to be commit 22c8c97e6f)
2007-10-10 13:45:53 -05:00
Andrew Bartlett
4378c3c9cc r11373: Handle an apparent alias in NBT ntlogin replies.
Andrew Bartlett
(This used to be commit 51d55d2211)
2007-10-10 13:45:28 -05:00
Stefan Metzmacher
b0ea4f2386 r11329: the 0x1C must be registered as group name
metze
(This used to be commit 657d45d3e0)
2007-10-10 13:45:20 -05:00
Stefan Metzmacher
3aae4d0224 r11279: it should be only possible to register a 0x1C name, when the NBT_NM_GROUP flag is set
metze
(This used to be commit 81447f440c)
2007-10-10 13:45:13 -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
db5a0adb14 r11088: don't try to set empty strings values as attributes
our ldb doesn't support them, does w2k3 LDAP supports them?

metze
(This used to be commit 97cb22bd9d)
2007-10-10 13:44:46 -05:00
Stefan Metzmacher
c3c26c9008 r11087: - add type,name,scope as attributes to winsRecords,
so you can use them in search filters,
  only for administration not used inside the winserver code
- fix the samba3 ugrade scripts to create a correct samba4 wins.ldb

metze
(This used to be commit 9f3b6746d8)
2007-10-10 13:44:46 -05:00
Stefan Metzmacher
152aa5bd33 r11053: fix the logic,
this should fix make test

metze
(This used to be commit c7742a2829)
2007-10-10 13:44:43 -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
94a8893bf4 r11048: r10539@SERNOX: metze | 2005-09-27 14:59:47 +0200
fix the build for changes from SAMBA_4_0 branch

 metze
 r10541@SERNOX:  metze | 2005-09-27 15:05:33 +0200
 use a transaction when we allocate a new version

 metze
 r10549@SERNOX:  metze | 2005-09-27 18:58:37 +0200
 - add first start of wins pull replication
 - we not yet apply records to our database but we fetch them correct form our partners
   (we need conflict handling for this)
 - we also need to filter out our own records!

 metze
 r10568@SERNOX:  metze | 2005-09-28 11:33:04 +0200
 move composite helpers to a seperate file, create a a seperate file for the conflict resolving logic

 metze
 r10571@SERNOX:  metze | 2005-09-28 12:00:17 +0200
 add forward declarations...to fix the build

 metze
 r10612@SERNOX:  metze | 2005-09-29 16:11:06 +0200
 we have a nbt_name now, and don't need to parse it

 metze
 r10614@SERNOX:  metze | 2005-09-29 16:38:35 +0200
 filter out our own records

 metze
 r10620@SERNOX:  metze | 2005-09-29 18:07:08 +0200
 - handle mutliple addresses in WREPL_REPL_SEND_REPLY
 - make strings always valid talloc pointers

 metze
 r10621@SERNOX:  metze | 2005-09-29 18:09:41 +0200
 use debug level 2

 metze
 r10622@SERNOX:  metze | 2005-09-29 18:48:05 +0200
 - add one more debug message when we reply no record
 - fix min max logic

 metze
 r10623@SERNOX:  metze | 2005-09-29 20:49:06 +0200
 build fixes...

 metze
 r10629@SERNOX:  metze | 2005-09-30 00:11:41 +0200
 - use seperate attributes for type, state, nodetype, is_static

 ... the winserver.c code needs some more updates to correctly,
 create special group and multihomed registrations...

 metze
 r10640@SERNOX:  metze | 2005-09-30 04:07:34 +0200
 - add some short path for the composite helper functions
   they will be used in the next commit

 metze
 r10642@SERNOX:  metze | 2005-09-30 06:29:06 +0200
 fix the build

 metze
 r10655@SERNOX:  metze | 2005-09-30 17:36:49 +0200
 - implement the WREPL_REPL_UPDATE* and WREPL_REPL_INFORM*
   this includes the connection fliping into a client connection
   for WREPL_REPL_UPDATE*

 NOTE: I not yet found out how to get the w2k server to use INFORM against samba4
       it uses inform against w2k and w2k3 but UPDATE against nt4 and samba4

 what's left now is to be able to initiate INFORM and UPDATE requests to notify
 our pull partners

 metze
 r10727@SERNOX:  metze | 2005-10-05 14:11:05 +0200
 fix the build

 metze
 r10770@SERNOX:  metze | 2005-10-06 16:56:01 +0200
 - move the table filling to a seperate function, will be reused later
 - fix the build, wrepl_nbt_name fixes
 - remove state -> update_state

 metze
 r10771@SERNOX:  metze | 2005-10-06 17:04:48 +0200
 add a function to create a wreplsrv_in_connection from a client connection

 metze
 r10772@SERNOX:  metze | 2005-10-06 17:13:51 +0200
 - make the connection code more generic to handle the pull cached connection,
   push cached connection or given connections
 - when we don't use a cached connection, disconnection when a pull_cycle is done
 - fix the build and use the configured source ip

 metze
 r10773@SERNOX:  metze | 2005-10-06 17:18:49 +0200
 - add composite functions for push notification

 metze
 r10774@SERNOX:  metze | 2005-10-06 17:23:46 +0200
 - use periodic push notifycation, this is just for now
   as it needs to be configurable and and be triggered when the local database
   has changes since the last notify
 - I also need to work out how to decide if the partner supports
   persistent connections and WREPL_REPL_INFORM* messages

 metze
 r10923@SERNOX:  metze | 2005-10-12 16:52:34 +0200
 fix the build becuse of conflicts with main SAMBA_4_0 tree

 metze
(This used to be commit 6d97dd6e50)
2007-10-10 13:44:42 -05:00
Stefan Metzmacher
d387193913 r11047:
(This used to be commit 177d60f42a)
2007-10-10 13:44:42 -05:00
Stefan Metzmacher
4c6fb8de2f r11045:
(This used to be commit a2c6969306)
2007-10-10 13:42:35 -05:00
Stefan Metzmacher
5ec6aa1476 r11044:
(This used to be commit 914e16f567)
2007-10-10 13:42:35 -05:00
Stefan Metzmacher
f197180d8d r11042: r10361@SERNOX: metze | 2005-09-20 22:36:28 +0200
we should only use 255.255.255.255 for group records,
 only when we reply, not when the name is registered.
 the real address is used for replication

 metze
(This used to be commit 45a774c63c)
2007-10-10 13:42:34 -05:00
Stefan Metzmacher
3d7c2443b8 r11041: r10358@SERNOX: metze | 2005-09-20 21:40:03 +0200
fix some missing nbt_peer_socket cases

 metze
(This used to be commit bd25231c57)
2007-10-10 13:42:34 -05:00
Stefan Metzmacher
676b220f3e r11040: r10357@SERNOX: metze | 2005-09-20 21:28:11 +0200
- as the old records are broken sinse the last winsdb_dn() changes, (the dn components order was reversed)
   we can use nicer attribute and objectClass names...

 - use much more verbose error handling for winsdb_*
 - print a debug message when we found a corrupted record

 metze
(This used to be commit 82bad3f3ef)
2007-10-10 13:42:34 -05:00
Stefan Metzmacher
2f54bab951 r11036: r10349@SERNOX: metze | 2005-09-20 15:38:31 +0200
we know answer send_requests correctly

 metze
(This used to be commit aecc9ca1cc)
2007-10-10 13:42:33 -05:00
Stefan Metzmacher
e148b33f4b r11034: r10344@SERNOX: metze | 2005-09-20 11:35:54 +0200
create winsdb_record() and winsdb_message() as public functions
 so that they can be used in the wrepl_server/

 metze
(This used to be commit b8b48c8aa5)
2007-10-10 13:42:33 -05:00
Stefan Metzmacher
56e4a9dd2b r11030: r10338@SERNOX: metze | 2005-09-20 09:20:49 +0200
fix uninitialized variable

 metze
(This used to be commit e6fb40e51d)
2007-10-10 13:42:31 -05:00
Stefan Metzmacher
a76ffb574c r11029:
(This used to be commit 49e61d011c)
2007-10-10 13:42:31 -05:00
Stefan Metzmacher
6f0f39cab1 r11027: r10319@SERNOX: metze | 2005-09-19 18:31:23 +0200
- store the wins owner on the record and the wins owner and expire time on each address
 - we use "0.0.0.0" to mark entries which are registered at the local wins server
 - we use this ldif-format:
 address: 172.31.9.1;winsOwner:0.0.0.0;expireTime:20050923032337.0Z
 address: 172.31.1.1;winsOwner:172.31.9.202;expireTime:20050923032330.0Z

 metze
(This used to be commit 752025a0e1)
2007-10-10 13:42:16 -05:00
Stefan Metzmacher
4c297bac9d r11026: r10318@SERNOX: metze | 2005-09-19 16:38:15 +0200
move to struct winsdb_addr, (I'll add expiry_time and the wins_owner later

 tridge: can you please review the new winsdb_addr_* functions carefull, look for off-by-one bugs, etc.

 metze
(This used to be commit 72eba90465)
2007-10-10 13:42:16 -05:00
Stefan Metzmacher
1d55354663 r11025: r10313@SERNOX: metze | 2005-09-19 12:19:27 +0200
add wrapper functions for the "address" attribute in the winsdb,
 the goal is to store the expiry time and the wins owner per address,
 which is needed for wins replication

 metze
(This used to be commit 2fd3bbd044)
2007-10-10 13:42:16 -05:00
Stefan Metzmacher
0f6791edc6 r11024: r10311@SERNOX: metze | 2005-09-19 11:27:34 +0200
remove doublicate NULL-pointer check

 metze
(This used to be commit eb1dee0965)
2007-10-10 13:42:16 -05:00
Stefan Metzmacher
bab5662021 r11022: r10309@SERNOX: metze | 2005-09-19 11:08:37 +0200
- add winsdb_connect() function, so that the winsdb can be opened by the wrepl_server/ code
 - remove maintaining of a min_version field, as it was implemented incorrect, and is maybe not needed at all
 - fix handling of max_version, (we started with 0, on each server start)

 metze
(This used to be commit e6106e21a0)
2007-10-10 13:42:15 -05:00
Stefan Metzmacher
fccbbf3546 r10997: r11980@SERNOX (orig r10037): metze | 2005-09-05 14:21:40 +0200
add struct nbt_peer_socket and use it instead of passing const char *addr, uint16 port everyhwere

 (tridge: can you review this please, (make test works)

 metze
(This used to be commit a599d7a4ae)
2007-10-10 13:39:52 -05:00
Andrew Tridgell
33da2fabe6 r10914: moved the ldap time string functions into ldb so they can be used by
the time attribute handling functions
(This used to be commit 93c296d527)
2007-10-10 13:39:42 -05:00
Andrew Tridgell
a599edf04c r10913: This patch isn't as big as it looks ...
most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(

I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes

In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.

Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
(This used to be commit f6818daecc)
2007-10-10 13:39:41 -05:00
Andrew Tridgell
36d73b0e71 r10894: make the handling of dn/distinguishedName much closer to real
ldap. Also ensure we put a objectclass on our private ldb's, so they
have some chance of being stored in ldap if you want to
(This used to be commit 1af2cc067f)
2007-10-10 13:39:40 -05:00
Andrew Bartlett
1377cca5f4 r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
(This used to be commit fd7203789a)
2007-10-10 13:39:32 -05:00
Andrew Tridgell
7b38c1db1b r10706: split out the irpc server functions in the NBT server, so the mainline
NBT server code remains reabable. Also fixed the copyright header to
include Volker, as he wrote the getdc server function
(This used to be commit a973197d3e)
2007-10-10 13:39:22 -05:00
Volker Lendecke
33834e2dda r10675: Connect to the DC's IPC$
Volker
(This used to be commit c755788484)
2007-10-10 13:39:17 -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
Stefan Metzmacher
ab4d635b92 r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
(This used to be commit 4527815a0a)
2007-10-10 13:38:57 -05:00
Volker Lendecke
9593101ec1 r10491: First step towards wbinfo -t: This issues a name request for the primary
domain and gets the DC's name via a mailslot call.

Metze, I renamed wbsrv_queue_reply to wbsrv_send_reply in accordance with
irpc_send_reply. Having _queue_ here and _send_ there is a bit confusing. And
as everything is async anyway, the semantics should not be too much of a
problem.

Volker
(This used to be commit 4637964b19)
2007-10-10 13:38:54 -05:00
Simo Sorce
63b43dd12f r10477: expose transactions outside ldb and change the API once more
do not autostart transactions on ldb operations if a transaction is already in place
test transactions on winsdb

all my tests passes so far
tridge please confirm this is ok for you
(This used to be commit c2bb2a36bd)
2007-10-10 13:38:52 -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
95040e9341 r10252: a recent checkin from simo changed the handling of BASE and SUBTREE
searches in ldb to be more ldap compliant, but broke the wins server
and the ejs ldb code. This fixes those up so 'make test' passes again.
(This used to be commit dff660c23c)
2007-10-10 13:38:11 -05:00
Stefan Metzmacher
1e05f9a00a r10081: - create a seperate WINSDB subsystem
- use LIBCLI_WREPL for the winsreplication client code
- fix some dependencies

metze
(This used to be commit 7dd931ee5a)
2007-10-10 13:37:51 -05:00
Simo Sorce
3e4c4cff21 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
(This used to be commit 692e35b779)
2007-10-10 13:33:32 -05:00
Andrew Bartlett
e7d87f8538 r9011: Remove more references to "name" as a netbios name, using the
cross-reference instead.

Andrew Bartlett
(This used to be commit 0f7b1136f6)
2007-10-10 13:31:07 -05:00
Andrew Tridgell
f4b488ec01 r8734: fixed the wins server for the new ldb DN restrictions.
This gets it working, but I'm rather worried about the speed. We used
to get more than 5000 ops/sec, but now we are down to around 15
ops/sec. I suspect a bug in ldb.
(This used to be commit 83727bf72c)
2007-10-10 13:29:59 -05:00
Andrew Tridgell
ab9cef60a0 r8588: register wins server with irpc
(This used to be commit dc0ea36344)
2007-10-10 13:29:42 -05:00
Andrew Tridgell
c7304b3ab8 r8285: generate some real stats in the nbt server for the irpc client code to look at
(This used to be commit 73643884a3)
2007-10-10 13:19:31 -05:00
Andrew Tridgell
c6881d1e65 r8272: added the hooks for adding a name to a messaging context, so we will
be able to send a message to the "ldap_server" task without having to
know its task ID.
(This used to be commit 8f69867867)
2007-10-10 13:19:29 -05:00
Stefan Metzmacher
9bf7217aa2 r7955: we should not free a struct which is passed as a parameter, to a function
the caller should free it

this fixed a double free bug noticed by
Дейтер Александр Валериевич <tiamat@komi.mts.ru> 

metze
(This used to be commit ee1a5d5419)
2007-10-10 13:18:53 -05:00
Andrew Tridgell
b3e493470f r7911: task_terminate() is defined in the macosx headers, so change the name
to task_server_terminate()
(This used to be commit a7447e25ac)
2007-10-10 13:18:48 -05:00
Andrew Bartlett
fdc2be2cd6 r7378: Lowercase netbios name when forming the DNS name of the DC in the
NETLOGON reply.

Use the kdc server service to determine if we are a kdc (no more
krb5:kdc=yes).

Andrew Bartlett
(This used to be commit fe9cdb063c)
2007-10-10 13:17:48 -05:00
Andrew Tridgell
412e4bd820 r7321: add nbtd statistics serving over irpc
(This used to be commit 4c0ed7328b)
2007-10-10 13:17:41 -05:00
Stefan Metzmacher
45511bd09b r6904: use "krb5:kdc=yes" in your smb.conf when you have the lorikeet-heimdal kdc running
metze
(This used to be commit fa652919bd)
2007-10-10 13:16:56 -05:00
Simo Sorce
9d81592be3 r6768: Fix wrong comment
(This used to be commit 2f80b2070f)
2007-10-10 13:16:42 -05:00
Andrew Tridgell
0b5fe8f7e1 r6750: some minor tweaks to the cldapd server
I can now join winxp -> samba4 DC using long name, and login. The nice
thing is there are no delays now, as the client likes the replies it gets
(This used to be commit 5aff7d36f3)
2007-10-10 13:16:41 -05:00
Andrew Tridgell
7fc9f65318 r6618: only print the netlogon packets we receive if it is an unknown packet type
(This used to be commit 8229fe4dd5)
2007-10-10 13:16:31 -05:00
Andrew Tridgell
0ab612f69e r6339: set the NBT_SERVER_LDAP and NBT_SERVER_KDC bits based on config
(andrew, please fix the method of sseeing if we do krb5, if you can
think of a better one)
(This used to be commit 4c2207c946)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
e284a26294 r6338: ADS style GETDC response now works well enough that WinXP can join
Samba4 without Samba3 nmbd
(This used to be commit f4d07d7d3b)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
63ddff3d7b r6323: added server side support for dgram NTLOGON requests. NT4 workstations can now login
to a Samba4 domain.
(This used to be commit df146d64eb)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
f06e39e308 r6321: added IDL and test suite for NBT dgram 'sam logon' request (sent by
clients when a user tries to login)
(This used to be commit 08ded62156)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
b6fd09d805 r6320: some minor netlogon datagram fixes - NT4 can now join a Samba4 domain without
Samba3 nmbd
(This used to be commit 4507bdc339)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
b708e87a63 r6288: the nbt dgram server now responds to GETDC requests. It works with our
test suite, but doesn't yet seem to satisfy a nt4 client. I'm
investigating.
(This used to be commit 406217262d)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
b0ca8ed455 r6247: added the server side code for receiving mailslot requests, and
parsing incoming netlogon requests. No replies are sent yet.
(This used to be commit 3b34df6a67)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
a47cb58c2f r6184: the beginnings of the libcli/dgram/ library, and the dgram
server. Currently just listens on port 138 and parses the packets
(using IDL like the rest of NBT). This allows me to develop the
structures and test with real packets
(This used to be commit 10d64a5253)
2007-10-10 13:11:24 -05:00
Simo Sorce
b1b14817ea r5585: LDB interfaces change:
changes:
- ldb_wrap disappears from code and become a private structure of db_wrap.c
  thanks to our move to talloc in ldb code, we do not need to expose it anymore

- removal of ldb_close() function form the code
  thanks to our move to talloc in ldb code, we do not need it anymore
  use talloc_free() to close and free an ldb database

- some minor updates to ldb modules code to cope with the change and fix some
  bugs I found out during the process
(This used to be commit d58be9e74b)
2007-10-10 13:10:55 -05:00
Andrew Tridgell
b0fc1bfbcb r5454: moved the WINS server code into its own directory
(This used to be commit 0bb997127f)
2007-10-10 13:10:48 -05:00
Andrew Tridgell
12d4b8a951 r5418: - added version numbers to WINS database records in preparation for adding server side
replication support

- on a WACK registration success, check that the database record
  hasn't changed during the WACK processing. If it has, then fail
  the registration
(This used to be commit 2acd79b959)
2007-10-10 13:10:44 -05:00
Andrew Tridgell
4c7c38e930 r5411: make network interface selection a bit saner
- if we have no configured network interfaces, then don't start nbtd (when I add dynamic
  interface loading this will change to a delay until a network interface comes up)

- choose the best interface by netmask for torture tests that need a
  specific IP (such as the WINS test). Added iface_best_ip() for that.

- if specific interfaces are chosen in smb.conf, then keep that ordering, and
  default to the first one listed
(This used to be commit 4d08c11407)
2007-10-10 13:10:43 -05:00
Andrew Tridgell
39713c703d r5408: - added testing for the behaviour of the special 0x1c name
- added WINS server support for the 0x1c name
(This used to be commit 1558a54528)
2007-10-10 13:10:43 -05:00
Andrew Tridgell
97b2a6f7ed r5397: added testing and server support for the special handling required for the 0x1d local master browser name
in WINS
(This used to be commit 2650b43ca9)
2007-10-10 13:09:51 -05:00
Andrew Tridgell
352de700ca r5392: added "secure" WINS server processing. Send a WACK on name
registrations from anyone who isn't a current owner, then query the
owner addresses to see if they still want it.
(This used to be commit 8dc2a028d3)
2007-10-10 13:09:50 -05:00
Andrew Tridgell
ca792c6e36 r5387: - added automatic WINS server record expiry
- added support for group names in registration and query
(This used to be commit 3690a65bef)
2007-10-10 13:09:50 -05:00
Andrew Tridgell
ffa5c91d0f r5375: use a real DN in the WINS database. We now pass the NBT-WINS test.
(This used to be commit 807a3a1f80)
2007-10-10 13:09:48 -05:00
Andrew Tridgell
e199f4cef2 r5358: - added initial WINS server code. It passes most of the NBT-WINS test, but doesn't yet
do secure server WACK responses

- added a ldap_string_to_time() function, for converting a LDAP
  formatted time to a time_t
(This used to be commit 9aa3313b3f)
2007-10-10 13:09:45 -05:00
Andrew Tridgell
7b8f58c37c r5352: added a function nbt_name_string() that formats a nbt_name structure
as a human readable string. The format is designed to be able to be
used as the DN for the WINS database as well, while coping with
arbitrary bytes in the name (except nul bytes)
(This used to be commit aac3090e35)
2007-10-10 13:09:45 -05:00
Andrew Tridgell
0487eee93a r5346: - a bit more preparation for the WINS server going in
- more NBT packet asserts, to ensure that incoming requests have all
  the elements we depend on

- open the WINS database at startup if we are configured as a WINS server

- split out the nbtd server reply packet generation code so it can be
  shared by the WINS server

- re-did the logic of what is answered by the WINS server and what by
  the B node server. It now always tries to answer by the B node, and
  only "recurses" to the WINS server for names that are not found.
(This used to be commit 5613e6b8ad)
2007-10-10 13:09:44 -05:00
Andrew Tridgell
30ce2c49c5 r5329: made the nbt server case sensitive
(This used to be commit 8950718819)
2007-10-10 13:09:43 -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
b9bb7f596d 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 bb1ab11d8e)
2007-10-10 13:09:37 -05:00
Andrew Tridgell
998c856d90 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 f7712ac746)
2007-10-10 13:09:36 -05:00
Andrew Tridgell
fcb78064bf 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 919bc14e7b)
2007-10-10 13:09:35 -05:00
Andrew Tridgell
d09311baa7 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 a9128f6544)
2007-10-10 13:09:35 -05:00
Andrew Tridgell
a75e9a3ee9 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 a1553fa805)
2007-10-10 13:09:34 -05:00
Andrew Tridgell
6348a343de r5222: made the nbtd_self_packet() code more efficient
(This used to be commit 8fe477955d)
2007-10-10 13:09:32 -05:00
Andrew Tridgell
5da52d3209 r5216: don't defend group names against incoming name registration requests
(This used to be commit c5f5e1d401)
2007-10-10 13:09:32 -05:00
Andrew Tridgell
6357adc6ee r5215: register aliases as both client and server node types, so nmblookup can see them
(This used to be commit 3e9788691f)
2007-10-10 13:09:32 -05:00
Andrew Tridgell
32899da200 r5214: added support for "netbios aliases" in smb.conf
(This used to be commit 3270b07539)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
c832e57ceb 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 3935b5f7c5)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
1b27d0ce12 r5212: added checking for receiving our own packets as broadcasts
(This used to be commit 290dbd8cdc)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
9eb33fc212 r5211: added broadcast name defense against both registration and refresh
requests
(This used to be commit 9eafe2caca)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
bd22848ad8 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 b07a7e35f2)
2007-10-10 13:09:31 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
dc35a0eb4f r5196: fixed sily bug (that metze found)
(This used to be commit 180f29f9e0)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
66170ef8b3 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 d7b4b6de51)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
906ca09578 r5172: actually bind to the right address for the wildcard interface ....
(This used to be commit 7720d247fe)
2007-10-10 13:09:28 -05:00
Andrew Tridgell
77cdd7c0ff 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 b3edf17281)
2007-10-10 13:09:28 -05:00
Andrew Tridgell
9b9c23b19b 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 72048e3717)
2007-10-10 13:09:28 -05:00
Stefan Metzmacher
1545d6ecf4 r5147: remove unused var
metze
(This used to be commit 79e79552e6)
2007-10-10 13:09:27 -05:00
Stefan Metzmacher
ca3f70256a 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 abacbc9192)
2007-10-10 13:09:27 -05:00
Andrew Tridgell
9a70f446fc 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 cf11d05e35)
2007-10-10 13:09:25 -05:00
Andrew Tridgell
2e953b967a r5121: added periodic name refresh requests for all our registered names, reporting any
name conflicts
(This used to be commit 69e6a1cd4b)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
aa985bdee0 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 2dd7ccf724)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
5e6082b4b0 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 d656fba6f1)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
414f6c80b2 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 d7d31fdc66)
2007-10-10 13:09:23 -05:00
Andrew Tridgell
37449657a8 r5109: - fixed handling of zero-length subcontexts in the ndr library
- added error checking on socket startup in nbtd
(This used to be commit 5707ebc9ec)
2007-10-10 13:09:23 -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