summaryrefslogtreecommitdiffstats
path: root/source3/lib/messages.c
Commit message (Collapse)AuthorAgeFilesLines
* r21723: Make use of the per-hashchain "freelists"Volker Lendecke2007-10-101-0/+3
| | | | (This used to be commit f3421ae4cfa263c0e7a8e934b40342ee9885d239)
* r21115: notify_internal.c needs to remove the table entry if a process has ↵Volker Lendecke2007-10-101-38/+62
| | | | | | | | | | | | crashed. So it needs the specific error message. Make messages.c return NTSTATUS and specificially NT_STATUS_INVALID_HANDLE if sending to a non-existent process. Volker (This used to be commit 3f620d181da0c356c8ffbdb5b380ccab3645a972)
* r21081: Add forgotten functionVolker Lendecke2007-10-101-0/+11
| | | | (This used to be commit 4a99fa266672e2989f9e62baf9090eb45df750ea)
* r21076: Two pieces of infrastructure from Samba4: An API-compatible ↵Volker Lendecke2007-10-101-0/+121
| | | | | | | | | messaging wrapper and tdb_wrap_open. Volker (This used to be commit c01f164dcaf88fb7f3bed8f69b210ba8fab326d1)
* r21064: The core of this patch isVolker Lendecke2007-10-101-5/+12
| | | | | | | | | | | | | | | | | | | | | | | void message_register(int msg_type, void (*fn)(int msg_type, struct process_id pid, - void *buf, size_t len)) + void *buf, size_t len, + void *private_data), + void *private_data) { struct dispatch_fns *dfn; So this adds a (so far unused) private pointer that is passed from message_register to the message handler. A prerequisite to implement a tiny samba4-API compatible wrapper around our messaging system. That itself is necessary for the Samba4 notify system. Yes, I know, I could import the whole Samba4 messaging system, but I want to do it step by step and I think getting notify in is more important in this step. Volker (This used to be commit c8ae60ed65dcce9660ee39c75488f2838cf9a28b)
* r20174: If we're only going to call one handler per messageJeremy Allison2007-10-101-4/+4
| | | | | | then terminate the traversal once we've done that. Jeremy. (This used to be commit da3d0b62340b545950ea2081f30c252fd4609981)
* r20165: Change messaging subsystem to only allow one messageJeremy Allison2007-10-101-3/+11
| | | | | | | | per type - this is all we use right now and makes re-entrancy problems with deleting handlers with a message dispatch loop go away. Jeremy. (This used to be commit 2e9b6faeae1474d65a5c12f5a19b0ae045d47c2e)
* r20160: Fix long-standing (ie. from initial code I think) bugJeremy Allison2007-10-101-2/+5
| | | | | | | | | in tdb message processing. If we're inside a dispatch function and we delete our own handler we'd walk onto the next pointer from a deleted memory block. Fixes crash bug in winbindd (and goodness knows where else). Jeremy. (This used to be commit 27a4c1121404e346432d90b97b518861e038e9f2)
* r17316: More C++ warnings -- 456 leftVolker Lendecke2007-10-101-2/+2
| | | | (This used to be commit 1e4ee728df7eeafc1b4d533240acb032f73b4f5c)
* r17294: Make the code a little cleaner. Instead of using the twoJeremy Allison2007-10-101-7/+4
| | | | | | | | | | | | | | calls make it : become_root_uid_only() operation unbecome_root_uid_only() saving errno across the second call. Most of our internal change calls can be replaced with these simple calls. Jeremy (This used to be commit 4143aa83c029848d8ec741d9218b3fa6e3fd28dd)
* r17293: After the results from the cluster tests in Germany,Jeremy Allison2007-10-101-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | fix the messaging code to call the efficient calls : save_re_uid() set_effective_uid(0); messaging_op restore_re_uid(); instead of using heavyweight become_root()/unbecome_root() pairs around all messaging code. Fixup the messaging code to ensure sec_init() is called (only once) so that non-root processes still work when sending messages. This is a lighter weight solution to become_root()/unbecome_root() (which swaps all the supplemental groups) and should be more efficient. I will migrate all server code over to using this (a similar technique should be used in the passdb backend where needed). Jeremy. (This used to be commit 4ace291278d9a44f5c577bdd3b282c1231e543df)
* r17231: Some patch cosmeticsVolker Lendecke2007-10-101-1/+1
| | | | (This used to be commit 736e55101b1e7cc22f043b836be877afbb031edf)
* r16390: Klocwork #604 - ensure if NULL pointer we assertJeremy Allison2007-10-101-2/+8
| | | | | | if len != 0. Jeremy. (This used to be commit e99cedfb0cabe3863797c8bd4594ee0826022d2e)
* r15003: patch based on code from Arkady Glabek <aglabek@centeris.com> to ↵Gerald Carter2007-10-101-0/+18
| | | | | | ensure that global memory is freed when unloading pam_winbind.so (needs more testing on non-linux platforms) (This used to be commit 1e0b79e591d70352a96e0a0487d8f394dc7b36ba)
* r13316: Let the carnage begin....Gerald Carter2007-10-101-0/+15
| | | | | Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
* r10656: BIG merge from trunk. Features not copied overGerald Carter2007-10-101-24/+33
| | | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
* r9619: Fix messages_pending_for_pid actually do what it's meant to do. This ↵Volker Lendecke2007-10-101-1/+1
| | | | | | | | | | | | | | | | | | might be a big relief on messages.tdb contention as ignoring processes with >1000 messages in printing/notify.c should work correctly now. Jeremy, Jerry told me to ask you about printer scalability torture tests, this might be a reason why you implemented the message_send_pid_with_timeout using the signal (shudder) in the first place. :-) While looking at that... Wouldn't it be better to not use the signal but have an overall timeout for print_notify_send_messages using GetTimeOfDay & friends and not use the alarm signal deep inside tdb.c? Volker (This used to be commit b5e82bb512d3425839e061e78f4d6fe0bd05b708)
* r7440: * merge registry server changes from trunk (so far) for moreGerald Carter2007-10-101-1/+1
| | | | | | | printmig.exe work * merge the sys_select_signal(char c) change from trunk in order to keeo the winbind code in sync (This used to be commit a112c5570a7f8ddddde1af0fa665f40a6067e8cf)
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-2/+2
| | | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
* r1885: tighten the cache consistency with the ntprinters.tdb entry an the in ↵Gerald Carter2007-10-101-2/+4
| | | | | | memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags (This used to be commit 540daf71d8ad189af5dd6d45aa1ce2b3d67da752)
* Limit the number of outstanding print notify messages for a process toJeremy Allison2003-04-231-0/+31
| | | | | | 1000. Jeremy. (This used to be commit 2e5e4c10d2377493913554e7dab79d97a4d16d87)
* Whoops - missed some tdb message registrations from a previous merge.Tim Potter2003-04-141-0/+5
| | | | (This used to be commit 59f8fc438a2ff5bb7ff115a19f6aacbb0ef7b653)
* lib/messages.c: Check return from chainlock before modifying message queue.Jeremy Allison2003-03-201-1/+3
| | | | | | Apply the job returned limit across all requests for job queues. Jeremy. (This used to be commit bf795b684e608f82db822e0759e7b69afd451b65)
* Mege from HEAD - doxygen.Andrew Bartlett2003-03-171-7/+7
| | | | (This used to be commit 04a5cbc8964386774acdca759b4cfaded068c8f2)
* Add 3 second timeout when terminating server and sending print notifyJeremy Allison2003-01-301-5/+45
| | | | | | | messages. Stops build-up of large numbers of smbd's waiting to terminate on large print throughput. Jeremy. (This used to be commit 07efebb98473cb3d4adc6b2e0afef3f06dcc99b8)
* Merge of REQ_DEBUGLEVEL messaging and debug_count fixes from HEAD.Tim Potter2003-01-301-11/+0
| | | | (This used to be commit abb112ba2ad362036c7b3f340d5f64d6fcc0cd3c)
* Added new message_send_pid() code that uses tdb append to reduce lockingJeremy Allison2003-01-111-54/+55
| | | | | | contention on the messaging tdb. Jeremy. (This used to be commit ee0ceeff99f32146bebd4b49d346abdaa20aa10c)
* First part of efficiency fixes for message sending to pid's (cutting downJeremy Allison2003-01-101-48/+95
| | | | | | | | | the amount of time we hold tdb locks). Gulp down all messages at once rather than reading/re-writing one at a time. NOTE: All dispatch routines *must* be able to cope with incoming message on *odd* byte boundaries (all current handlers do). Jeremy. (This used to be commit b752c0340f96669b2b2573cf7d3d10f99580b070)
* Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett2003-01-031-1/+1
| | | | | | | warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
* Lots of fixes for error paths where tdb_fetch() data need freeing.Jeremy Allison2002-11-231-6/+13
| | | | | | Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>. Jeremy. (This used to be commit 5d5762d1787db4392d2dff16024097c638b2d494)
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-72/+22
| | | | (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-17/+7
| | | | (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
* Moved debug messages for grabbing/releasing mutex.Jeremy Allison2002-03-271-0/+4
| | | | | Jeremy. (This used to be commit e144c174eafc18f236c848b8f3a2c6382796f5a9)
* Don't hold the mutex for more than 20 seconds.Jeremy Allison2002-03-261-4/+32
| | | | | Jeremy. (This used to be commit 1b9f1a368f2f37700cef357ab4bbc0389ec06378)
* Add assertions that kill() is never accidentally passed a non-positiveMartin Pool2002-03-201-0/+7
| | | | | | | | | | pid. This follows a bug in rsync where it would accidentally kill(-1), removing all the user's processes. I can't see any way this would directly happen in Samba, but having the assertions seems beneficial. http://cvs.samba.org/cgi-bin/cvsweb/rsync/util.c.diff?r1=1.108&r2=1.109&f=h (This used to be commit 098905bea29c7d5b886809d431294ddf2fc1e152)
* getpid() -> sys_getpid()Tim Potter2002-03-141-1/+1
| | | | (This used to be commit a3cea5e9ae3b53ecbc45e61a39cbce0ca1b916aa)
* Doc.Tim Potter2002-03-091-9/+14
| | | | (This used to be commit b9ab79f30a931c694b1c181b1c2abd38186692ae)
* serialise all domain auth requestsAndrew Tridgell2002-02-181-0/+30
| | | | | | | | | | this is needed because W2K will send a TCP reset to any open connections that have not done a negprot when a second connection is made. This meant that under heavy netlogon load a Samba domain member would fail authentications. Jeremy, you may wish to port this to 2.2.x (This used to be commit eb196070e62b45b113e5712f27198c50c5c95657)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* If we receive a message that is not handled then emit a gentle warningMartin Pool2002-01-031-0/+8
| | | | | to the log. (This used to be commit 53dd8b45397f5de7660594b9287341f8f4c91c43)
* debug output on receipt of message.Martin Pool2002-01-031-0/+2
| | | | (This used to be commit 6bd5b7ce8ec54faefcf129fcc98cc4440bb355d6)
* Add an output parameter to message_send_all that says how manyMartin Pool2001-12-211-12/+33
| | | | | | | messages were sent, so you know how many replies to expect. Const and doc religion. (This used to be commit 22e510ea0d69356be4fd2fa5ad9e9f4e84f62337)
* Doc how to reply to messages.Martin Pool2001-12-191-1/+8
| | | | (This used to be commit e2b080587c4d6e147cf7274fa7e09e89ae2083c3)
* Merged in JohnR's ping messaging extension.Jeremy Allison2001-11-201-27/+36
| | | | | Jeremy. (This used to be commit 694372b2c4d7713fe228114730027175f7b4e9b6)
* Fixed enumeration of large numbers of groups from a Samba DC.Jeremy Allison2001-09-251-1/+5
| | | | | | Tidied up debug messages in lib/messages.c Jeremy. (This used to be commit dfb58f227609d6c8a255677b85ec853efa19f602)
* move to SAFE_FREE()Simo Sorce2001-09-171-7/+7
| | | | (This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
* got rid of USE_TDB_MMAP_FLAG as its not needed any moreAndrew Tridgell2001-09-061-1/+1
| | | | (This used to be commit c26e0d3f27a05ecc8bd2390f9aab7f9451524e47)
* Some fixes about malloc/Realloc and mem leakSimo Sorce2001-08-051-4/+11
| | | | | thanks to andreas moroder (This used to be commit b29a549cdd85d42a1697041ab04f0ae4eddd23ca)
* Added "use mmap" for HPUX.Jeremy Allison2001-07-301-1/+1
| | | | | Jeremy. (This used to be commit 840802f10677cb0009cb4df4c37c7d01aa5edacd)
* use LDSHFLAGS not -shared in several placesAndrew Tridgell2001-06-041-1/+1
| | | | (This used to be commit 8ec9c87b5d1a7dae17d5b1a30f58effaf5e69e4b)