summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd.c
AgeCommit message (Collapse)AuthorFilesLines
2009-07-15Make gencache more stableVolker Lendecke1-0/+2
This provides a compromise between stability and performance: gencache is a persistent database these days that for performance reasons can not use tdb transactions for all writes. This patch splits up gencache into gencache.tdb and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, writes to it don't use transactions. By default every 5 minutes and when a program exits, all entries from _notrans.tdb are transferred to gencache.tdb in one transaction.
2009-06-18Fix bug 4699: Remove pidfile on clean shutdownVolker Lendecke1-0/+4
2009-06-14Remove "winbindd_request" and "winbindd_response" from winbindd_cli_stateVolker Lendecke1-6/+10
This shrinks the memory footprint of an idle client by 5592 bytes to 60 bytes on my 32-bit box.
2009-06-14Make winbindd_cli_state->response a pointer instead of a struct memberVolker Lendecke1-12/+13
Same comment as in baa6084378e530b: This is just a preparatory checkin. Volker
2009-06-14winbind: replace process_loop() by tevent_loop_once()Volker Lendecke1-68/+5
2009-06-14Make rescan_trusted_domains a timed eventVolker Lendecke1-4/+8
2009-06-14Do not store the listening fdeVolker Lendecke1-15/+11
2009-06-14Avoid scanning the client list when a client exitsVolker Lendecke1-19/+6
2009-06-14Add async wb_pingVolker Lendecke1-0/+3
2009-06-14Add an async wb request loopVolker Lendecke1-0/+61
2009-06-14Remove some unused codeVolker Lendecke1-133/+0
2009-06-14Convert the main winbind client communication to wb_reqtrans.cVolker Lendecke1-124/+64
2009-06-14Make winbindd_cli_state->request a pointer instead of a struct memberVolker Lendecke1-24/+25
In itself, this is pretty pointless. But in the next steps I'll convert the winbind internal communication to wb_reqtrans which allocates the request properly. This minimizes the later diff. Volker
2009-05-27s3: Allow child processes to exit gracefully if we are out of fdsMarc VanHeyningen1-2/+3
When we run out of file descriptors for some reason, every new connection forks a child that immediately panics causing smbd to coredump. This seems unnecessarily harsh; with this code change we now catch that error and merely log a message about it and exit without the core dump. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-24Fix a race condition in winbind leading to a panicVolker Lendecke1-0/+1
In winbind, we do multiple events in one select round. This needs fixing, but as long as we're still using it, for efficiency reasons we need to do that. What can happen is the following: We have outgoing data pending for a client, thus state->fd_event.flags == EVENT_FD_WRITE Now a new client comes in, we go through the list of clients to find an idle one. The detection for idle clients in remove_idle_client does not take the pending data into account. We close the socket that has pending outgoing data, the accept(2) one syscall later gives us the same socket. In new_connection(), we do a setup_async_read, setting up a read fde. The select from before however had found the socket (that we had already closed!!) to be writable. In rw_callback we only want to see a readable flag, and we panic in the SMB_ASSERT(flags == EVENT_FD_READ). Found using bin/smbtorture //127.0.0.1/tmp -U% -N 500 -o 2 local-wbclient Volker
2009-05-22s3: ignore EPIPE error when winbind finally writes to wb client because ↵Bo Yang1-2/+8
client might have already closed the socket Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-12Convert response.extra_data.data from malloc to tallocVolker Lendecke1-12/+0
2009-05-07Fix some type-punned warningsVolker Lendecke1-4/+7
2009-05-07Remove a misleading commentVolker Lendecke1-2/+0
2009-03-18s3:winbindd: accept new connections via fd eventsStefan Metzmacher1-52/+100
metze
2009-03-18s3:winbindd: move non event related code out of process_loop() in the the callerStefan Metzmacher1-22/+21
metze
2009-03-12Make opt_nocache static to winbindd.cVolker Lendecke1-1/+11
2009-03-04Fix careless mistake in winbindd_setup_sig_usr2_handlerBo Yang1-1/+1
2009-02-23More warning fixes for Solaris.Jeremy Allison1-1/+1
Jeremy.
2009-02-11s3: Implement wbcGetSidAliasesDan Sledz1-0/+2
* Adds wbcGetSidAliases that calls the lookup_useraliases function. * Updates wbinfo and winbind_util.c to call the new function. * Also added winbind_get_groups helper function.
2009-02-11s3: Implement wbcGetpwsidDan Sledz1-0/+1
* Adds the plumbing required to lookup users by sid into winbind, wbinfo and smbd helper lib (winbind_util.c). * Removes some double declarations of winbind_util.c functions. * Bumps the winbind protocol version to 21 and the minor version of wbclient to 3.
2009-01-27s3:winbindd: handle SIG_TERM, SIGHUP, SIGCHLD and SIGUSR2 via teventStefan Metzmacher1-70/+157
metze
2009-01-22s3:winbindd: we don't need to call message_dispatch() anymore it's event ↵Stefan Metzmacher1-6/+0
triggered now metze
2009-01-22s3: always call run_events() before and after sys_select()Stefan Metzmacher1-0/+2
And always setup the fd events. metze
2009-01-15s3: make better use of ccache by not including version.h in every C-file.Michael Adam1-1/+1
version.h changes rather frequently. Since it is included via includes.h, this means each C file will be a cache miss. This applies to the following situations: * When building a new package with a new Samba version * building in a git branch after calling mkversion.sh after a new commit (i.e. virtually always) This patch improves the situation in the following way: * remove inlude "version.h" from includes.h * Use samba_version_string() instead of SAMBA_VERSION_STRING in files that use no other macro from version.h instead of SAMBA_VERSION_STRING. * explicitly include "version.h" in those files that use more macros from "version.h" than just SAMBA_VERSION_STRING. Michael
2009-01-06Make winbindd_cm.c use winbindd_reinit_after_fork().Jeremy Allison1-0/+5
Jeremy.
2009-01-05s3:winbindd: also handle fd events from the winbind_event_context()Stefan Metzmacher1-0/+9
metze
2009-01-05s3:winbindd: rename fd_event => winbindd_fd_eventStefan Metzmacher1-13/+13
It's really confusing to have two versions of 'fd_event' metze
2009-01-05clean event context after child is forked.Bo Yang1-1/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-19Fix a "ignoring function call result" warningVolker Lendecke1-1/+6
2008-12-12winbindd: vars for signals must be volatile sig_atomic_tSATOH Fumiyasu1-12/+12
2008-12-07Fix nonempty blank linesVolker Lendecke1-27/+27
2008-11-18Clean-up various trailing space and >80 column lines.Steven Danneman1-1/+1
2008-11-18Added ability to remove id mappings in wbinfo and libwbclient.Steven Danneman1-0/+1
The idmap_tdb backend already provides an interface to remove existing id mappings. This commit plumbs that ability up through, winbindd, libwbclient, and wbinfo. Added new winbindd command: WINBINDD_REMOVE_MAPPING Added new libwbclient interfaces: wbcRemoveUidMapping() and wbcRemoveGidMapping() Added new wbinfo options: --remove-uid-mapping --remove-gid-mapping Increased libwbclient version to 0.2 Increased winbind interface version to 20
2008-11-03s3: fix a few "shadows a global declaration" warningsTim Prouty1-9/+9
2008-10-27[s3]winbind: fix smbd hanging on Solaris when winbindd closes socket.Michael Adam1-1/+6
On some versions of Solaris, we observed a strange effect of close(2) on a socket: After the server (here winbindd) called close, the client fd was not marked as readable for select. And a write call to the fd did not produce an error EPIPE but just returned as if successful. So while winbindd had called remove_client(), the corresponding smbd still thought that it was connected, but failed to retrieve answers for its queries. This patch works around the problem by forcing the client fd to the readable state: Just write one byte into the socket before closing. Michael
2008-10-18Use separate make variables for libutil and libcrypto.Jelmer Vernooij1-2/+2
2008-09-05Fix a memleakQiao Yang1-1/+2
request.extra_data is not freed if there is no extra_data in response or when there is some error happens in processing. This patch will free the buffer right after processing a request before sending back a response. (This used to be commit be6f12273f171a3eb1967d2299064e57d737f6a4)
2008-08-13first cut at adding full transactions for ctdb to samba3Andrew Tridgell1-4/+0
(This used to be commit f91a3e0f7b7737c1d0667cd961ea950e2b93e592)
2008-08-12idmap rewriteVolker Lendecke1-6/+0
(This used to be commit 30a180f2fce8cf6a3e5548f6bba453272ba70b33)
2008-08-12Remove the multi-ID lookup code and the 3.2.0 version of idmap_cacheVolker Lendecke1-3/+0
(This used to be commit 1bd98521dc3f16ad77ccccd3979288c58e03ebe8)
2008-07-24Remove unused request_finished_cont()Volker Lendecke1-12/+0
(This used to be commit 865ea6fcbc089a03e453709fa54ff2a39c0c168e)
2008-07-24Make use of TALLOC_FREE when freeing the per-winbindrequest memory contextVolker Lendecke1-12/+3
(This used to be commit 9e49d390f79c6afc8b0efd9664e60602aebaa4f2)
2008-07-17From Jim McDonoughJeremy Allison1-6/+12
In reloading the smb.conf, if a "log file" is specified in smb.conf, winbind children will overwrite the logfile name to be the same as the parent. Jeremy. (This used to be commit 62d319cc1a2ef891866b2ddbd22f3ed0944356af)
2008-07-01MSG_DEBUG now forwarded to all the winbindd children by parent.Darshan Purandare1-0/+5
smbcontrol winbindd debug level would only set the debug level of the parent winbindd process and not the child processes. This patch adds the functionality of broadcasting the debug message to all winbindd children. Now the debug level message is propagated to all the winbindd processes that includes parent and children. (This used to be commit cfbcfc3ffe74f28ec874a6bf1ab93f55f405b6e6)