summaryrefslogtreecommitdiff
path: root/source4/nbt_server/wins/winsdb.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r17516: Change helper function names to make more clear what they are meant ↵Simo Sorce1-11/+11
to do (This used to be commit ad75cf869550af66119d0293503024d41d834e02)
2007-10-10r15956: fix warningsStefan Metzmacher1-3/+3
metze (This used to be commit e874a099667c7213cc8dda0a94bf749d7706fbb5)
2007-10-10r14464: Don't include ndr_BASENAME.h files unless strictly required, insteadJelmer Vernooij1-0/+1
try to include just the BASENAME.h files (containing only structs) (This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd)
2007-10-10r13924: Split more prototypes out of include/proto.h + initial work on headerJelmer Vernooij1-0/+3
file dependencies (This used to be commit 122835876748a3eaf5e8d31ad1abddab9acb8781)
2007-10-10r13117: the caller may reference the winsdb_addr struct,Stefan Metzmacher1-1/+0
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 2a7e22c1171475976d26c6f23ab9c6a19703e718)
2007-10-10r13116: make sure we don't add more than 25 addresses to a record,Stefan Metzmacher1-4/+129
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 602ec0f1c66e6cb9e958e0e7cc10d3294737378a)
2007-10-10r13087: don't store timestamps for static recordsStefan Metzmacher1-18/+22
(only a per record timestamp when it's not active) metze (This used to be commit aba54b870852a9e1ccc442703591fda0f5bde51b)
2007-10-10r13060: - return only active addresses in name query responsesStefan Metzmacher1-14/+41
- replicate only active addresses metze (This used to be commit 6325abd95c5df855e8d1de2be9745940a29ba00a)
2007-10-10r12909: add an ldb module for the wins.ldb,Stefan Metzmacher1-4/+79
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 a6f279bc43c74cf4dc116cb6ba99f1aed13a4de9)
2007-10-10r12898: prepare the 'wins hook' feature, but we only debug out a 'TODO: run ↵Stefan Metzmacher1-0/+6
script ...' metze (This used to be commit d28c8ce66db61cff193ac06e8e5d7d6aa5059e9e)
2007-10-10r12897: make it possible to use nosync transaction to speed things up,Stefan Metzmacher1-1/+6
(just for testing) metze (This used to be commit 677c1aa4663e9e5f0729a312152565a6740dbab2)
2007-10-10r12779: allow static tomstonesStefan Metzmacher1-9/+3
metze (This used to be commit 966872646e5ac38ed5b3eb41cf339ec8f1583f17)
2007-10-10r12755: check the return value of ldb_timestring(), as this fails,Stefan Metzmacher1-4/+13
when gmtime() fails... metze (This used to be commit 523746f2712371041800301294c73bb7686bf2d5)
2007-10-10r12673: create functions for get_maxVersion(), set_maxVersion() and ↵Stefan Metzmacher1-9/+73
get_seqnumber() at the winsdb layer. the ones in wrepl_server/ will be removed later. metze (This used to be commit 22cdbc75df3bedfc651891f708a3439ccc77abcc)
2007-10-10r12619: make sure we don't return more than 25 addresses, as w2k3 crashes in ↵Stefan Metzmacher1-0/+4
that case I still need to make sure we didn't write such records to our database... metze (This used to be commit d0dc0ffa3160041e137b629b4dbbe821044edfe3)
2007-10-10r12618: use our primary interface address or the "winsdb:local_owner" -addressStefan Metzmacher1-15/+23
as winsOwner: attrbute for owned records metze (This used to be commit 37dece8304c0b9887740f4d4e8096732045a1785)
2007-10-10r12617: create a winsdb_handle and pass that arround,Stefan Metzmacher1-10/+26
so we later can hang the local owner address, on this handle too metze (This used to be commit 49ba4cc11144671cafcbe2967954bfd786ea6e76)
2007-10-10r12608: Remove some unused #include lines.Jelmer Vernooij1-1/+0
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10r12542: Move some more prototypes out to seperate headersJelmer Vernooij1-0/+1
(This used to be commit 0aca5fd5130d980d07398f3291d294202aefe3c2)
2007-10-10r12535: - simplify string list handling in a couple of places using ↵Andrew Tridgell1-8/+3
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 df00f8b3428c6d1254e66275c90ae4025cb52c47)
2007-10-10r12429: make static records always active with a max expire timeStefan Metzmacher1-0/+20
metze (This used to be commit 387d680b6f7d3470841a3c0ad3963b0c14853e45)
2007-10-10r12287: move the wins.ldb into lockdirStefan Metzmacher1-2/+2
metze (This used to be commit bcf04a49e329af6c2a72c0a9cf037cc4efeeb26f)
2007-10-10r12227: I realised that I wasn't yet seeing authenticated LDAP for the ldbAndrew Bartlett1-1/+2
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 ae2f3a64ee0b07575624120db45299c65204210b)
2007-10-10r12217: add my copyrightStefan Metzmacher1-1/+2
metze (This used to be commit f251c5709678415521b3ebae413a6616daa6e50a)
2007-10-10r12070: make sure a unique record with multiple addresses becauses mhomedStefan Metzmacher1-0/+3
metze (This used to be commit 4be3b576f2926279686ecada52144b9df8165a03)
2007-10-10r12021: remove shortpath for winsdb_lookup, this isn't neededStefan Metzmacher1-6/+5
metze (This used to be commit 8fb07b1ea8fdf353da832212289aceef20495bda)
2007-10-10r11967: Fix more 64-bit warnings.Tim Potter1-2/+2
(This used to be commit 9c4436a124f874ae240feaf590141d48c33a635f)
2007-10-10r11900: - make sure address and registered_by are replaced when they're not ↵Stefan Metzmacher1-0/+9
present - make sure we don't add active records with 0 addresses metze (This used to be commit 5e7324efb338f4c4e390e4930d7ea21056db3a57)
2007-10-10r11877: - give winsdb_add/modify/delete() ldb_context as first argumentStefan Metzmacher1-47/+60
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 0ffea2a7b898b1807e4cdcfbbeba9bd0c6792231)
2007-10-10r11567: Ldb API change patch.Simo Sorce1-19/+18
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 22c8c97e6fb466b41859e090e959d7f1134be780)
2007-10-10r11088: don't try to set empty strings values as attributesStefan Metzmacher1-2/+2
our ldb doesn't support them, does w2k3 LDAP supports them? metze (This used to be commit 97cb22bd9d7f786e9c1609ce97fcd8c54e5725bf)
2007-10-10r11087: - add type,name,scope as attributes to winsRecords,Stefan Metzmacher1-0/+7
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 9f3b6746d86583c48097da48c28f50f075bbd3e3)
2007-10-10r11052: bring samba4 uptodate with the samba4-winsrepl branch,Stefan Metzmacher1-285/+58
before the bad merge metze (This used to be commit 471c0ca4abb17fb5f73c0efed195c67628c1c06e)
2007-10-10r11048: r10539@SERNOX: metze | 2005-09-27 14:59:47 +0200Stefan Metzmacher1-15/+16
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 6d97dd6e50423758d081459ec551f4e04dfd818d)
2007-10-10r11047:Stefan Metzmacher1-8/+70
(This used to be commit 177d60f42ac05da2efe47fe4911bc5818662a7cd)
2007-10-10r11045:Stefan Metzmacher1-0/+52
(This used to be commit a2c6969306a18b0bb9629b3eae8a5e4a1aeae285)
2007-10-10r11044:Stefan Metzmacher1-0/+52
(This used to be commit 914e16f5676234862ebaf5d3c6e02bc1eb47ce51)
2007-10-10r11040: r10357@SERNOX: metze | 2005-09-20 21:28:11 +0200Stefan Metzmacher1-43/+93
- 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 82bad3f3efec5b706a65e65054787f1486d7c875)
2007-10-10r11036: r10349@SERNOX: metze | 2005-09-20 15:38:31 +0200Stefan Metzmacher1-0/+40
we know answer send_requests correctly metze (This used to be commit aecc9ca1cc78ce5ea766954629c03ea866c36bc1)
2007-10-10r11034: r10344@SERNOX: metze | 2005-09-20 11:35:54 +0200Stefan Metzmacher1-21/+34
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 b8b48c8aa5f741ad020d0a4debac665f8b2953ab)
2007-10-10r11029:Stefan Metzmacher1-16/+96
(This used to be commit 49e61d011c702ae51982d45025ad35e44a6c39d6)
2007-10-10r11027: r10319@SERNOX: metze | 2005-09-19 18:31:23 +0200Stefan Metzmacher1-7/+86
- 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 752025a0e10bfea646784087b5128841ec127a65)
2007-10-10r11026: r10318@SERNOX: metze | 2005-09-19 16:38:15 +0200Stefan Metzmacher1-7/+107
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 72eba90465c478ac9d363ed0c88efea27afd158e)
2007-10-10r11025: r10313@SERNOX: metze | 2005-09-19 12:19:27 +0200Stefan Metzmacher1-1/+20
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 2fd3bbd0449af3702bf473f97474bc1343f7a502)
2007-10-10r11024: r10311@SERNOX: metze | 2005-09-19 11:27:34 +0200Stefan Metzmacher1-3/+0
remove doublicate NULL-pointer check metze (This used to be commit eb1dee09652beb6d401cdc2058427db5f18bea67)
2007-10-10r11022: r10309@SERNOX: metze | 2005-09-19 11:08:37 +0200Stefan Metzmacher1-24/+29
- 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 e6106e21a0b097ec45948a08f499e44d32db8d2a)
2007-10-10r10914: moved the ldap time string functions into ldb so they can be used byAndrew Tridgell1-2/+2
the time attribute handling functions (This used to be commit 93c296d52718e77f8b702e1721b548eaadc56c76)
2007-10-10r10913: This patch isn't as big as it looks ...Andrew Tridgell1-11/+10
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 f6818daecca95760c12f79fd307770cbe3346f57)
2007-10-10r10894: make the handling of dn/distinguishedName much closer to realAndrew Tridgell1-0/+1
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 1af2cc067f70f6654d08387fc28def67229bb06a)
2007-10-10r10477: expose transactions outside ldb and change the API once moreSimo Sorce1-5/+34
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 c2bb2a36bdbe0ec7519697a9a9ba7526a0defac2)