summaryrefslogtreecommitdiffstats
path: root/src/tools/sss_cache.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove the alt_db_path parameter of sysdb_initMichal Zidek2013-03-051-1/+1
| | | | | | This parameter was never used. https://fedorahosted.org/sssd/ticket/1765
* Add function get_next_domain()Simo Sorce2013-02-101-1/+1
| | | | | | | Use this function instead of explicitly calling domain->next This function allows to get the next primary domain or to descend into the subdomains and replaces also get_next_dom_or_subdom()
* sss_cache: Call DEBUG_INIT soonerMichal Zidek2013-01-161-2/+3
| | | | | | | | If bad parameteres were passed to sss_cache, the init function returned without calling DEBUG_INIT macro and unnecessary level 1 debug message was printed. https://fedorahosted.org/sssd/ticket/1745
* Add domain arguments to sysdb services functionsSimo Sorce2013-01-151-2/+3
| | | | also fix sysdb_svc_add declarations
* Add domain argument to sysdb autofs functionsSimo Sorce2013-01-151-1/+1
|
* Add domain arg to sysdb_search/delete_netgroup()Simo Sorce2013-01-151-1/+2
|
* Add domain argument to sysdb_search_groups()Simo Sorce2013-01-151-1/+2
|
* Add domain arg to sysdb_search_users()Simo Sorce2013-01-151-1/+2
|
* Add domain argument to sysdb_search_custom()Simo Sorce2013-01-151-2/+5
| | | | Also changes sysdb_search_custom_by_name()
* Add domain argument to sysdb_set_netgroup_attr()Simo Sorce2013-01-151-1/+1
|
* Add domain argument to sysdb_set_group_attr()Simo Sorce2013-01-151-1/+1
|
* Add domain argument to sysdb_set_user_attr()Simo Sorce2013-01-151-6/+8
|
* Remove the sysdb_ctx_get_domain() function.Simo Sorce2013-01-151-10/+11
| | | | | We are deprecating sysdb->domain so kill the function that gives access to this member as we should stop relying on it being available (or correct).
* Refactor single domain initializationSimo Sorce2013-01-151-3/+2
| | | | | Bring it out of sysdb, which will slowly remove internal dependencies on domains and instead will always require them to be passed by callers.
* Refactor sysdb initializationSimo Sorce2013-01-151-21/+10
| | | | | | | | | | | | Change the way sysdbs are initialized. Make callers responsible for providing the list of domains. Remove the returned array of sysdb contexts, it was used only by sss_cache and not really necessary there either as that tool can easily iterate the domains. Make sysdb ctx children of their respective domains. Neither sysdb context nor domains are ever freed until a program is done so there shouldn't be any memory hierarchy issue. As plus we simplify the code by removing a destructor and a setter function.
* Use new sysdb_search_service() in sss_cacheSimo Sorce2013-01-141-35/+4
| | | | Also fixes https://fedorahosted.org/sssd/ticket/1754
* Revert "Add a default section to a switch-statement"Simo Sorce2013-01-091-12/+8
| | | | | | | This reverts commit d698499602461b98fd56f2d550f80c6cb25f12a9. And adds the correct fix. Also makes the function static,as it is used nowehere else.
* Add a default section to a switch-statementSumit Bose2013-01-091-0/+3
| | | | | Besides adding the missing default this patch suppresses a compiler warning about ret being uninitialized.
* Remove unhelpful vtable from sss_cacheSimo Sorce2013-01-081-24/+30
| | | | | | | | | Using a vtable like this has various drawacks, including the fact prototypes are not checked by the compiler so the code could silently break and still compile fine (in fact I found this out changing one of the prototypes). A switch statement is also better because it catches if the enum changed and won't risk allowing to access the table out of bounds.
* sss_cache: fqdn not acceptedMichal Zidek2013-01-041-14/+149
| | | | | | sss_cache did not accept fully quaified domain names. https://fedorahosted.org/sssd/ticket/1620
* sss_cache: Small refactor.Michal Zidek2012-11-281-58/+3
| | | | | | | The logic that checks if sssd_nss is running and then sends SIGHUP to monitor or removes the caches was moved to a function sss_memcache_clear_all() and made public in tools_util.h.
* Display more information on DB version mismatchOndrej Kos2012-11-191-0/+2
| | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1589 Added check for determining, whether database version is higher or lower than expected. To distinguish it from other errors it uses following retun values (further used for appropriate error message): EMEDIUMTYPE for lower version than expected EUCLEAN for higher version than expected When SSSD or one of it's tools fails on DB version mismatch, new error message is showed suggesting how to proceed.
* sss_cache: Remove fastcache even if sssd is not running.Michal Zidek2012-11-061-20/+56
| | | | https://fedorahosted.org/sssd/ticket/1584
* sss_cache: Multiple domains not handled properlyMichal Zidek2012-11-061-35/+37
| | | | | | | | | | When working with multiple domains and no matching objects for deletion were found in the first domain, the other domains were not searched at all. Also the ERROR message informing about object not found (the one printed for each domain) was changed to DEBUG message.
* Include talloc log in our debug facilityMichal Zidek2012-10-291-1/+1
| | | | https://fedorahosted.org/sssd/ticket/1495
* sss_cache tool invalidates records in memory cache.Michal Zidek2012-09-241-0/+26
|
* Unify usage of sysdb transactionsMichal Zidek2012-08-231-1/+4
| | | | | | Removing bad examples of usage of sysdb_transaction_start/commit/end functions and making it more consistent (all files except of src/db/sysdb_*.c).
* Always use positional arguments in translatable stringsStephen Gallagher2012-05-221-5/+5
| | | | https://fedorahosted.org/sssd/ticket/1336
* sss_cache: Better error reportingJakub Hrozek2012-04-181-37/+94
| | | | | | | | | | * Print usage when no options are given * Report skipped entries * Print error message when a nonexistent domain is selected https://fedorahosted.org/sssd/ticket/1301 https://fedorahosted.org/sssd/ticket/1305 https://fedorahosted.org/sssd/ticket/1306
* sss_cache: support invalidating services and autofs mapsJakub Hrozek2012-04-181-9/+118
| | | | https://fedorahosted.org/sssd/ticket/1170
* Keep sysdb context in domain info structSumit Bose2012-02-291-8/+2
|
* New DEBUG facility - SSSDBG_UNRESOLVED changed from -1 to 0Pavel Březina2011-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | Removed: SSS_UNRESOLVED_DEBUG_LEVEL (completely replaced with SSSDBG_UNRESOLVED) Added new macro: CONVERT_AND_SET_DEBUG_LEVEL(new_value) Changes unresolved debug level value (SSSDBG_UNRESOLVED) from -1 to 0 so DEBUG macro could be reduced by one condition. Anyway, it has a minor effect, every time you want to load debug_level from command line parameters, you have to use following pattern: /* Set debug level to invalid value so we can deside if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { ... } CONVERT_AND_SET_DEBUG_LEVEL(debug_level);
* New DEBUG facility - conversionPavel Březina2011-08-251-1/+1
| | | | | | | | | | https://fedorahosted.org/sssd/ticket/925 Conversion of the old debug_level format to the new one. (only where it was necessary) Removed: SSS_DEFAULT_DEBUG_LEVEL (completely replaced with SSSDBG_DEFAULT)
* sysdb refactoring: memory context deletedJan Zeleny2011-08-151-4/+4
| | | | | | This patch deletes memory context parameter in those places in sysdb where it is not necessary. The code using modified functions has been updated. Tests updated as well.
* sysdb refactoring: deleted domain variables in sysdb APIJan Zeleny2011-08-151-5/+5
| | | | | The patch also updates code using modified functions. Tests have also been adjusted.
* Fixed uninitialized value in sss_cacheJan Zeleny2011-05-161-0/+1
| | | | https://fedorahosted.org/sssd/ticket/865
* Cache cleaning toolJan Zeleny2011-05-041-0/+360