summaryrefslogtreecommitdiff
path: root/source4/lib
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r5437: Allow Samba4 to be compiled by tcc (www.tinycc.org). It still crashes ↵Jelmer Vernooij1-3/+3
when linking though. (This used to be commit 2e1e8db6dc877eb32b51cfc3d9c8f463d14530ec)
2007-10-10r5411: make network interface selection a bit sanerAndrew Tridgell1-1/+16
- 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 4d08c114079ef6d1d10a96195046fe43631aefa2)
2007-10-10r5407: - this patch makes samba's event loop code more generic and makesStefan Metzmacher6-191/+701
using other implementations possible. This will be mostly usefull for client apps which have there own event loop and want to use our client libs - add a example plugin for liboop (see http://liboop.org) NOTE: this just compiles and is completly untested and is commited only as example metze (This used to be commit b3d0a410efe856e3bcf127f00c31905f5a23cc04)
2007-10-10r5401: using talloc_array() is neater hereAndrew Tridgell1-1/+1
(This used to be commit b35ee83536e01c000aace2f4764f6727efd63170)
2007-10-10r5393: trigger timed events not to early, better do it a bit to lateStefan Metzmacher1-1/+2
metze (This used to be commit 67bf637e9a44202061fd71c92142f835ba76da89)
2007-10-10r5392: added "secure" WINS server processing. Send a WACK on nameAndrew Tridgell1-0/+51
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 8dc2a028d3ca0115d3173df435d926d7b6a4d5d5)
2007-10-10r5374: - changed the dn key code in the ldb tdb backend to correctly honorAndrew Tridgell4-6/+96
the case sensitive/insensitive flags on sections of a dn. So if a dn is made up of 4 attributes, and 2 of those are case insensitive and 2 are case sensitive, then all the attribute names are uppercases, but only the values of the case insensitive attributes are uppercased when forming the tdb key. - added code to canonicalise the dn, removing leading and trailing spaces from attribute names and values - when the @ATTRIBUTES record changes, fix the dn keys of any records that should now have new dn keys due to changes in the case sensitivity of the record I really did this to allow me to make the WINS database properly case insensitive, but it is also the correct general fix for ldb, as it matches the LDAP specification (and w2k LDAP server behaviour) (This used to be commit 0f034dc5636d182a1d9207ad662b3fc8df7ca3e4)
2007-10-10r5373: prepare infrastructure for maing different eventsStefan Metzmacher2-1/+1
implementations possible metze (This used to be commit dd77ec754b811feb147458d76fa16833767dccea)
2007-10-10r5370: epoll gives more precise event bits like EPOLLHUP instead of just ↵Andrew Tridgell1-1/+2
EPOLLIN. We need to map these to "read" events for the events code to work on errors like connection refused (thanks to vl for noticing this bug) (This used to be commit 7c379590b4ca808eddef5c3ac15db25cefc5215b)
2007-10-10r5358: - added initial WINS server code. It passes most of the NBT-WINS ↵Andrew Tridgell1-3/+25
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 9aa3313b3f93e47e3f93028e072f6a23b3c22385)
2007-10-10r5357: added ldb_msg_add_fmt(), for creating formatted ldb record valuesAndrew Tridgell2-0/+24
(This used to be commit 18fb48204f4c0e22ea7e61575b3f174f30ff035c)
2007-10-10r5330: Remove #include <sys/time.h> from includes.h.Andrew Bartlett2-0/+2
Add #include "system/time.h" back (it was removed in some of these places because the definitions were provided by <sys/time.h> on tridge's platform.) Andrew Bartlett (This used to be commit 34b1da730304bed7fee5bae7cbde7fbccecb6af5)
2007-10-10r5308: trimmed back a lot of the old macros from smb_macros.hAndrew Tridgell3-7/+6
(This used to be commit bf43c9bdcf9e654d123f6a2b29feb9189ca9e561)
2007-10-10r5307: removed db_wrap.h from includes.hAndrew Tridgell3-0/+3
(This used to be commit 826baec7b348814a7bbdcdbec8c8526514f25da1)
2007-10-10r5306: removed all the unused mutex functions from mutex.c. When (if?) weAndrew Tridgell1-91/+1
decide to reinstate the mutex code for the threads process model, I'd like to do it a little differently. At least this gets it out of includes.h for now. (This used to be commit cfee0fb02e10add22b6c436bdfa95d1a8f5f3def)
2007-10-10r5304: removed lib/socket/socket.h from includes.hAndrew Tridgell8-0/+50
(This used to be commit b902ea546d2d1327b23f40ddaeeaa8e7e3662454)
2007-10-10r5303: fixed build of gconf registry backendAndrew Tridgell1-1/+1
(This used to be commit b4993c738ba7ce38de4eaf6270db60f8cd551cdd)
2007-10-10r5302: fixed a compilation problem on solaris caused by the recent includeAndrew Tridgell1-17/+14
changes (This used to be commit e7e015f79b10c353848a17f31c91a0593790a560)
2007-10-10r5300: more uint32 and system/filesys.h build fixes when developer mode is ↵Andrew Tridgell1-0/+1
enabled (This used to be commit 93931b1a741a3722c311ada80c4c9d3d670f91b2)
2007-10-10r5299: fixed an include ordering problemAndrew Tridgell1-1/+1
(This used to be commit 483b7af1fd6e3caa1db2f6b31ac6165d29ea7512)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell40-13/+73
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)
2007-10-10r5297: ensure pstring is not in the generated prototypesAndrew Tridgell2-6/+1
(This used to be commit b4103d9f2b809408572521f385d4e7a5ba412169)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell12-5/+15
- 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)
2007-10-10r5294: - added a separate NBT-WINS test for WINS operations (register, ↵Andrew Tridgell1-44/+15
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)
2007-10-10r5292: ensure we cleanup the epoll_fd on event context destructionAndrew Tridgell1-0/+17
(This used to be commit e820fca5062026810c5bd4827941f34c19a5e847)
2007-10-10r5284: this is needed on my serverStefan Metzmacher1-0/+2
+/* 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)
2007-10-10r5274: fixed some const warnings by making the str_list_ functions return ↵Andrew Tridgell1-7/+7
"const char **" (This used to be commit 4165f2163530c7d2ffbea2922fbfe942eee85e7a)
2007-10-10r5273: fixed another bug in the code that keeps timed eventsAndrew Tridgell1-2/+2
sorted. Hopefully it really works now :-) (This used to be commit 34e1a3ad7849df913584074ec406c2fcc40212fc)
2007-10-10r5240: Don't return WERR_OK when no values were found (reported by Matt Cobb)Jelmer Vernooij1-4/+4
(This used to be commit f2e6d71584672e9bf0eaa7176d76781a30d317d1)
2007-10-10r5221: replace the str_list_*() code with new code based on talloc(). This isAndrew Tridgell1-111/+79
a precursor to adding the wins client code in the nbt server. (This used to be commit e8e499755ab667015740b35a7787134ebe852954)
2007-10-10r5217: avoid epoll_ctl() if the event flags are already set correctlyAndrew Tridgell1-1/+4
(This used to be commit d89b493aaf690ceb107bd62df75f1bba82284f90)
2007-10-10r5199: fix some minor configure bugsStefan Metzmacher1-1/+1
metze (This used to be commit 274ef2a206aa00b3155adc27f5b7e35d3fa52bf6)
2007-10-10r5198: don't consider failure to remove an epoll event as enough reason toAndrew Tridgell1-4/+2
fallback to select(). This can happen in too many situations. (This used to be commit 2d7242f2ec945c1e5fbc6f256265471f60ac8cd9)
2007-10-10r5197: moved events code to lib/events/ (suggestion from metze)Andrew Tridgell6-11/+75
(This used to be commit 7f54c8a339f36aa43c9340be70ab7f0067593ef2)
2007-10-10r5195: most events don't need the time of the event, so save a ↵Andrew Tridgell2-11/+7
gettimeofday() call and just use timeval_current() when its actually needed (This used to be commit 236403cc4dc2924ed6a898acae0bb44cc1688dcc)
2007-10-10r5194: added support for using epoll instead of select() on systems that haveAndrew Tridgell1-48/+220
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)
2007-10-10r5189: fixed a double free bug in the ltdb indexing codeAndrew Tridgell1-7/+0
(This used to be commit 7be0bc93bd6757e52fd10bd3d3b3d1a8f5221452)
2007-10-10r5187: ordered the timed events in the events code, which makes processingAndrew Tridgell1-77/+65
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)
2007-10-10r5185: make all the events data structures private to events.c. This willAndrew Tridgell3-143/+128
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)
2007-10-10r5170: fixed a bug handling events that have already timed out - they wereAndrew Tridgell1-8/+4
being treated as events that never time out, so they happened on the next other event (This used to be commit 2eefe4f8dea4a9060f229417777435133c684a0c)
2007-10-10r5143: don't generate prototypes for lib/tdb/Stefan Metzmacher3-1/+12
metze (This used to be commit 1c48c30aaf58d069cdba2f59b5c012bc4bdd3efc)
2007-10-10r5142: fix compiler warningStefan Metzmacher1-1/+1
metze (This used to be commit d8aeb69ea85cc0df89e213482c446eb8e793bc86)
2007-10-10r5135: I prepare a clean up in includes.hStefan Metzmacher2-1/+4
metze (This used to be commit 670e088e94468a5311353dbbaa7e34d200999313)
2007-10-10r5134: - fix types to always use _t typesStefan Metzmacher5-8/+11
- add #include "system/filesys.h" where needed metze (This used to be commit 6bb07a0ed8a4baaeaa1d63bde8ce773364860fd2)
2007-10-10r5129: make sure we don't spin chewing CPU time due to my last changeAndrew Tridgell1-1/+5
(This used to be commit 69e97ad9c397261cd6edb6f7504021942f16c0ec)
2007-10-10r5123: fixed a bug in the timed events handling. It was possible for a timedAndrew Tridgell2-11/+26
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)
2007-10-10r5119: fflush after talloc reports to ensure they are fully on disk when ↵Andrew Tridgell1-1/+2
using tee (This used to be commit e73e49aaa64f6f976918f087cf196b00eecc3eb2)
2007-10-10r5114: the nbtd task can now act as a basic B-node server. It registers itsAndrew Tridgell2-168/+14
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)
2007-10-10r5108: the beginnings of a nbtd server for Samba4. Currently just displaysAndrew Tridgell2-0/+4
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)
2007-10-10r5107: moved the horrible ldap socket code, and the even worseAndrew Tridgell1-175/+0
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)