summaryrefslogtreecommitdiffstats
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* SSS_CACHE: Reset the initgroups attribute when resetting usersJakub Hrozek2014-02-121-0/+6
| | | | | (cherry picked from commit 30ee051025753b63ceb19d3b83c44019a19554a1) Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sss_cache: fix case-sensitivity issueSumit Bose2013-12-191-27/+36
| | | | | | | For case-insensitive domains the lower-case name for case-insensitive searches is stored in SYSDB_NAME_ALIAS. Related to https://fedorahosted.org/sssd/ticket/1741
* sss_cache: initialize names member of sss_domain_infoSumit Bose2013-12-191-13/+10
| | | | | | | | | sss_tc_fqname() called by sss_get_domain_name() requires that the names member of the sss_domain_info struct is set to work properly. If the names struct is properly initialized in sss_domain_info the separate one in the tool context is not needed anymore. Related to https://fedorahosted.org/sssd/ticket/1741
* Fix formating of variables with type: uid_tLukas Slebodnik2013-09-112-3/+5
|
* Fix formating of variables with type: ssize_tLukas Slebodnik2013-09-111-1/+1
|
* Fix two minor typosYuri Chornoivan2013-07-251-1/+1
|
* TOOLS: Update all services with sss_debuglevelOndrej Kos2013-07-191-2/+7
| | | | | | | https://fedorahosted.org/sssd/ticket/2007 PAC, SSH, SUDO and AUTOFS services' debug levels weren't modified when sss_debuglevel tool was used.
* sss_cache: Add option to invalidate all entriesMichal Zidek2013-07-101-0/+14
| | | | | | Option -E/--everething was added to invalide all types of entries. https://fedorahosted.org/sssd/ticket/1988
* Do not copy special files when creating homedirOndrej Kos2013-07-091-68/+3
| | | | | | https://fedorahosted.org/sssd/ticket/1778 When trying to copy special file, only message is logged now.
* Fix minor typosYuri Chornoivan2013-06-121-1/+1
|
* New utility function sss_get_domain_nameJakub Hrozek2013-06-071-8/+4
| | | | | Instead of copying a block of code that checks whether domain is a subdomain and uses only name of FQDN as appropriate, wrap the logic into a function.
* Add utility functions for formatting fully-qualified namesJakub Hrozek2013-05-301-2/+1
| | | | | | Instead of using printf-like functions directly, provide two wrappers that would encapsulate formatting the fully-qualified names. No functional change is present in this patch.
* Move nscd.c from tools to utilOndrej Kos2013-05-212-105/+0
| | | | | | Preparation for the following patch which will include the nscd.c in the monitor code due to newly introduced function for checking the nscd configuration file.
* Fixing critical format string issues.Lukas Slebodnik2013-05-205-8/+12
| | | | | | --missing arguments. --format '%s', but argument is integer. --wrong format string, examle: '%\n'
* Inform about function duplication.Michal Zidek2013-04-171-0/+3
| | | | | | | | | | | | | | | sss_mc_set_recycled is a static function, that should not be used outside nsssrv_mmap_cache.c. The sss_cache tool is an exception, because in the case when sssd is not running, sss_cache must invalidate the memory cache file. That is why sss_mc_set_recycled was copied to the tools_mc_util.c (as helper function for sss_memcache_invalidate function). It was duplicated to allow this function to remain static (and invisible to any .h files), so that it is not used anywhere else. Wrong usage of this function might cause race conditions and corrupt the cache. I'll add comments about the duplication to the code.
* sss_cache: Remove annoying messagesMichal Zidek2013-04-151-8/+6
| | | | | | When requested entry was not found in one domain, an ERROR message was written to the user even if the entry was found in the next domain and deleted properly.
* sss_cache: support for subdomainsMichal Zidek2013-04-151-57/+117
| | | | https://fedorahosted.org/sssd/ticket/1741
* Wrong condition after waitpid.Michal Zidek2013-04-051-1/+1
| | | | On success, waitpid() returns pid of terminated child, not 0.
* Check for waitpid failure at wrong place.Michal Zidek2013-04-052-10/+9
| | | | | | Coverity bugs. https://fedorahosted.org/sssd/ticket/1865
* Return errno, not -1 on failure in files.cJakub Hrozek2013-04-031-0/+1
| | | | https://fedorahosted.org/sssd/ticket/1862
* Reuse sss_open_cloexec at other places in code.Lukas Slebodnik2013-03-131-66/+4
| | | | | | | | Functions open_cloexec and openat_cloexec were renamed with prefix "sss_" and moved to separete file. Replacing duplicated code of function sss_open_cloexec everywhere in the source code. https://fedorahosted.org/sssd/ticket/1794
* 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
* tools: append new line to string from poptStrerror()Milan Cejnar2013-02-211-1/+13
| | | | | | | | | https://fedorahosted.org/sssd/ticket/1756 Messages from poptStrerror() passed to BAD_POPT_PARAMS macro were printed out to the console without new line character at the end of the message. BAD_POPT_PARAMS should now behave correctly with strings both with or without new line character at the end.
* Add function get_next_domain()Simo Sorce2013-02-102-3/+8
| | | | | | | 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()
* Unchecked return value in files.cMichal Zidek2013-01-291-1/+9
| | | | | Found by coverity. https://fedorahosted.org/sssd/ticket/1791
* TOOLS: Compile on old platforms such as RHEL5Jakub Hrozek2013-01-281-37/+140
| | | | | Provides compatible declarations for modern file management functions such as futimens or opening with the O_CLOEXEC flag
* TOOLS: Use file descriptor to avoid races when creating a home directoryJakub Hrozek2013-01-233-351/+361
| | | | | | | | | | | When creating a home directory, the destination tree can be modified in various ways while it is being constructed because directory permissions are set before populating the directory. This can lead to file creation and permission changes outside the target directory tree, using hard links. This security problem was assigned CVE-2013-0219 https://fedorahosted.org/sssd/ticket/1782
* TOOLS: Use openat/unlinkat when removing the homedirJakub Hrozek2013-01-231-42/+41
| | | | | | | | | | The removal of a home directory is sensitive to concurrent modification of the directory tree being removed and can unlink files outside the directory tree. This security issue was assigned CVE-2013-0219 https://fedorahosted.org/sssd/ticket/1782
* TOOLS: invalidate parent groups in memory cache, tooJakub Hrozek2013-01-214-8/+71
| | | | | | | | | https://fedorahosted.org/sssd/ticket/1775 In addition to invalidating the group being added to when adding a member group/user, we also need to invalidate all its parent groups, otherwise this getgrnam("parent") wouldn't report the members newly added to its child groups.
* tools: Respect use_fully_qualified_namesMichal Zidek2013-01-161-0/+9
| | | | | | | Tools for LOCAL domain should require FQDN if option 'use_fuly_quallified_names = TRUE' was configured. https://fedorahosted.org/sssd/ticket/1746
* 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
* TOOLS: Refresh memcache after changes to local users and groupsJakub Hrozek2013-01-152-0/+42
|
* TOOLS: Provide a convenience function to refresh a list of groupsJakub Hrozek2013-01-152-0/+22
|
* TOOLS: Split querying nss responder into a separate functionJakub Hrozek2013-01-154-32/+68
| | | | | | The tools query the responder in order to sync the memcache after performing changes to the local database. The functions will be reused by other tools so I split them into a separate functions.
* TOOLS: move memcache related functions to tools_mc_utils.cJakub Hrozek2013-01-153-161/+188
| | | | | | | The upcoming patches will link only users of this file with client libs, so it's better to have it separate. There is no functional change in this patch
* TOOLS: set domain in check_group_namesJakub Hrozek2013-01-151-0/+1
|
* 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-152-2/+4
|
* 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_cache_password()Simo Sorce2013-01-151-1/+1
|
* Add domain arguments to sysdb_add_group functions.Simo Sorce2013-01-151-1/+2
|
* Add domain argument to sysdb_add_user()Simo Sorce2013-01-152-2/+3
|
* 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-152-2/+3
|
* Add domain argument to sysdb_set_user_attr()Simo Sorce2013-01-152-7/+10
|
* Add domain to sysdb_search_group_by_name()Simo Sorce2013-01-151-3/+3
| | | | Also remove unused sysdb_search_domgroup_by_name()
* Add domain to sysdb_search_user_by_name()Simo Sorce2013-01-151-1/+1
| | | | Also remove unused sysdb_search_domuser_by_name()