summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Build and run tests with 'make check'Stephen Gallagher2009-08-102-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.
* Simplify interfaces initializationSimo Sorce2009-08-1024-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.
* merge server and connection structuresSimo Sorce2009-08-1012-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.
* Cosmetic changesSimo Sorce2009-08-1016-375/+375
| | | | | Rationalize and rename connection names in preparatoin for merging of server and connection structures.
* Remove redundant memory contextsSimo Sorce2009-08-1014-134/+114
| | | | Simplify code by removing stuff that is never used or redundant.
* Refactor some code around watches and timeoutsSimo Sorce2009-08-104-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.
* CleanupsSimo Sorce2009-08-102-189/+199
| | | | | Minor style cleanups, and some name consistency cleanups that make some names a bit more meaningful and/or shorter.
* Fix broken ifndefsSimo Sorce2009-08-051-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.
* Parse fully qualified names in toolsJakub Hrozek2009-08-058-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.
* Move parsing of names and domains into util/Jakub Hrozek2009-08-054-120/+135
|
* Fix adding to groups on user creationJakub Hrozek2009-08-051-1/+1
|
* Consolidate tevent helpersJakub Hrozek2009-08-056-84/+25
|
* Fix race condition in sdap codeSimo Sorce2009-08-042-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.
* Fix search replies getting ignoredSimo Sorce2009-08-031-14/+12
|
* Correct check for local domain in toolsJakub Hrozek2009-07-312-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.
* Notify user when deleting nonexistent user or groupJakub Hrozek2009-07-312-5/+20
| | | | Fixes: RHBZ #513247, RHBZ #513250
* Use correct return codesJakub Hrozek2009-07-314-4/+4
| | | | | Some code paths that should exit with an error used potentionally incorrect return code.
* Add ignore_not_found parameter to sysdb delete functionsJakub Hrozek2009-07-314-21/+182
| | | | Also add tests
* Improve error messagesJakub Hrozek2009-07-314-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
* Address CVE-2009-2410Stephen Gallagher2009-07-291-1/+1
| | | | Fix incorrect error code return in local_handler_callback
* Add async resolver testsJakub Hrozek2009-07-242-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.
* Add ares helpers into sssdJakub Hrozek2009-07-249-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
* Async DNS integrationJakub Hrozek2009-07-246-1/+740
| | | | Integrates the c-ares asynchronous resolved library into SSSD.
* Fix race condition that was causing segfaultsSimo Sorce2009-07-241-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
* Minor cleanups in monitor.cStephen Gallagher2009-07-221-1/+5
| | | | | 1) Forgot to check for successful allocation 2) Used the wrong mem_ctx when allocating a timer event.
* cleanup of pam_sssSumit Bose2009-07-221-250/+241
| | | | | - make pam_sss work with pam_cracklib and similar pam modules - clean up the if-&&-else-|| jungle to make clear what is happening
* added LDAP change password backend targetSumit Bose2009-07-214-4/+307
|
* add handling of the new backend targets to proxy backendSumit Bose2009-07-211-0/+30
|
* Add 'make srpms' targetStephen Gallagher2009-07-211-0/+5
|
* Rework the engine that deals with openldap librariesSimo Sorce2009-07-203-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.
* Raise debug level for version negotiationSimo Sorce2009-07-201-2/+2
|
* Add option to add timestamps to debug outputSimo Sorce2009-07-204-8/+39
| | | | | use '--debug-timestamps' at the command line or set 'debug-timestamps = TRUE' in the configuration file.
* Remove unused InfoPipe and PolicyKit codeStephen Gallagher2009-07-2017-5532/+2
|
* Fix typo in elapi's Makefile.am that breaks 'make dist'Stephen Gallagher2009-07-201-1/+1
|
* Instrument memberof for debuggingSimo Sorce2009-07-202-1/+57
| | | | Fix ldb debug to avoid printing the debug function name, it's useless.
* Start rationalizing user tools a bitSimo Sorce2009-07-207-408/+299
| | | | | There is a lot of duplication in user tools. First steps to remove as much duplication as possible.
* Implement resInit for monitor, NSS, PAM, DP and the backendsStephen Gallagher2009-07-205-1/+91
|
* Monitor resolv.conf for changesStephen Gallagher2009-07-204-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.
* Improvements to config file updatesStephen Gallagher2009-07-202-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.
* COLLECTION & INI CleanupDmitri Pal2009-07-205-86/+113
| | | | | | | | | | | | | | | | I started to cleanup the unit tests from the type cust around NULL and found several problems that I had to address: 1) The choice of the "." as a search separator turned out to be a poor choice. The problem was that the file name has "." and INI was relaying on files to be used as property names. I corrected that part in the INI but after discussion with Simo we decided to switch from "." to "!" as special symbol anyways. 2) Found that the property rename was not reinitializing the hash. Corrected. Added ticket to add unit tests around it (#83).
* add infrastructure to handle new backend targetsSumit Bose2009-07-206-150/+228
|
* Fix saving new nextIDJakub Hrozek2009-07-201-1/+1
|
* COLLECTION Improving searchesDmitri Pal2009-07-162-9/+181
| | | | | | Addressing ticket #71. The searches were not taking advantage of the hashes, now they are.
* Run ini_config unit test with "make check"Stephen Gallagher2009-07-162-2/+19
| | | | | Also adds support for running ini_config_ut under a parallel build directory.
* Run libcollection unit tests with 'make check'Stephen Gallagher2009-07-161-1/+3
|
* COLLECTION Add remove item functionsDmitri Pal2009-07-164-31/+146
| | | | | | | | | | | | | The remove functions extract and remove items, they act differently from the way the delete_property function works. The new functions allow deletion with the disposition while the delete_property only deletes specified property. The delete_property function is left as is since there are some use cases when it is more efficient to use it rather than new remove_item_xxx ones.
* INI Refactoring code a bitDmitri Pal2009-07-162-42/+16
| | | | | | | The inefficient function from ini_config.c is replaced with the function provided now by the collection interface. Also the unit test is updated to run from the local directory.
* ELAPI First part of the interfaceDmitri Pal2009-07-1512-4/+1655
| | | | | | | | | | | This is just a part of the interface, a beginning. Most likely some of the functions will be altered but it is a starting point. For example in future there will be a way to override some of the parts of the default template using the application configuration file. Removed obfuscation of the data types based on discussion with Simo.
* COLLECTION Fixed: iterator_up and insert_into_currentDmitri Pal2009-07-153-17/+83
| | | | | | | | | | | During a review of the previous patch the two issues were found: a) The col_iterator_up function was not implemented properly so it got reworked. New implementation changes the way error condition is handled. Comments were updated accordingly. b) There was a mising check for validity of the argument in the col_insert_into_current function. Check was added. c) Unit test modified to reflect the change in functionality.
* COLLECTION Adding flat traversal & copyDmitri Pal2009-07-155-99/+598
| | | | | | | | | | | | The collection is hearachical. The flattening of the collection was not implemented before both for traversal and copying. This patch introduces functionality to traverse or iterate through collection as flat set and also copy collection into another flattening it and automatically resolving conflicts. Also imptoved tracability and fixed memory leak in unbind iterator code.