summaryrefslogtreecommitdiff
path: root/server/responder/common
AgeCommit message (Collapse)AuthorFilesLines
2009-12-08dhash: Add private pointer for delete callbackSimo Sorce1-1/+1
Also pass a flag to the delete callback to tell it if this is a normal entry removal or we are cleaning up the tbale definitively.
2009-12-08Fix potential uninitialized value error in responder_dp.cStephen Gallagher1-1/+1
If we fell into the default case of the switch statement, we would attempt to talloc_free() a random memory location. This patch guarantees that sdp_req is NULL if it has not been initialized.
2009-11-23Speed up user requests while offlineStephen Gallagher2-2/+8
This adds a new boolean option to sss_dp_send_acct_req() called fast_reply. If we make a request to the backends and we are currently offline, this option will determine whether we should immediately return from the cache (acceptable for NSS requests) or potentially wait for an online check to complete (required for PAM requests).
2009-11-12Change var name to make its use more clear.Simo Sorce2-7/+7
Change memctx to make clear it should be used only when a callback is being used.
2009-10-09Remove DP processSimo Sorce3-34/+78
Turn the backend process into data provider servers Make Frontends (pam, nss) directly attach to the backends
2009-10-06Remove unused btreemap codeStephen Gallagher2-2/+0
We have converted to using dhash in place of btreemap everywhere in the code.
2009-10-05Make dp requests more robustSimo Sorce1-36/+109
This should fix #218 It should also prevent us from leaking memory in case the original request times out and should prevent races with the callbacks beeing freed after sdp_req is freed and thus dereferencing freed memory in the callbacks detructors.
2009-09-25Upgrade confdb to version 2Stephen Gallagher1-2/+2
This converts a great many configuration options to the new standard format.
2009-09-23Revert "Use syslog for logging error conditions in SSSD"Stephen Gallagher2-38/+38
This reverts commit 8c50bd085c0efe5fde354deee2c8118887aae29d. Amended: commit 1016af2b1b97ad4290ccce8fa462cc7e3c191b2e also made use of the SYSLOG_ERROR() macro, so those portions of that code also needed to be reverted.
2009-09-21Use syslog for logging error conditions in SSSDJakub Hrozek2-38/+38
This is just a band-aid until ELAPI is fully functional and ready to use.
2009-09-11Add copyright noticesJakub Hrozek1-0/+21
Fixes: #138
2009-09-08Split database in multiple filesSimo Sorce2-3/+3
The special persistent local database retains the original name. All other backends now have their own cache-NAME.ldb file.
2009-08-27Fix group replies when using member/memberofSimo Sorce2-6/+41
Also remove legacy memberuid support
2009-08-18added missing hash_create which was remove by a previous patchSumit Bose1-5/+14
2009-08-17Fix reconnection codeSimo Sorce3-145/+35
Remove redundant reconnection code that was interfeering with the sbus reconnection code. Consolidate include files for sbus relates operations. Make pamsrv code similar to nsssrv code.
2009-08-14Refactor responder_dp.cStephen Gallagher2-91/+91
Many of the functions in responder_dp.c were originally NSS- specific and were moved there from the NSS responder code. Since they are now generic to any responder, rename them to sss_dp_*
2009-08-14Don't go to the backend for identical cache entry requestsStephen Gallagher2-54/+294
Currently, if an additional request comes in for a cache entry while that same entry is already in the process of being refreshed, we start a duplicate cache update request. This patch adds allows the cache to maintain a hash table of all in-progress requests and queue up multiple callbacks for updates in progress. Once the data is returned, all of these callbacks will fire.
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-11Change the why DP clients identifySimo Sorce3-5/+38
Mirrors what we have done with the monitor.
2009-08-11Change services identification mechanismSimo Sorce2-4/+14
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-10Simplify interfaces initializationSimo Sorce3-47/+19
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 Sorce2-4/+4
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 Sorce3-13/+13
Rationalize and rename connection names in preparatoin for merging of server and connection structures.
2009-08-10Remove redundant memory contextsSimo Sorce3-22/+28
Simplify code by removing stuff that is never used or redundant.
2009-08-05Move parsing of names and domains into util/Jakub Hrozek2-120/+1
2009-07-20Raise debug level for version negotiationSimo Sorce1-2/+2
2009-07-02check pending_return after dbus_connection_send_with_replySumit Bose1-1/+1
2009-05-26Silence warningsSimo Sorce1-2/+2
2009-05-26Do not fire up backend search when the data provider is localJakub Hrozek1-0/+4
2009-05-15added more flexible handling of client protocolSumit Bose2-1/+41
- allow different protocol versions for PAM and NSS - support more than one protocol version in the responder
2009-04-27Eliminate segfault on NSS and PAM responder startup.Stephen Gallagher1-0/+4
If the data provider is not yet available when NSS and PAM start, they will generate a segmentation fault when trying to configure their automatic reconnection to the Data Provider. I've now added code in sss_dp_init() to detect whether the dp_ctx is NULL and return EIO.
2009-04-17Force user check and discover user's domainSimo Sorce2-0/+274
Force a user lookup against the users domain provider. If a user domain is not specified search though all non fully qualifying domains. Perform authentication against the corrent domain auth backend, based on the user's domain found in the lookup if one was not specified. Also move the NSS-DP functions in COMMON-DP as they are reused by the PAM responder too now.
2009-04-08Change the way we retrieve domainsSimo Sorce2-37/+2
To be able to correctly filter out duplicate names when multiple non-fully qualified domains are in use we need to be able to specify the domains order. This is now accomplished by the configuration paramets 'domains' in the config/domains entry. 'domains' is a comma separated list of domain names. This paramter allows also to have disbaled domains in the configuration without requiring to completely delete them. The domains list is now kept in a linked list of sss_domain_info objects. The first domain is also the "default" domain.
2009-04-07Unify name parsing and reposnder headersSimo Sorce6-60/+147
Use common sss_parse_name function in all responders Simplify responder headers by combining common,cmd,dp in one header and add name parse structure as part of the common responder context.
2009-03-27Make nsssrv use the common responder functionsSimo Sorce4-35/+13
Make nss_ctx a private pointer of the common resp_ctx Use sss_process_init and remove all duplicate functions from nsssrv.c
2009-03-26Enable autoreconnection to the Data Provider in PAMStephen Gallagher2-3/+6
2009-03-26Refactor nss_ctx to resp_ctx in respondersStephen Gallagher4-98/+98
2009-03-10added generic PAM return messages and a false login delaySumit Bose1-1/+1
2009-03-09use fixed paths to sockets to make sure clients and server are using the sameSumit Bose3-56/+67
2009-03-05added a privileged pipeSumit Bose5-5/+135
2009-03-02first version of LOCAL pam backendSumit Bose1-0/+22
2009-02-27Refactor creation of domain_map into confdbStephen Gallagher1-68/+3
The NSS provider, the Data Provider backends and the InfoPipe all need access to the domain map provided by the confdb. Instead of reimplimenting it in multiple places, it is now provided in a pair of helper functions from the confdb. confdb_get_domains() returns a domain map by reference. Always returns the most up-to-date set of domains from the confdb. confdb_get_domains_list() returns an array of strings of all the domain names. Always returns the most up-to-date set of domains from the confdb. This patch also modifies the btreemap_get_keys() function to better handle memory and report allocation failures.
2009-02-26Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce5-27/+27
dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
2009-02-24Add PAM responderSumit Bose8-0/+1077
Also move responders under server/responder with shared code in server/responder/common Signed-off-by: Simo Sorce <ssorce@redhat.com>