summaryrefslogtreecommitdiffstats
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* sss_cache: Clear also initgroups fast cacheLukas Slebodnik2015-07-031-0/+10
| | | | Reviewed-by: Michal Židek <mzidek@redhat.com>
* Add missing new lines to debug messagesLukas Slebodnik2015-03-172-7/+7
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sysdb: use sysdb_user/group_dnPavel Březina2015-03-091-6/+2
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Remove strict requirements of python2Lukas Slebodnik2015-02-131-1/+1
| | | | | | | | | | * fix hashbangs * remove strict requirements of python2 in build system Resolves: https://fedorahosted.org/sssd/ticket/2017 Reviewed-by: Petr Viktorin <pviktori@redhat.com>
* add missing '\n' in debug messagesPavel Reichl2015-01-271-4/+5
| | | | | | Also reformat debug strings not to exceed 80 columns long lines. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sss_atomic_write_s() return value is signedJakub Hrozek2014-12-032-6/+5
| | | | Reviewed-by: Sumit Bose <sbose@redhat.com>
* TOOLS: sss_debuglevel should worh with ifp responderLukas Slebodnik2014-12-021-1/+2
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_semanage: Add mlsrange parameter to set_seuserMichal Zidek2014-10-202-2/+2
| | | | | | | mlsrange parameter will be needed in IPA provider and probably at some point in the tools as well. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* util: Move semanage related functions to src/utilMichal Zidek2014-10-202-336/+0
| | | | | | These functions will be reused by IPA provider. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TOOLS: Fix warning Value stored to is never readLukas Slebodnik2014-10-121-2/+0
| | | | | | | dinfo->sysdb was stored to variable sysdb two times. The first time on line 132 and second time after testing for subdomain on line 143. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* SSS_CACHE: Allow sss_cache tool to flush SSH hosts cacheWilliam B2014-09-051-9/+77
| | | | | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2358 Signed-off-by: Jan Cholasta <jcholast@redhat.com> Reviewed-by: Jan Cholasta <jcholast@redhat.com> Reviewed-by: Pavel Reichl <preichl@redhat.com>
* TOOLS: Always debug to stderrJakub Hrozek2014-07-0910-10/+10
| | | | | | | | | https://fedorahosted.org/sssd/ticket/2348 Programs that are supposed to only be executed on the foreground should log to stderr automatically. Reviewed-by: Michal Židek <mzidek@redhat.com>
* TOOLS: New helper tool sss_signalJakub Hrozek2014-07-081-0/+37
| | | | | | | | A minimal tool whose only purpose is to signal the monitor with SIGUSR2. The tool will be executed by the system bus in order to provide system activation, so it's packaged in libexec. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* Use python2 in shebang for python scripts.Lukas Slebodnik2014-06-181-1/+1
| | | | | | | | | https://fedorahosted.org/sssd/ticket/2356 The python scripts are not tested with python3 and /usr/bin/python can be symbolic link to python3 on some distributions. Reviewed-by: Sumit Bose <sbose@redhat.com>
* Fix return value of attr_name_val_split() and attr_op()Sumit Bose2014-06-181-2/+2
| | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TOOLS: Allow adding and modifying custom attributes with sss_usermodJakub Hrozek2014-06-013-0/+151
| | | | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/2182 Adds three new options to the sss_usermod tool: --addattr --setattr --delattr The syntax is attrname=val1,val2, For example: sss_usermod --addattr=phone-123-456 tuser The operations are performed in the order of add, mod, del. Reviewed-by: Michal Židek <mzidek@redhat.com>
* Remove unused structures.Lukas Slebodnik2014-02-261-6/+0
| | | | | | | | | | Reported by: cppcheck 'struct py_sss_transaction', 'struct resolve_get_domain_stat', 'struct sync_op_res' were defined in implementation modules, but they were not used anywhere. Reviewed-by: Michal Žídek <mzidek@redhat.com>
* DEBUG: Allow debug_fn to process __FILE__ and __LINE__Stephen Gallagher2014-02-191-1/+1
| | | | | | | | | | | | | In preparation for enabling journald support for the DEBUG logs, we will need to be able to pass in certain additional arguments that will be required, specifically the code file and line number. We will be able to optionally enable this in the file-based logs as well if we so choose, but for right now we will avoid breaking the log format on disk. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* Update DEBUG* invocations to use new levelsNikolai Kondrashov2014-02-1212-131/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a script to update DEBUG* macro invocations, which use literal numbers for levels, to use bitmask macros instead: grep -rl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e 'use strict; use File::Slurp; my @map=qw" SSSDBG_FATAL_FAILURE SSSDBG_CRIT_FAILURE SSSDBG_OP_FAILURE SSSDBG_MINOR_FAILURE SSSDBG_CONF_SETTINGS SSSDBG_FUNC_DATA SSSDBG_TRACE_FUNC SSSDBG_TRACE_LIBS SSSDBG_TRACE_INTERNAL SSSDBG_TRACE_ALL "; my $text=read_file(\*STDIN); my $repl; $text=~s/ ^ ( .* \b (DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM) \s* \(\s* )( [0-9] )( \s*, ) ( \s* ) ( .* ) $ / $repl = $1.$map[$3].$4.$5.$6, length($repl) <= 80 ? $repl : $1.$map[$3].$4."\n".(" " x length($1)).$6 /xmge; print $text; ' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Fixup DEBUG macro invocations updateNikolai Kondrashov2014-02-121-2/+2
| | | | | | | | | Fix mistakes made by the update script in f87797f "Make DEBUG macro invocations variadic". Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Make DEBUG macro invocations variadicNikolai Kondrashov2014-02-1216-365/+365
| | | | | | | | | | | | | | | | | | | | | | | | Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code: grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Move DEBUG macro body to debug_fnNikolai Kondrashov2014-02-121-1/+2
| | | | | | | | | | | | | | | | | Move DEBUG macro body to the debug_fn function, adding "function" argument to the latter. Rename "debug_fn" in sssd_krb5_locator_plugin.c to "plugin_debug_fn" to remove conflict with the sssd debug_fn. Replace DEBUG_MSG macro usage with debug_fn function usage. Remove DEBUG_MSG macro along with tests. The above makes the total size of binaries drop by 20% for the standard Fedora build and by 44% for a build configured according to Debian packaging script. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Update debug levels in sss_semanage_error_callbackNikolai Kondrashov2014-02-121-4/+4
| | | | | | | | | | | | | Switch to using new debug levels in sss_semanage_error_callback. Make SEMANAGE_MSG_WARN map to SSSDBG_MINOR_FAILURE instead of SSSDBG_CONF_SETTINGS as it suits it better. This prepares the function for the following patch switching it to using updated "debug_fn" which expects new debug levels. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* SSS_CACHE: Reset the initgroups attribute when resetting usersJakub Hrozek2014-02-121-0/+6
|
* 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
* Remove unused parameter from group_show_trim_memberofLukas Slebodnik2013-11-271-3/+1
|
* Remove unused parameter from group_show_mpgLukas Slebodnik2013-11-271-3/+1
|
* Remove unused parameter from seed_domain_user_infoLukas Slebodnik2013-11-271-2/+1
|
* Remove unused parameter from search_autofsmapsLukas Slebodnik2013-11-271-11/+8
|
* Remove unused parameter from invalidate_entryLukas Slebodnik2013-11-271-3/+3
|
* Remove unused parameter from groupaddLukas Slebodnik2013-11-273-5/+3
|
* Remove unused parameter from useraddLukas Slebodnik2013-11-273-3/+1
|
* Remove unused parameter from groupmodLukas Slebodnik2013-11-273-3/+1
|
* Remove unused parameter from usermodLukas Slebodnik2013-11-274-4/+2
|
* Remove unused parameter from mod_groups_memberLukas Slebodnik2013-11-271-11/+10
|
* SYSDB: Drop redundant sysdb_ctx parameter from sysdb.cMichal Zidek2013-11-152-7/+7
|
* SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 2)Michal Zidek2013-11-154-14/+12
|
* SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 1)Michal Zidek2013-11-154-10/+9
|
* SYSDB: Drop the sysdb_ctx parameter from the sysdb_services moduleMichal Zidek2013-11-151-2/+2
|
* SYSDB: Drop the sysdb_ctx parameter from the sysdb_search moduleMichal Zidek2013-11-159-13/+6
|
* SYSDB: Drop the sysdb_ctx parameter from the autofs APIJakub Hrozek2013-11-151-1/+1
|
* Include ext headers with #include <foo.h> - contPavel Reichl2013-11-041-1/+1
| | | | Changing style of including header files from outside of sssd tree - from "header.h" to <header.h>
* Include right header fileLukas Slebodnik2013-09-241-1/+1
| | | | | | | | | Public selinux functions are defined in file src/tools/selinux.c (selinux_file_context, reset_selinux_file_context, set_seuser, del_seuser), but wrong header file was included "util/util.h" All declarations are in header file "tools/tools_util.h". This patch include right header file.
* 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.