summaryrefslogtreecommitdiff
path: root/server
AgeCommit message (Collapse)AuthorFilesLines
2009-08-13Tools ID range fixesJakub Hrozek3-4/+16
The tools did not take the special case where id_max = 0 (no limit) into account. Also disallow adding users when ID is specified outside any domain. Resolves trac tickets #86 and #89
2009-08-12Eliminate unnecessary explicit timeout for DP account requestsStephen Gallagher1-33/+19
D-BUS handles timeouts itself and reports DBUS_ERROR_NO_REPLY if a timeout fires, so we can rely on this instead of having an explicit timeout ourselves. Furthermore, the two timeouts present a potential race condition.
2009-08-12Fix reversal of parent and member in groupmodSimo Sorce1-8/+8
ticket #101
2009-08-11Change the why DP clients identifySimo Sorce15-321/+340
Mirrors what we have done with the monitor.
2009-08-11Prevent races between dp startup and othersSimo Sorce1-16/+26
Simply delay anything other service by 1 second only at startup.
2009-08-11Change services identification mechanismSimo Sorce11-507/+421
Let services identify themselves voiluntarily as the first operation instead of polling from the monitor. Also consolidate some common functions and make them available as monitor helpers.
2009-08-11Minor fixesSimo Sorce2-7/+13
2009-08-11Fix monitor ping timeoutStephen Gallagher1-1/+4
Our configuration specifies the monitor config timeout as seconds, but we were passing it directly to dbus commands that require milliseconds. Fixing this in get_monitor_config(). Also, the default value of -1 for the timeout resulted in a timeout much too short to be useful, so I'm making it 10s instead. This fix solves the problem where a busy backend (for example, one that is enumerating a large number of LDAP entries) would fail to respond to the ping in time.
2009-08-11Make child processes exit when parent diesJakub Hrozek7-1/+70
The child processes call prctl() and when their parent process is killed, they are sent SIGTERM using prctl. This is currently Linux-specific, for non-Linuxes, a similar effect is achieved by catching a set of common termination signals and sending SIGTERM to the process group.
2009-08-11Make socket paths a compile-time optionStephen Gallagher6-5/+3
Previously, we had hardcoded the paths for the NSS, PAM and private PAM sockets to /var/lib/sss/pipes. With this patch, we will specify the sockets with --with-pipe-path.
2009-08-10Do not fail enumerations because of range checksSimo Sorce2-6/+18
2009-08-10Revert build-breaking libsss_util_la change.Stephen Gallagher1-9/+20
Moving the common utility sources into a libtool convenience library caused problems with symbols when loading the plugin libraries.
2009-08-10Add configure checks for docbook XSL templates and XML toolsJakub Hrozek2-3/+40
Changes the configure process so that configure errors out if lacks the tools necessary to build manual pages (like xsltproc). Also adds a check for required URI of the docbook XSL templates using the xmlcatalog tool.
2009-08-10Build and run tests with 'make check'Stephen Gallagher2-27/+11
When --enable-tests is set by configure, the sysdb, stress and resolver tests will be built by 'make check', which will also then run the sysdb and resolver tests automatically. This patch also updates the server Makefile to create a libtool convenience library of the common source files to spare them being built separately for every library/executable that has different CFLAGS.
2009-08-10Simplify interfaces initializationSimo Sorce24-417/+267
Make as much as possible static, and remove use of talloc_reference and allocation/deallocation of memory when not necessary. Fix also responder use of rctx->conn, was mistakenly used for both monitor and dp connections.
2009-08-10merge server and connection structuresSimo Sorce12-286/+228
This reduce code duplication as it allows to use one set of watch and timeout functions, and at the same time also allow not to use a secondary structure just to unify these functions.
2009-08-10Cosmetic changesSimo Sorce16-375/+375
Rationalize and rename connection names in preparatoin for merging of server and connection structures.
2009-08-10Remove redundant memory contextsSimo Sorce14-134/+114
Simplify code by removing stuff that is never used or redundant.
2009-08-10Refactor some code around watches and timeoutsSimo Sorce4-355/+324
Watches and Timeouts are now unified under one implementation that covers both dbus server and connections. In watches do not keep removing and adding file events simply toggle the appropriate flags. Also streamline some memory management within both timeout and watch related functions, checking allocations and freeing the whole context not just the events.
2009-08-10CleanupsSimo Sorce2-189/+199
Minor style cleanups, and some name consistency cleanups that make some names a bit more meaningful and/or shorter.
2009-08-05Fix broken ifndefsSimo Sorce1-9/+0
ifndef doesn't work for those functions that aren't already macro definitions in tevent.h like tevent_req_data. However if tevent_req_data is defined in tevent.h, all other functions are available as well. So just check for tevent_req_data and define all of them if it is not available. This should fix compiling on distros with the latsest tevent.
2009-08-05Parse fully qualified names in toolsJakub Hrozek8-88/+289
Allow adding users into different domains not only by specifying ID directly but also by specifying fully qualified name. Exit when both specifications are used in conflict.
2009-08-05Move parsing of names and domains into util/Jakub Hrozek4-120/+135
2009-08-05Fix adding to groups on user creationJakub Hrozek1-1/+1
2009-08-05Consolidate tevent helpersJakub Hrozek6-84/+25
2009-08-04Fix race condition in sdap codeSimo Sorce2-83/+172
Retrieving ldap results and storing users could sometimes results in race conditions where the final ldap result was retrieved before the store operations where finished resulting in the operations to be aborted before termination. Implement a serialization mechanism per operation.
2009-08-03Fix search replies getting ignoredSimo Sorce1-14/+12
2009-07-31Correct check for local domain in toolsJakub Hrozek2-14/+2
When looking for the local domain in the tools, do so by looking on provider value, not domain name. Also removes one redundant lookup of local domain.
2009-07-31Notify user when deleting nonexistent user or groupJakub Hrozek2-5/+20
Fixes: RHBZ #513247, RHBZ #513250
2009-07-31Use correct return codesJakub Hrozek4-4/+4
Some code paths that should exit with an error used potentionally incorrect return code.
2009-07-31Add ignore_not_found parameter to sysdb delete functionsJakub Hrozek4-21/+182
Also add tests
2009-07-31Improve error messagesJakub Hrozek4-5/+32
Fixes: * RHBZ 513282 - Error Message Incorrect when Trying to add Group with GID already in use * RHBZ 513284 - Error Message Incorrect when Trying to add User with UID already in use * RHBZ 513242 - Better error Message when modifying a user that doesn't exist * RHBZ 513244 - Better error Message when adding a user to a group that doesn't exist
2009-07-29Address CVE-2009-2410Stephen Gallagher1-1/+1
Fix incorrect error code return in local_handler_callback
2009-07-24Add async resolver testsJakub Hrozek2-1/+455
Add some basic unit tests of the async resolver module. One of the tests resolves a name on the Internet, therefore it is off by default and is turned on with the -n switch.
2009-07-24Add ares helpers into sssdJakub Hrozek9-1/+498
This patch adds ares parsing functions that are not yet upstreamed together with a private ares header file (ares_dns.h) that contains some necessary macros for parsing common structures in the replies. Users of these two parsing functions must also include the header files ares_parse_{srv,txt}_reply.h that contain the function and structures declarations that should eventually end up in upstream ares.h
2009-07-24Async DNS integrationJakub Hrozek5-1/+739
Integrates the c-ares asynchronous resolved library into SSSD.
2009-07-24Fix race condition that was causing segfaultsSimo Sorce1-80/+136
The sdap_handle might be freed when processing a message. Rearrange data flow so that the sdap_handle is never used after a message is processed but a new event (dependent on the handle) is instead scheduled. If the sdap_handle is freed, the scheduled event is also removed and not fired
2009-07-22Minor cleanups in monitor.cStephen Gallagher1-1/+5
1) Forgot to check for successful allocation 2) Used the wrong mem_ctx when allocating a timer event.
2009-07-21added LDAP change password backend targetSumit Bose4-4/+307
2009-07-21add handling of the new backend targets to proxy backendSumit Bose1-0/+30
2009-07-20Rework the engine that deals with openldap librariesSimo Sorce3-497/+403
The way openldap libraries work, require to have a single engine per connection as all replies are read at the same time. So we need to always read anything that comes in from the wire and then loop to dispatch results to the requests that are waiting.
2009-07-20Raise debug level for version negotiationSimo Sorce1-2/+2
2009-07-20Add option to add timestamps to debug outputSimo Sorce4-8/+39
use '--debug-timestamps' at the command line or set 'debug-timestamps = TRUE' in the configuration file.
2009-07-20Remove unused InfoPipe and PolicyKit codeStephen Gallagher16-5530/+2
2009-07-20Instrument memberof for debuggingSimo Sorce2-1/+57
Fix ldb debug to avoid printing the debug function name, it's useless.
2009-07-20Start rationalizing user tools a bitSimo Sorce7-408/+299
There is a lot of duplication in user tools. First steps to remove as much duplication as possible.
2009-07-20Implement resInit for monitor, NSS, PAM, DP and the backendsStephen Gallagher5-1/+91
2009-07-20Monitor resolv.conf for changesStephen Gallagher4-128/+234
This patch updates the monitor_config_file() functions so that they can monitor any number of files and invoke a specified callback whenever they are modified. When inotify is available, we will add an additional watch descriptor to the inotify file descriptor. When inotify is not available, the polling function will simply loop to check each file in the monitor list. When changes are discovered in resolv.conf, the monitor will send a "resInit" signal to all of its known children. They are only required to handle this function if they need updated DNS information. Services that do not implement resInit should return DBUS_ERROR_UNKNOWN_METHOD (rather than timing out) with no ill effects.
2009-07-20Improvements to config file updatesStephen Gallagher2-41/+152
1) Some text editors will create a new file and move it into place on top of the existing file. When this happens, the kernel issues an IN_IGNORE inotify event and automatically removes the watch descriptor for that file. We'll handle the event and create a new watch descriptor for the new file. We will attempt to rewatch the file six times at five-second intervals. 2) Some scripts may append new data to the config file in several steps (such as calling echo "foo" >> sssd.conf several times). In order to handle these scripts safely, we'll defer processing of inotify events for one second after the first is detected. This should be ample time for the remainder of the script to complete.
2009-07-20add infrastructure to handle new backend targetsSumit Bose6-150/+228