summaryrefslogtreecommitdiff
path: root/server
AgeCommit message (Collapse)AuthorFilesLines
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
2009-07-20Fix saving new nextIDJakub Hrozek1-1/+1
2009-07-10let krb5 backend safe valid credentials for offline authenticationSumit Bose1-0/+43
2009-07-10fixed the default value for tls_reqcertSumit Bose1-1/+1
2009-07-10add a short explanation about the used debug levelsSumit Bose1-0/+14
2009-07-09fixed typos and a potential memory leakSumit Bose1-2/+3
2009-07-08Implement the ldap identity module.Simo Sorce7-787/+1408
This uses and exapands the async helpers.
2009-07-08Unify password caching ops in sysdbSimo Sorce7-291/+178
2009-07-08Use async helpers for ldap auth moduleSimo Sorce1-722/+314
This changes the style quite a lot, but the tevent_req style is much more clear and much less error-prone than the giant loop we had previously.
2009-07-08Add async helper functionsSimo Sorce7-25/+2060
These functions use the tevent_req async model, where a pair of _send/_recv functions pilot requests, with additional helpers like _done functions, and where needed multiple stage helpers.
2009-07-08Expose sysdb function to parse sysdb_attrsSimo Sorce2-2/+4
2009-07-08Add dumb way to clean up .X filesSimo Sorce1-0/+1
2009-07-08fix return code of krb5 child to indicate that the kdc is unavailableSumit Bose1-1/+5
2009-07-08fixed some typos which prevented password cachingSumit Bose1-3/+5
2009-07-08fixed a double talloc_free errorSumit Bose6-12/+0
2009-07-06Check for root before initializingJakub Hrozek9-4/+99
Also move setting locale to separate function to be called before anything else to make sure the "Not root" message would be localized.
2009-07-03Cleanup warnings in client and server codeSimo Sorce2-4/+1
2009-07-03Convert proxy internals to tevent_req styleSimo Sorce1-865/+1438
2009-07-03Rework transaction code to use tevent_reqSimo Sorce18-2762/+4893
This is part of a set of patches to rewrite sysdb to a hopefully better API, that will also let use use tevent_req async style calls to manipulate our cache.