summaryrefslogtreecommitdiff
path: root/source4/lib
AgeCommit message (Collapse)AuthorFilesLines
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)
2007-10-10r5106: removed a bunch of unused socket functions. We still needAndrew Tridgell1-373/+1
open_socket_out() as its used by the ldap client code (uggh) (This used to be commit 95d9766be8b08b7ca52c24d4ed3313e147edb159)
2007-10-10r5105: removed some unused events functions. These are no longer needed asAndrew Tridgell1-30/+0
destructors are used to remove pending socket events (This used to be commit ce62105434ab02e94e38897409c3512905c48f02)
2007-10-10r5104: - added support for task based servers. These are servers that withinAndrew Tridgell1-26/+0
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 (This used to be commit 339964a596689278d2138cff05d7d444798a3504)
2007-10-10r5102: This is a major simplification of the logic for controlling top levelAndrew Tridgell1-11/+11
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 (This used to be commit cf6a46c3cbde7b1eb1b86bd3882b953a2de3a42e)
2007-10-10r5093: Make debugs less confusing when a 0 NTTIME is printed.Andrew Bartlett1-1/+5
Andrew Bartlett (This used to be commit 9493c47b1833a4a7781303f8139f1636f86bf126)
2007-10-10r5092: Add a bit more const - moving it further into the LDB layer.Andrew Bartlett2-3/+3
Andrew Bartlett (This used to be commit ffad9b22be595279b247fa72d51145830fecbb06)
2007-10-10r5053: - fix up the library dependencies so that tools that need nbt don'tAndrew Tridgell1-1/+1
need to pull in the whole dcerpc subsystem - moved smbencrypt.c code into libcli/auth/ (This used to be commit 3351c636af23ad88649e84f4cb88fc1167d5c654)
2007-10-10r5052: minor formatting fixAndrew Tridgell1-4/+3
(This used to be commit 4337901c1b38aaaf6cc09641ad51ff28e591b1f4)
2007-10-10r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for theAndrew Tridgell28-103/+103
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
2007-10-10r5034: - added a type mapping function in pidl, so the type names in our IDLAndrew Tridgell2-6/+6
files don't need to match the type names in the generated headers - with this type mapping we no longer need definitions for the deprecated "int32", "uint8" etc form of types. We can now force everyone to use the standard types int32_t, uint8_t etc. - fixed all the code that used the deprecated types - converted the IDL types "int64" and "uint64" to "dlong" and "udlong". These are the 4 byte aligned 64 bit integers that Microsoft internally define as two 32 bit integers in a structure. After discussions with Ronnie Sahlberg we decided that calling these "int64" was confusing, as it implied a true 8 byte aligned type - fixed all the cases where we incorrectly used things like "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for those. The fact that it is hyper-aligned on the wire is not relevant to the API, and should remain just a IDL property (This used to be commit f86521677d7ff16bdc4815f9524e5286026f10f3)
2007-10-10r4954: we don't need the separate event_remove_*() calls any more, as you nowAndrew Tridgell1-36/+2
remove an event by calling talloc_free(). (This used to be commit 8f19b6886cc58a56d52aecfc83a175197061e533)
2007-10-10r4944: every event_add_*() caller was having to call talloc_steal() to takeAndrew Tridgell2-13/+20
control of the event, so instead build that into the function. If you pass NULL as mem_ctx then it leaves it as a child of the events structure. (This used to be commit 7f981b9ed96f39027cbfd500f41e0c2be64cbb50)
2007-10-10r4943: Smplified the events handling code a lot. The first source ofAndrew Tridgell2-102/+89
complexity was that events didn't automatically cleanup themselves. This was because the events code was written before we had talloc destructors, so you needed to call event_remove_XX() to clean the event out of the event lists from every piece of code that used events. I have now added automatic event destructors, which in turn allowed me to simplify a lot of the calling code. The 2nd source of complexity was caused by the ref_count, which was needed to cope with event handlers destroying events while handling them, which meant the linked lists became invalid, so the ref_count ws used to mark events for later destruction. The new system is much simpler. I now have a ev->destruction_count, which is incremented in all event destructors. The event dispatch code checks for changes to this and handles it. (This used to be commit a3c7417cfeab429ffb22d5546b205818f531a7b4)
2007-10-10r4898: - removed the unused wins_srv_*() codeAndrew Tridgell4-397/+13
- expanded the generic async name resolver to try multiple methods - added wins resolutions to the list of methods tried - fixed up the random trn id generation to use the good random generator (This used to be commit 266fd2751c01808e5a18d4094032af50554ceb7a)
2007-10-10r4863: schema_find_attribute() should be staticAndrew Tridgell1-1/+1
(This used to be commit e7262dccce1ccc563fad48023c733c1d13929b4b)
2007-10-10r4862: - better structure schema testsSimo Sorce10-31/+54
- fix check for deletion of required attributes on modify removed by mistake with the previous commits (This used to be commit 0315159daf157b64ef3452372dd74199600e24b8)
2007-10-10r4859: changed a numbe rof things:Simo Sorce1-244/+150
- Try to no tcopy memory if not necessary - let the searches hang around until we finish the operation - greatly simplify the modify operation still todo: - check attributes syntax - check objectclasses type, we cannot allow to add a new structural objectclass to an exixting entry unless the existing one is a parent - more tests (This used to be commit c6257379e094881987cd11e05502129b2ce1c5a0)
2007-10-10r4844: - Remove the unused attrsyn structureSimo Sorce1-175/+164
- Change 0 to NULL when checking allocations - Introduce the schema_attr_cmp hepler function - Do not allow auxiliary classes to be missing - Try to ease code readability and try to get main code out of loops when possibile. (This used to be commit a30f647b8abe6b77ef73018f58af2f8a11689b91)
2007-10-10r4831: added udp support to our generic sockets library.Andrew Tridgell5-78/+208
I decided to incorporate the udp support into the socket_ipv4.c backend (and later in socket_ipv6.c) rather than doing a separate backend, as so much of the code is shareable. Basically this adds a socket_sendto() and a socket_recvfrom() call and not much all. For udp servers, I decided to keep the call as socket_listen(), even though dgram servers don't actually call listen(). This keeps the API consistent. I also added a simple local sockets testsuite in smbtorture, LOCAL-SOCKET (This used to be commit 9f12a45a05c5c447fb4ec18c8dd28f70e90e32a5)
2007-10-10r4818: missed version.h hereAndrew Tridgell1-0/+1
(This used to be commit 03953803519e5284b4092db12c6279370456c857)
2007-10-10r4817: ccache was being made ineffective on all the build farm machinesAndrew Tridgell2-0/+2
because the version number was being auto-updated and included in all C files. With this change it is only included where needed. (This used to be commit 520cff73c6dc62ba1050cf7ca5145d50b5f2bb4e)
2007-10-10r4801: remove the two bogus ctype.h includesAndrew Tridgell1-2/+0
(This used to be commit b221c3dbb9a7af88f917562b6f907fd0617eb05f)
2007-10-10r4793: minor doc updatesAndrew Tridgell1-15/+9
(This used to be commit ad1af519eb1a138e44cc94676f845b8ba65e3371)
2007-10-10r4790: added type checking helper macros in talloc. These take advantage ofAndrew Tridgell4-9/+107
the type names that talloc already keeps around for pointers, and allows the user to type check void* private pointers. It can also be used to implement polymorphism in C, as I'm sure someone would have pointed out to me sooner or later :-) (This used to be commit c283e1a3efac3a92e29a35856e20eb61ef4c221e)
2007-10-10r4786: forgot to commit the exclusion for schema checking against our ↵Simo Sorce1-0/+8
control entries (This used to be commit e895fcf4a33aeaf228d8b4b367c4e768506275bb)