summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* IPA: Don't call tevent_req_post outside _sendJakub Hrozek2014-02-201-1/+0
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* NSS: Continue if there is no portJakub Hrozek2014-02-201-1/+1
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* ad_account_can_shortcut(): return bool instead of errnoPavel Březina2014-02-191-29/+11
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2210 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Use KRB5_CFLAGS where appropriateAlexey Shabalin2014-02-191-0/+5
| | | | | | | | | | There are cases when MIT Kerberos is installed with includes in a subdirectory of /usr/include (or /usr/local/include). In such case we have to properly use KRB5_CFLAGS to reach them. https://fedorahosted.org/sssd/ticket/2226 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* DEBUG: Fix build without journaldJakub Hrozek2014-02-191-3/+3
| | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* BUILD: Simplify enabling journald on installed systemsStephen Gallagher2014-02-192-0/+27
| | | | | | | | | | | systemd supports overrides of the standard service file to be placed in /etc/systemd/system/<service>.service.d/ With this patch, we will install a commented-out override file to /etc that will instruct the user on how to enable logging to journald. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* DEBUG: Enable sending structured debug logs to journaldStephen Gallagher2014-02-191-0/+90
| | | | | | | | | | | | | | | We are now able to send structured debug logs to journald, tagged with the code file, line number and domain that the log pertains to. To enable this functionality, SSSD must be configured at build-time with --with-syslog=journald and must be launched without -f/--debug-to-files This behavior is nearly identical to how SSSD will function today on a systemd-based system if --debug-to-files is disabled, since it will redirect stdout and stderr into journald. This patch merely enhances the situation to send structured logs instead of simple string messages. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* DEBUG: Allow debug_fn to process __FILE__ and __LINE__Stephen Gallagher2014-02-193-7/+17
| | | | | | | | | | | | | 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>
* tests: don't print debug message when test dir does not existPavel Březina2014-02-181-1/+1
| | | | | | | | We delete the test dir before a new test suit is started, to make sure there is no garbage left. The test dir is usually already deleted so in most runs a noisy debug message is printed. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: nested groups unit testPavel Březina2014-02-181-0/+198
| | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2024 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: new macro sss_will_return_alwaysPavel Březina2014-02-181-0/+2
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: mock sysdb users and groupsPavel Březina2014-02-182-0/+241
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: mock SDAPPavel Březina2014-02-182-0/+176
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: add confdb_path to sss_test_ctxPavel Březina2014-02-182-4/+5
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* make make_realm_upper_case() staticPavel Březina2014-02-183-20/+18
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* ldap: move domain related content from ldap_common.c to sdap_domain.cPavel Březina2014-02-182-176/+197
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* ldap: move options related content from ldap_common.c to ldap_options.cPavel Březina2014-02-182-764/+787
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sdap: move sdap_get_id_specific_filter() to sdap_utils.cPavel Březina2014-02-182-20/+20
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sdap: move non async functions from sdap_async_connection.c to sdap_utils.cPavel Březina2014-02-182-18/+18
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sdap: move non async functions from sdap_async.c to sdap_utils.cPavel Březina2014-02-182-118/+142
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Translation: Move german translation to right directoryLukas Slebodnik2014-02-182-1/+11053
| | | | | | | | | po/de.po -> src/man/po/de.po Resolves: https://fedorahosted.org/sssd/ticket/2225 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* MAN: Clarify the new krb5_use_fast IPA defaultJakub Hrozek2014-02-172-1/+35
|
* IPA: default krb5_fast_principal to host/$client@$realmPavel Březina2014-02-171-3/+5
| | | | | | | | If krb5_fast_principal is not set in sssd.conf it was set to host/$client, KRB5 default realm was used which doesn't have to be the same as realm used for IPA, thus authentication failed when using FAST. Reviewed-by: Alexander Bokovoy <abokovoy@redhat.com>
* test_dyndns: Test right variable after allocation.Lukas Slebodnik2014-02-171-1/+1
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* DOC: Fix names of arguments in doxygen commentsLukas Slebodnik2014-02-173-5/+5
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* resolv_gethostbyname_dns_parse(): remove tmp_ctxPavel Březina2014-02-171-7/+3
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2198 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* IPA: Default to krb5_use_fast=tryJakub Hrozek2014-02-132-1/+28
| | | | | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Nathaniel McCallum <npmccallum@redhat.com> Reviewed-by: Alexander Bokovoy <abokovoy@redhat.com>
* Remove DEBUG macro support for old debug levelsNikolai Kondrashov2014-02-125-111/+11
| | | | | | | | | | | | | | Remove support for specifying old debug levels to the DEBUG macro: * remove debug_get_level function which was used for conversion, * remove debug_get_level tests, * remove mentions of old/new levels from DEBUG and DEBUG_IS_SET macro descriptions, * rename "newlevel" argument of debug_fn to just "level". Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Update debug level in sysdb_check_upgrade_02Nikolai Kondrashov2014-02-121-1/+1
| | | | | | | | | Update debug level passed to backup_file in sysdb_check_upgrade_02 to prepare for removal of old debug level support. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Update DEBUG* invocations to use new levelsNikolai Kondrashov2014-02-12112-2270/+3187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-4/+4
| | | | | | | | | 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-12215-7825/+7825
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Make DEBUG macro definition variadicNikolai Kondrashov2014-02-121-6/+6
| | | | | | | | | | Update DEBUG macro definition to accept format string and its arguments as direct variadic macro arguments, instead of expecting them as an expression in parens. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Cleanup debug_fnNikolai Kondrashov2014-02-121-4/+6
| | | | | | | | Cleanup debug_fn to better match coding conventions. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Remove extra flushing from debug message outputNikolai Kondrashov2014-02-121-1/+6
| | | | | | | | Remove extra fflush(3) invocation when outputting debug messages. 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-125-367/+67
| | | | | | | | | | | | | | | | | 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>
* LDAP: Handle errors from sdap_id_op properly in enum codeJakub Hrozek2014-02-121-1/+41
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* AD: Remove dead codeJakub Hrozek2014-02-121-8/+0
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* AD: Only download domains that are set to enumerateJakub Hrozek2014-02-121-1/+5
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* LDAP: Detect the presence of POSIX attributesJakub Hrozek2014-02-1210-15/+504
| | | | | | | | | | | | | | | | | | | When the schema is set to AD and ID mapping is not used, there is a one-time check ran when searching for users to detect the presence of POSIX attributes in LDAP. If this check fails, the search fails as if no entry was found and returns a special error code. The sdap_server_opts structure is filled every time a client connects to a server so the posix check boolean is reset to false again on connecting to the server. It might be better to move the check to where the rootDSE is retrieved, but the check depends on several features that are not known to the code that retrieves the rootDSE (or the connection code for example) such as what the attribute mappings are or the authentication method that should be used. Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* SSS_CACHE: Reset the initgroups attribute when resetting usersJakub Hrozek2014-02-121-0/+6
|
* NSS: Fix DEBUG formatting of cmdctx->idJakub Hrozek2014-02-111-26/+26
| | | | | | | Sometimes a UID/GID value was printed using the %d format specifier which caused overflows for very large values of ID. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* MONITOR: Incorrect permissions on sssd.confPavel Reichl2014-02-111-1/+7
| | | | | | | | | | Print user friendly warning when permissions on sssd.conf are incorrect and provide hint. Resolves: https://fedorahosted.org/sssd/ticket/2208 Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
* memberof: Removed unused parameter from mbof_fill_vals_array.Lukas Slebodnik2014-02-091-13/+9
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* CONFDB: fail if there are domains with same namePavel Reichl2014-02-091-0/+18
| | | | | | | | | | Fail to start sssd if the domains given in the domains option are the same as or only differ in case. Resolves: https://fedorahosted.org/sssd/ticket/2171 Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
* MAN: update of subdomain_homedir usagePavel Reichl2014-02-051-1/+2
| | | | | Resolves: https://fedorahosted.org/sssd/ticket/2169
* responder: Use SAFEALIGN macros where appropriate.Michal Zidek2014-02-056-52/+83
| | | | https://fedorahosted.org/sssd/ticket/1359
* AD: support for subdomain_homedirPavel Reichl2014-02-051-0/+190
| | | | | | | Homedir is defaultly set accordingly to subdomain_homedir for users from AD. Resolves: https://fedorahosted.org/sssd/ticket/2169
* Revert "NSS: add support for subdomain_homedir"Pavel Reichl2014-02-051-8/+0
| | | | This reverts commit 1dc7694a1cbc62b0d7e23cc1369579e5ce0071e8.