Blame SOURCES/0019-logs-review.patch

8ad293
From 69ef1cf763fca6b2c7174ddacf3f510c73cc27e6 Mon Sep 17 00:00:00 2001
8ad293
From: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date: Mon, 28 Dec 2020 19:36:48 +0100
8ad293
Subject: [PATCH] Squashed commit of the following:
8ad293
8ad293
commit bd2f38abe95645b9b16b12d12dac6008b0d2a03b
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Tue Dec 15 18:47:25 2020 +0100
8ad293
8ad293
    UTIL: find_domain_by_object_name_ex() changed log level
8ad293
8ad293
    It's up to user of this function to judge if fail to parse fqname is
8ad293
    a critical error.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 0db68a1f95612fcbad18ca8107a4b170f446dd59
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Tue Dec 15 17:26:09 2020 +0100
8ad293
8ad293
    LDAP: sdap_save_grpmem(): log level changed
8ad293
8ad293
    There are legitimate reasons when sdap_save_grpmem() can be called
8ad293
    with `ignore_group_members = true`
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 00e3ac4a4f9b6c8da27daa3ed8c18664c99256bb
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Dec 13 23:21:37 2020 +0100
8ad293
8ad293
    LDAP: reduce log level in case of fail to store members of missing group (it might be built-in skipped intentionally)
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit dba7de0db3cbaee43ef06a1b7c847fbcf48f3708
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Dec 13 22:37:44 2020 +0100
8ad293
8ad293
    SYSDB: changed logging in sysdb_get_real_name()
8ad293
8ad293
    Missing cache entry isn't an error.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit e86599ba079611ed324ff1493a7173d11c1a7961
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Dec 13 22:22:36 2020 +0100
8ad293
8ad293
    IPA: changed logging in ipa_get_subdom_acct_send()
8ad293
8ad293
    Frontends do not know what kind of lookup the backends support
8ad293
    so it is expected that they might send unsupported requests.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit bf873598a9d4ac8256b20859c0d92fb509861b6b
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Dec 13 20:29:07 2020 +0100
8ad293
8ad293
    IPA: ignore failed group search in certain cases
8ad293
8ad293
    It's currently expected to see those messages with sudo or HBAC rules in play.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 60b17be9e4f4865fe1774076808a6c783a7ec906
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Dec 13 19:36:56 2020 +0100
8ad293
8ad293
    SYSDB: changed log level in sysdb_update_members_ex()
8ad293
8ad293
    Fail to add already existing member isn't critical.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 9390af3c2d1b33e2b5ded0ea0c6c436b9776cedc
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sat Dec 12 21:29:06 2020 +0100
8ad293
8ad293
    IPA: reduce log level in apply_subdomain_homedir()
8ad293
8ad293
    Missing UID for SYSDB_GROUP_CLASS is not an error
8ad293
    (see commit message of e66517dcf63f1d4aaf866c22371dac7740ce0a48 for
8ad293
    additional details)
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 9215cf4e2519d5f085bf97f26a74d499090e46e1
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sat Dec 12 20:46:40 2020 +0100
8ad293
8ad293
    CERTMAP: removed stray debug message
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 0986cf6ced8c4e09b8031d19eddffca679aca30c
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Thu Dec 3 21:06:31 2020 +0100
8ad293
8ad293
    UTIL: fixed bug in server_setup() that prevented setting debug level to 0 explicitly
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 644453f8d93540a91236683015f3418d29c6d95a
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Tue Dec 1 13:03:03 2020 +0100
8ad293
8ad293
    LOGS: default log level changed to <= SSSDBG_OP_FAILURE
8ad293
8ad293
    :config: New default value of `debug_level` is 0x0070
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 4fe060abbe958c2f9b5aa44e489620063029aa0b
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 22:19:46 2020 +0100
8ad293
8ad293
    FILES: reduced debug level in refresh_override_attrs() if case "No overrides, nothing to do"
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 29f243fd5b256efe3c7f4e4f0940c7d0ae6b4fa1
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 22:07:01 2020 +0100
8ad293
8ad293
    AD: reduced log level in case check_if_pac_is_available() can't find user entry. This is typical situation when, for example, INITGROUPS lookup is executed for uncached user.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit ed6ec569780ad8203c4990faed5a9f0dc27dd12b
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 21:13:28 2020 +0100
8ad293
8ad293
    SDAP: reduced log level in case group without members
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 26fdc3c8f0ae6493442ea291d9bf36ba148ef209
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 21:06:19 2020 +0100
8ad293
8ad293
    CACHE_REQ: reduced log level in cache_req_object_by_name_well_known() Non fqdn input isn't necessarily an error here.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit a7b145b99b9f71ad3d02251fff5b587041c9f1ab
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 20:27:44 2020 +0100
8ad293
8ad293
    LDAP: reduced log level in hosts_get_done()
8ad293
8ad293
    Absent host in LDAP server isn't SSSD failure.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 6e3b4d745fc8d2de14d69aa30bc21aa549a435f8
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 16:45:51 2020 +0100
8ad293
8ad293
    SBUS: reduced log level in case of unexpected signal
8ad293
8ad293
    Most probably module is not fully initialized yet.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 90dae38d7442757b8a51f91a6ba3fb83f99320a1
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 11:39:56 2020 +0100
8ad293
8ad293
    RESPONDER: reduce log level in sss_parse_inp_done() in case of "Unknown domain" since this might be search by UPN
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 69aa3e8c4b82a06e45ba59eb1c17af252aa971ce
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 01:05:52 2020 +0100
8ad293
8ad293
    DP: do not log failure in case provider doesn't support check_online method
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 1af89925e62cccacb2957f55b16988a5e71fe5e1
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 00:28:08 2020 +0100
8ad293
8ad293
    IPA: corrected confusing message
8ad293
8ad293
    Log message like:
8ad293
    ```
8ad293
    sysdb_getpwnam() got more users than expected. Expected [1], got [0]
8ad293
    ```
8ad293
    looks a bit confusing.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit a419b7e673d2de571d873b79be31b1ae2fa89832
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 30 00:13:31 2020 +0100
8ad293
8ad293
    SSS_IFACE: corrected misleading return code
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 99e44d9db41f5bb56281ed65d815c32139195931
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Nov 29 22:55:07 2020 +0100
8ad293
8ad293
    LDAP: added missed \n in log message
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 52dc85540e621b00f358fea94e2e390d580948d8
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Nov 29 21:42:08 2020 +0100
8ad293
8ad293
    SYSDB: reduce log level in sysdb_update_members_ex() in case failed attempt to DEL unexisting attribute
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit a7b6413d9fb870f51f09955bdceee01952442c63
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Nov 29 21:32:46 2020 +0100
8ad293
8ad293
    UTIL: sss_ldb_error_to_errno() improved
8ad293
8ad293
    LDB_ERR_NO_SUCH_ATTRIBUTE error code was added to mapping and log level
8ad293
    for unknown error code was reduced.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit ac22859006b5658017b2720ca3e02d34c5beecdd
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Sun Nov 29 17:03:58 2020 +0100
8ad293
8ad293
    PAM: reduce log level in may_do_cert_auth()
8ad293
8ad293
    Reduce log level in may_do_cert_auth() as this is not a critical failure
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 5068655a67f88cb1730f28689c5effee264321ad
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 21:45:53 2020 +0100
8ad293
8ad293
    UTIL: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 3cbd0465b52f9bbb7e20b0b12e154f51bab0866e
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 21:12:16 2020 +0100
8ad293
8ad293
    PAM: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit f028253ff87bf11ed034ad5acf1f67e8863bed60
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 20:59:13 2020 +0100
8ad293
8ad293
    NSS: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit f457a1a69240381ad7637a09dc66c1aeb78e1d18
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 20:33:11 2020 +0100
8ad293
8ad293
    IFP: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 058644f2ef6d1958db657d371158d2df7798dd49
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 20:21:55 2020 +0100
8ad293
8ad293
    RESPONDER: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 01ba32f250a0e51771471c52440c11f6f05f2a48
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 20:15:22 2020 +0100
8ad293
8ad293
    CACHE_REQ: debug message correction
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 018c08acbb3bbb836c9acefaf5c384eb9231a60a
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 20:05:06 2020 +0100
8ad293
8ad293
    AUTOFS: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit fb052a4c9843ce518a7202d842c43631f8bbfd2d
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 19:57:00 2020 +0100
8ad293
8ad293
    RESOLV: debug message correction
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit d91409df456f9ad7aad39d0cad0ed053cf1f3653
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 27 19:49:14 2020 +0100
8ad293
8ad293
    PROXY: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit ff8f44ce2d2eedb098d980793a949f7f7e55576a
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 20 19:46:28 2020 +0100
8ad293
8ad293
    LDAP: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 9244820af59ba6b947cf9aa1269d03bb6f2e4f38
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Fri Nov 20 19:22:36 2020 +0100
8ad293
8ad293
    KRB5: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 667b983aaee380c50d50ef07542b004e60041581
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Thu Nov 19 18:31:28 2020 +0100
8ad293
8ad293
    IPA: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 2f70695a874dcb84d4b86773138a5a6b6259958f
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 22:12:21 2020 +0100
8ad293
8ad293
    DP: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit d6f6f053d7a97a220b52ce92fd653eef8cec5a74
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 21:37:38 2020 +0100
8ad293
8ad293
    AD: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 85d8adc4d24f09e47f2a9c0fa595d90c61036b18
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 19:09:33 2020 +0100
8ad293
8ad293
    P11_CHILD: severity level of few debug messages adjusted
8ad293
8ad293
    Severity level of few debug messages was adjusted and journal message
8ad293
    in case of disabled certificate verification was added.
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit fe0530ef96baa8fd39ce6b87c0c760e17c5eb6f8
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 16:28:43 2020 +0100
8ad293
8ad293
    MONITOR: severity level of few debug messages adjusted
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit daa5454f870a5436a554091a1333cc8be0cbc566
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 16:02:23 2020 +0100
8ad293
8ad293
    SYSDB:views: few debug message corrections
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 82dc14b027f9115cabafce71d2b385d5c7d1dd4f
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 15:56:46 2020 +0100
8ad293
8ad293
    SYSDB:upgrade: debug message corrected
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit e731368ed9cea9b35d0ae654e1534084c6ef4642
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 15:50:08 2020 +0100
8ad293
8ad293
    SYSDB:service: severity level of few debug messages adjusted
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit f55c9599068c43037a8b666af92ba9b8a044f735
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 15:32:21 2020 +0100
8ad293
8ad293
    SYSDB:selinux: debug message severity level was adjusted
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 744582419abfd6e5665315748d44e732f1d56f13
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 15:30:45 2020 +0100
8ad293
8ad293
    SYSDB:search: few debug messages were corrected
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit 033c31a2a4994367edea1ded8303a0d2dbc59b1c
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 15:19:46 2020 +0100
8ad293
8ad293
    SYSDB:ops: few debug messages were corrected
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit a73df70ee0bcc8f1b80a2e20132592724bd5f675
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Wed Nov 18 13:19:25 2020 +0100
8ad293
8ad293
    SYSDB:ipnetworks: severity level of few debug messages adjusted
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit b4acf71d0a81aeeb2754645d2798ce1e927121f3
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 16 21:18:14 2020 +0100
8ad293
8ad293
    SYSDB:iphosts: severity level of few debug messages adjusted
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit d8af1db84b48193a546bbeec84a7dd7e2b132244
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 16 20:05:12 2020 +0100
8ad293
8ad293
    SYSDB:sudo: changed debug message to be consistent
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit df723cb98b406b0262f04d0e43e8e5bf0030074f
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 16 19:10:41 2020 +0100
8ad293
8ad293
    SYSDB: wrong debug message corrected
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
8ad293
commit e350d917e6d48c1d13502ab2849d3e2a0815215e
8ad293
Author: Alexey Tikhonov <atikhono@redhat.com>
8ad293
Date:   Mon Nov 16 18:13:26 2020 +0100
8ad293
8ad293
    SYSDB:autofs: cosmetic updates
8ad293
8ad293
    Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
8ad293
    Reviewed-by: Sumit Bose <sbose@redhat.com>
8ad293
---
8ad293
 src/db/sysdb.c                                |  2 +-
8ad293
 src/db/sysdb_autofs.c                         |  4 +-
8ad293
 src/db/sysdb_iphosts.c                        | 10 ++---
8ad293
 src/db/sysdb_ipnetworks.c                     |  6 +--
8ad293
 src/db/sysdb_ops.c                            | 37 ++++++++++++------
8ad293
 src/db/sysdb_search.c                         | 17 ++++++---
8ad293
 src/db/sysdb_selinux.c                        |  2 +-
8ad293
 src/db/sysdb_services.c                       |  6 +--
8ad293
 src/db/sysdb_sudo.c                           |  3 +-
8ad293
 src/db/sysdb_upgrade.c                        |  2 +-
8ad293
 src/db/sysdb_views.c                          |  6 +--
8ad293
 src/lib/certmap/sss_certmap_krb5_match.c      |  1 -
8ad293
 src/man/include/debug_levels.xml              |  3 +-
8ad293
 src/man/include/debug_levels_tools.xml        |  3 +-
8ad293
 src/monitor/monitor.c                         | 14 +++----
8ad293
 src/p11_child/p11_child_common.c              |  2 +-
8ad293
 src/p11_child/p11_child_common_utils.c        |  3 ++
8ad293
 src/p11_child/p11_child_openssl.c             |  4 +-
8ad293
 src/providers/ad/ad_cldap_ping.c              |  2 +-
8ad293
 src/providers/ad/ad_common.c                  |  7 ++--
8ad293
 src/providers/ad/ad_dyndns.c                  |  6 +--
8ad293
 src/providers/ad/ad_gpo.c                     | 16 +++++---
8ad293
 src/providers/ad/ad_machine_pw_renewal.c      |  7 ++--
8ad293
 src/providers/ad/ad_pac.c                     |  6 ++-
8ad293
 src/providers/ad/ad_subdomains.c              |  2 +-
8ad293
 src/providers/be_dyndns.c                     |  3 +-
8ad293
 src/providers/be_ptask.c                      |  2 +-
8ad293
 src/providers/be_refresh.c                    |  3 +-
8ad293
 src/providers/data_provider/dp.c              |  4 +-
8ad293
 src/providers/data_provider/dp_target_sudo.c  | 10 +++--
8ad293
 src/providers/data_provider_be.c              |  5 +--
8ad293
 src/providers/data_provider_fo.c              |  2 +-
8ad293
 src/providers/data_provider_opts.c            |  6 +--
8ad293
 src/providers/data_provider_req.h             |  1 +
8ad293
 src/providers/files/files_ops.c               |  2 +-
8ad293
 src/providers/ipa/ipa_access.c                |  2 +-
8ad293
 src/providers/ipa/ipa_common.c                |  5 +--
8ad293
 src/providers/ipa/ipa_hbac_common.c           |  2 +-
8ad293
 src/providers/ipa/ipa_hbac_services.c         |  4 +-
8ad293
 src/providers/ipa/ipa_hbac_users.c            |  4 +-
8ad293
 src/providers/ipa/ipa_id.c                    |  2 +-
8ad293
 src/providers/ipa/ipa_init.c                  |  4 +-
8ad293
 src/providers/ipa/ipa_s2n_exop.c              |  3 +-
8ad293
 src/providers/ipa/ipa_selinux.c               |  4 +-
8ad293
 src/providers/ipa/ipa_session.c               |  4 +-
8ad293
 src/providers/ipa/ipa_subdomains_ext_groups.c |  3 +-
8ad293
 src/providers/ipa/ipa_subdomains_id.c         | 38 +++++++++++++------
8ad293
 src/providers/ipa/ipa_subdomains_server.c     | 11 +++---
8ad293
 src/providers/ipa/ipa_sudo.c                  | 14 +++----
8ad293
 src/providers/ipa/ipa_sudo_async.c            | 10 ++---
8ad293
 src/providers/ipa/ipa_sudo_conversion.c       |  6 +--
8ad293
 src/providers/ipa/ipa_views.c                 |  4 +-
8ad293
 src/providers/krb5/krb5_access.c              |  3 +-
8ad293
 src/providers/krb5/krb5_auth.c                |  4 +-
8ad293
 src/providers/krb5/krb5_child.c               | 25 ++++++------
8ad293
 src/providers/krb5/krb5_child_handler.c       |  4 +-
8ad293
 src/providers/krb5/krb5_common.c              |  6 +--
8ad293
 .../krb5/krb5_delayed_online_authentication.c |  4 +-
8ad293
 src/providers/krb5/krb5_renew_tgt.c           |  4 +-
8ad293
 src/providers/krb5/krb5_utils.c               |  2 +-
8ad293
 src/providers/ldap/ldap_auth.c                | 12 +++---
8ad293
 src/providers/ldap/ldap_child.c               |  2 +-
8ad293
 src/providers/ldap/ldap_init.c                |  4 +-
8ad293
 src/providers/ldap/ldap_options.c             |  8 ++--
8ad293
 src/providers/ldap/sdap.c                     | 28 +++++++++-----
8ad293
 src/providers/ldap/sdap_access.c              | 11 +++---
8ad293
 src/providers/ldap/sdap_async.c               |  9 +++--
8ad293
 src/providers/ldap/sdap_async_autofs.c        |  2 +-
8ad293
 src/providers/ldap/sdap_async_connection.c    |  6 +--
8ad293
 src/providers/ldap/sdap_async_groups.c        | 27 ++++++++-----
8ad293
 src/providers/ldap/sdap_async_initgroups.c    |  6 ++-
8ad293
 src/providers/ldap/sdap_async_initgroups_ad.c |  2 +-
8ad293
 src/providers/ldap/sdap_async_sudo.c          |  4 +-
8ad293
 src/providers/ldap/sdap_child_helpers.c       |  6 +--
8ad293
 src/providers/ldap/sdap_hostid.c              |  2 +-
8ad293
 src/providers/ldap/sdap_id_op.c               |  2 +-
8ad293
 src/providers/proxy/proxy_auth.c              |  6 +--
8ad293
 src/providers/proxy/proxy_child.c             |  8 ++--
8ad293
 src/providers/proxy/proxy_client.c            |  2 +-
8ad293
 src/providers/proxy/proxy_id.c                |  6 +--
8ad293
 src/resolv/async_resolv.c                     |  2 +-
8ad293
 src/responder/autofs/autofssrv.c              |  2 +-
8ad293
 src/responder/autofs/autofssrv_cmd.c          |  6 +--
8ad293
 src/responder/common/cache_req/cache_req.c    |  2 +-
8ad293
 .../plugins/cache_req_object_by_name.c        |  4 +-
8ad293
 src/responder/common/responder_common.c       |  4 +-
8ad293
 src/responder/common/responder_get_domains.c  |  2 +-
8ad293
 src/responder/common/responder_iface.c        |  4 +-
8ad293
 src/responder/ifp/ifp_iface/ifp_iface.c       |  2 +-
8ad293
 src/responder/ifp/ifpsrv.c                    |  8 ++--
8ad293
 src/responder/ifp/ifpsrv_util.c               |  2 +-
8ad293
 src/responder/nss/nss_cmd.c                   | 20 +++++-----
8ad293
 src/responder/nss/nss_iface.c                 |  4 +-
8ad293
 src/responder/nss/nss_protocol_netgr.c        |  2 +-
8ad293
 src/responder/nss/nsssrv.c                    |  2 +-
8ad293
 src/responder/pam/pamsrv_cmd.c                |  2 +-
8ad293
 src/responder/pam/pamsrv_p11.c                |  4 +-
8ad293
 src/sbus/router/sbus_router_handler.c         |  3 +-
8ad293
 src/sss_iface/sss_iface.c                     |  4 +-
8ad293
 src/util/child_common.c                       |  2 +-
8ad293
 src/util/debug.h                              |  4 +-
8ad293
 src/util/domain_info_utils.c                  |  2 +-
8ad293
 src/util/server.c                             | 15 +++++---
8ad293
 src/util/sss_sockets.c                        |  2 +-
8ad293
 src/util/string_utils.c                       |  2 +-
8ad293
 src/util/util_errors.c                        |  3 +-
8ad293
 106 files changed, 364 insertions(+), 279 deletions(-)
8ad293
8ad293
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
8ad293
index d0052d99b..d78991e36 100644
8ad293
--- a/src/db/sysdb.c
8ad293
+++ b/src/db/sysdb.c
8ad293
@@ -1489,7 +1489,7 @@ errno_t sysdb_attrs_primary_name(struct sysdb_ctx *sysdb,
8ad293
          * decide which name is correct.
8ad293
          */
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "Cannot save entry. Unable to determine groupname\n");
8ad293
+              "Can't match the name to the RDN\n");
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/db/sysdb_autofs.c b/src/db/sysdb_autofs.c
8ad293
index 413b00722..1febdaec5 100644
8ad293
--- a/src/db/sysdb_autofs.c
8ad293
+++ b/src/db/sysdb_autofs.c
8ad293
@@ -243,14 +243,14 @@ sysdb_get_map_byname(TALLOC_CTX *mem_ctx,
8ad293
               "Error looking up autofs map [%s]\n", safe_map_name);
8ad293
         goto done;
8ad293
     } else if (ret == ENOENT) {
8ad293
-        DEBUG(SSSDBG_TRACE_FUNC, "No such map\n");
8ad293
+        DEBUG(SSSDBG_TRACE_FUNC, "No such map [%s]\n", safe_map_name);
8ad293
         *_map = NULL;
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
     if (count != 1) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "More than one map named %s\n", safe_map_name);
8ad293
+              "More than one map named [%s]\n", safe_map_name);
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/db/sysdb_iphosts.c b/src/db/sysdb_iphosts.c
8ad293
index b82279787..d3ee8f1a9 100644
8ad293
--- a/src/db/sysdb_iphosts.c
8ad293
+++ b/src/db/sysdb_iphosts.c
8ad293
@@ -222,14 +222,14 @@ sysdb_store_host(struct sss_domain_info *domain,
8ad293
                  * sort it out.
8ad293
                  */
8ad293
                 for (j = 0; j < res->count; j++) {
8ad293
-                    DEBUG(SSSDBG_TRACE_FUNC,
8ad293
+                    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
                           "Corrupt cache entry [%s] detected. Deleting\n",
8ad293
                            ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                    res->msgs[j]->dn));
8ad293
 
8ad293
                     ret = sysdb_delete_entry(sysdb, res->msgs[j]->dn, true);
8ad293
                     if (ret != EOK) {
8ad293
-                        DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                        DEBUG(SSSDBG_OP_FAILURE,
8ad293
                               "Could not delete corrupt cache entry [%s]\n",
8ad293
                                ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                        res->msgs[j]->dn));
8ad293
@@ -262,7 +262,7 @@ sysdb_store_host(struct sss_domain_info *domain,
8ad293
 
8ad293
                     ret = sysdb_delete_entry(sysdb, res->msgs[0]->dn, true);
8ad293
                     if (ret != EOK) {
8ad293
-                        DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                        DEBUG(SSSDBG_OP_FAILURE,
8ad293
                               "Could not delete cache entry [%s]\n",
8ad293
                                ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                        res->msgs[0]->dn));
8ad293
@@ -298,7 +298,7 @@ sysdb_store_host(struct sss_domain_info *domain,
8ad293
 
8ad293
                 ret = sysdb_delete_entry(sysdb, res->msgs[i]->dn, true);
8ad293
                 if (ret != EOK) {
8ad293
-                    DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                    DEBUG(SSSDBG_OP_FAILURE,
8ad293
                           "Could not delete corrupt cache entry [%s]\n",
8ad293
                            ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                    res->msgs[i]->dn));
8ad293
@@ -318,7 +318,7 @@ sysdb_store_host(struct sss_domain_info *domain,
8ad293
                     /* Delete the entry from the previous pass */
8ad293
                     ret = sysdb_delete_entry(sysdb, update_dn, true);
8ad293
                     if (ret != EOK) {
8ad293
-                        DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                        DEBUG(SSSDBG_OP_FAILURE,
8ad293
                               "Could not delete cache entry [%s]\n",
8ad293
                                ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                        update_dn));
8ad293
diff --git a/src/db/sysdb_ipnetworks.c b/src/db/sysdb_ipnetworks.c
8ad293
index 326f984b7..9da4d9b23 100644
8ad293
--- a/src/db/sysdb_ipnetworks.c
8ad293
+++ b/src/db/sysdb_ipnetworks.c
8ad293
@@ -261,7 +261,7 @@ sysdb_store_ipnetwork(struct sss_domain_info *domain,
8ad293
 
8ad293
                 ret = sysdb_delete_entry(sysdb, res->msgs[0]->dn, true);
8ad293
                 if (ret != EOK) {
8ad293
-                    DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                    DEBUG(SSSDBG_OP_FAILURE,
8ad293
                             "Could not delete cache entry [%s]\n",
8ad293
                             ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                     res->msgs[0]->dn));
8ad293
@@ -296,7 +296,7 @@ sysdb_store_ipnetwork(struct sss_domain_info *domain,
8ad293
 
8ad293
                 ret = sysdb_delete_entry(sysdb, res->msgs[i]->dn, true);
8ad293
                 if (ret != EOK) {
8ad293
-                    DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                    DEBUG(SSSDBG_OP_FAILURE,
8ad293
                           "Could not delete corrupt cache entry [%s]\n",
8ad293
                            ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                    res->msgs[i]->dn));
8ad293
@@ -315,7 +315,7 @@ sysdb_store_ipnetwork(struct sss_domain_info *domain,
8ad293
                     /* Delete the entry from the previous pass */
8ad293
                     ret = sysdb_delete_entry(sysdb, update_dn, true);
8ad293
                     if (ret != EOK) {
8ad293
-                        DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                        DEBUG(SSSDBG_OP_FAILURE,
8ad293
                               "Could not delete cache entry [%s]\n",
8ad293
                                ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                        update_dn));
8ad293
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
8ad293
index 3412b9cd1..585708abe 100644
8ad293
--- a/src/db/sysdb_ops.c
8ad293
+++ b/src/db/sysdb_ops.c
8ad293
@@ -157,7 +157,7 @@ static int sysdb_delete_cache_entry(struct ldb_context *ldb,
8ad293
         /* fall through */
8ad293
         SSS_ATTRIBUTE_FALLTHROUGH;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "LDB Error: %s(%d)\nError Message: [%s]\n",
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "LDB Error: %s (%d); error message: [%s]\n",
8ad293
                   ldb_strerror(ret), ret, ldb_errstring(ldb));
8ad293
         return sysdb_error_to_errno(ret);
8ad293
     }
8ad293
@@ -3420,7 +3420,7 @@ int sysdb_search_custom(TALLOC_CTX *mem_ctx,
8ad293
         goto done;
8ad293
     }
8ad293
     if (!ldb_dn_validate(basedn)) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to create DN.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Syntactically invalid subtree DN.\n");
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -3463,7 +3463,7 @@ int sysdb_search_custom_by_name(TALLOC_CTX *mem_ctx,
8ad293
         goto done;
8ad293
     }
8ad293
     if (!ldb_dn_validate(basedn)) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to create DN.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Syntactically invalid DN.\n");
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -3545,7 +3545,7 @@ errno_t sysdb_search_by_orig_dn(TALLOC_CTX *mem_ctx,
8ad293
     default:
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
               "Trying to perform a search by orig_dn using a "
8ad293
-              "non-supported type\n");
8ad293
+              "non-supported type %d\n", type);
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -3690,8 +3690,9 @@ int sysdb_delete_custom(struct sss_domain_info *domain,
8ad293
         break;
8ad293
 
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "LDB Error: %s(%d)\nError Message: [%s]\n",
8ad293
-                  ldb_strerror(ret), ret, ldb_errstring(domain->sysdb->ldb));
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "ldb_delete failed: %s (%d); error Message: [%s]\n",
8ad293
+              ldb_strerror(ret), ret, ldb_errstring(domain->sysdb->ldb));
8ad293
         ret = sysdb_error_to_errno(ret);
8ad293
         break;
8ad293
     }
8ad293
@@ -4927,9 +4928,15 @@ static errno_t sysdb_update_members_ex(struct sss_domain_info *domain,
8ad293
             ret = sysdb_add_group_member(domain, add_groups[i],
8ad293
                                          member, type, is_dn);
8ad293
             if (ret != EOK) {
8ad293
-                DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                      "Could not add member [%s] to group [%s]. "
8ad293
-                          "Skipping.\n", member, add_groups[i]);
8ad293
+                if (ret != EEXIST) {
8ad293
+                    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                          "Could not add member [%s] to group [%s]. "
8ad293
+                              "Skipping.\n", member, add_groups[i]);
8ad293
+                } else {
8ad293
+                    DEBUG(SSSDBG_FUNC_DATA,
8ad293
+                          "Group [%s] already has member [%s]. Skipping.\n",
8ad293
+                          add_groups[i], member);
8ad293
+                }
8ad293
                 /* Continue on, we should try to finish the rest */
8ad293
             }
8ad293
         }
8ad293
@@ -4941,9 +4948,15 @@ static errno_t sysdb_update_members_ex(struct sss_domain_info *domain,
8ad293
             ret = sysdb_remove_group_member(domain, del_groups[i],
8ad293
                                             member, type, is_dn);
8ad293
             if (ret != EOK) {
8ad293
-                DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                      "Could not remove member [%s] from group [%s]. "
8ad293
-                          "Skipping\n", member, del_groups[i]);
8ad293
+                if (ret != ENOENT) {
8ad293
+                    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                          "Could not remove member [%s] from group [%s]. "
8ad293
+                              "Skipping\n", member, del_groups[i]);
8ad293
+                } else {
8ad293
+                    DEBUG(SSSDBG_FUNC_DATA,
8ad293
+                          "No member [%s] in group [%s]. "
8ad293
+                              "Skipping\n", member, del_groups[i]);
8ad293
+                }
8ad293
                 /* Continue on, we should try to finish the rest */
8ad293
             }
8ad293
         }
8ad293
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
8ad293
index 4ff65c1ae..0cd8321cb 100644
8ad293
--- a/src/db/sysdb_search.c
8ad293
+++ b/src/db/sysdb_search.c
8ad293
@@ -2393,7 +2393,7 @@ errno_t sysdb_get_direct_parents(TALLOC_CTX *mem_ctx,
8ad293
     } else if (mtype == SYSDB_MEMBER_GROUP) {
8ad293
         dn = sysdb_group_strdn(tmp_ctx, dom->name, name);
8ad293
     } else {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unknown member type\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Unknown member type %d\n", mtype);
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -2453,13 +2453,14 @@ errno_t sysdb_get_direct_parents(TALLOC_CTX *mem_ctx,
8ad293
         tmp_str = ldb_msg_find_attr_as_string(direct_sysdb_groups[i],
8ad293
                                                 SYSDB_NAME, NULL);
8ad293
         if (!tmp_str) {
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "A group with no name?\n");
8ad293
             /* This should never happen, but if it does, just continue */
8ad293
             continue;
8ad293
         }
8ad293
 
8ad293
         direct_parents[pi] = talloc_strdup(direct_parents, tmp_str);
8ad293
         if (!direct_parents[pi]) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "A group with no name?\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "talloc_strdup() failed\n");
8ad293
             ret = EIO;
8ad293
             goto done;
8ad293
         }
8ad293
@@ -2522,8 +2523,13 @@ errno_t sysdb_get_real_name(TALLOC_CTX *mem_ctx,
8ad293
         }
8ad293
         if (ret != EOK) {
8ad293
             /* User cannot be found in cache */
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "Cannot find user [%s] in cache\n",
8ad293
-                                     name_or_upn_or_sid);
8ad293
+            if (ret != ENOENT) {
8ad293
+                DEBUG(SSSDBG_OP_FAILURE, "Failed to find user [%s] in cache: %d\n",
8ad293
+                                         name_or_upn_or_sid, ret);
8ad293
+            } else {
8ad293
+                DEBUG(SSSDBG_TRACE_FUNC, "User [%s] is missing in cache\n",
8ad293
+                                         name_or_upn_or_sid);
8ad293
+            }
8ad293
             goto done;
8ad293
         }
8ad293
     } else if (res->count == 1) {
8ad293
@@ -2537,7 +2543,8 @@ errno_t sysdb_get_real_name(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     cname = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL);
8ad293
     if (!cname) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "A user with no name?\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "User '%s' without a name?\n", name_or_upn_or_sid);
8ad293
         ret = ENOENT;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/db/sysdb_selinux.c b/src/db/sysdb_selinux.c
8ad293
index 88ac88786..535411950 100644
8ad293
--- a/src/db/sysdb_selinux.c
8ad293
+++ b/src/db/sysdb_selinux.c
8ad293
@@ -234,7 +234,7 @@ errno_t sysdb_delete_usermaps(struct sss_domain_info *domain)
8ad293
     ret = sysdb_delete_recursive(sysdb, dn, true);
8ad293
     talloc_free(dn);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "sysdb_delete_recursive failed.\n");
8ad293
+        DEBUG(SSSDBG_OP_FAILURE, "sysdb_delete_recursive failed.\n");
8ad293
         return ret;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/db/sysdb_services.c b/src/db/sysdb_services.c
8ad293
index 8118fef00..ac17f4704 100644
8ad293
--- a/src/db/sysdb_services.c
8ad293
+++ b/src/db/sysdb_services.c
8ad293
@@ -252,7 +252,7 @@ sysdb_store_service(struct sss_domain_info *domain,
8ad293
 
8ad293
                 ret = sysdb_delete_entry(sysdb, res->msgs[0]->dn, true);
8ad293
                 if (ret != EOK) {
8ad293
-                    DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                    DEBUG(SSSDBG_OP_FAILURE,
8ad293
                           "Could not delete cache entry [%s]\n",
8ad293
                            ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                    res->msgs[0]->dn));
8ad293
@@ -290,7 +290,7 @@ sysdb_store_service(struct sss_domain_info *domain,
8ad293
 
8ad293
                 ret = sysdb_delete_entry(sysdb, res->msgs[i]->dn, true);
8ad293
                 if (ret != EOK) {
8ad293
-                    DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                    DEBUG(SSSDBG_OP_FAILURE,
8ad293
                           "Could not delete corrupt cache entry [%s]\n",
8ad293
                            ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                    res->msgs[i]->dn));
8ad293
@@ -310,7 +310,7 @@ sysdb_store_service(struct sss_domain_info *domain,
8ad293
                     /* Delete the entry from the previous pass */
8ad293
                     ret = sysdb_delete_entry(sysdb, update_dn, true);
8ad293
                     if (ret != EOK) {
8ad293
-                        DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                        DEBUG(SSSDBG_OP_FAILURE,
8ad293
                               "Could not delete cache entry [%s]\n",
8ad293
                                ldb_dn_canonical_string(tmp_ctx,
8ad293
                                                        update_dn));
8ad293
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
8ad293
index 03eec9c70..1626b612d 100644
8ad293
--- a/src/db/sysdb_sudo.c
8ad293
+++ b/src/db/sysdb_sudo.c
8ad293
@@ -480,7 +480,8 @@ sysdb_get_sudo_user_info(TALLOC_CTX *mem_ctx,
8ad293
                     sss_get_cased_name(sysdb_groupnames, groupname,
8ad293
                                        domain->case_sensitive);
8ad293
                 if (sysdb_groupnames[num_groups] == NULL) {
8ad293
-                    DEBUG(SSSDBG_MINOR_FAILURE, "Cannot strdup %s\n", groupname);
8ad293
+                    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                          "sss_get_cased_name() failed for '%s'\n", groupname);
8ad293
                     continue;
8ad293
                 }
8ad293
                 num_groups++;
8ad293
diff --git a/src/db/sysdb_upgrade.c b/src/db/sysdb_upgrade.c
8ad293
index 03a0e6173..99213260c 100644
8ad293
--- a/src/db/sysdb_upgrade.c
8ad293
+++ b/src/db/sysdb_upgrade.c
8ad293
@@ -2455,7 +2455,7 @@ int sysdb_upgrade_19(struct sysdb_ctx *sysdb, const char **ver)
8ad293
 
8ad293
     ret = add_object_category(sysdb->ldb, ctx);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "add_object_category failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "add_object_category failed: %d\n", ret);
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/db/sysdb_views.c b/src/db/sysdb_views.c
8ad293
index 00da74047..269dab70f 100644
8ad293
--- a/src/db/sysdb_views.c
8ad293
+++ b/src/db/sysdb_views.c
8ad293
@@ -556,12 +556,12 @@ errno_t sysdb_store_override(struct sss_domain_info *domain,
8ad293
         if (ret == ENOENT) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE, "Object to override does not exists.\n");
8ad293
         } else {
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "sysdb_search_entry failed.\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "sysdb_search_entry failed.\n");
8ad293
         }
8ad293
         goto done;
8ad293
     }
8ad293
     if (count != 1) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Base searched returned more than one object.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Base search returned more than one object.\n");
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -660,7 +660,7 @@ errno_t sysdb_store_override(struct sss_domain_info *domain,
8ad293
                                      SYSDB_OVERRIDE_GROUP_CLASS);
8ad293
             break;
8ad293
         default:
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected object type.\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected object type %d.\n", type);
8ad293
             ret = EINVAL;
8ad293
             goto done;
8ad293
         }
8ad293
diff --git a/src/lib/certmap/sss_certmap_krb5_match.c b/src/lib/certmap/sss_certmap_krb5_match.c
8ad293
index 640930747..ab566ac99 100644
8ad293
--- a/src/lib/certmap/sss_certmap_krb5_match.c
8ad293
+++ b/src/lib/certmap/sss_certmap_krb5_match.c
8ad293
@@ -220,7 +220,6 @@ static int parse_krb5_get_eku_value(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     for (c = 0; eku_list[c] != NULL; c++) {
8ad293
         for (k = 0; sss_ext_key_usage[k].name != NULL; k++) {
8ad293
-CM_DEBUG(ctx, "[%s][%s].", eku_list[c], sss_ext_key_usage[k].name);
8ad293
             if (strcasecmp(eku_list[c], sss_ext_key_usage[k].name) == 0) {
8ad293
                 comp->eku_oid_list[e] = talloc_strdup(comp->eku_oid_list,
8ad293
                                                       sss_ext_key_usage[k].oid);
8ad293
diff --git a/src/man/include/debug_levels.xml b/src/man/include/debug_levels.xml
8ad293
index b5e13ba3e..0d9cc17be 100644
8ad293
--- a/src/man/include/debug_levels.xml
8ad293
+++ b/src/man/include/debug_levels.xml
8ad293
@@ -100,6 +100,7 @@
8ad293
         introduced in 1.7.0.
8ad293
     </para>
8ad293
     <para>
8ad293
-        <emphasis>Default</emphasis>: 0
8ad293
+        <emphasis>Default</emphasis>: 0x0070 (i.e. fatal, critical and serious
8ad293
+        failures; corresponds to setting 2 in decimal notation)
8ad293
     </para>
8ad293
 </listitem>
8ad293
diff --git a/src/man/include/debug_levels_tools.xml b/src/man/include/debug_levels_tools.xml
8ad293
index b592d50fc..46a3c7d29 100644
8ad293
--- a/src/man/include/debug_levels_tools.xml
8ad293
+++ b/src/man/include/debug_levels_tools.xml
8ad293
@@ -81,6 +81,7 @@
8ad293
         introduced in 1.7.0.
8ad293
     </para>
8ad293
     <para>
8ad293
-        <emphasis>Default</emphasis>: 0
8ad293
+        <emphasis>Default</emphasis>: 0x0070 (i.e. fatal, critical and serious
8ad293
+        failures; corresponds to setting 2 in decimal notation)
8ad293
     </para>
8ad293
 </listitem>
8ad293
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
8ad293
index d9da05a51..9c2381c81 100644
8ad293
--- a/src/monitor/monitor.c
8ad293
+++ b/src/monitor/monitor.c
8ad293
@@ -1435,7 +1435,7 @@ static void monitor_quit(struct mt_ctx *mt_ctx, int ret)
8ad293
                         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
                               "Child [%s] terminated with a signal\n", svc->name);
8ad293
                     } else {
8ad293
-                        DEBUG(SSSDBG_FATAL_FAILURE,
8ad293
+                        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
                               "Child [%s] did not exit cleanly\n", svc->name);
8ad293
                         /* Forcibly kill this child */
8ad293
                         kill(-svc->pid, SIGKILL);
8ad293
@@ -2059,7 +2059,7 @@ static void monitor_sbus_connected(struct tevent_req *req)
8ad293
 
8ad293
     ret = sbus_connection_add_path_map(ctx->sbus_conn, paths);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
               ret, sss_strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
@@ -2271,7 +2271,7 @@ static void mt_svc_restart(struct tevent_context *ev,
8ad293
         add_new_provider(svc->mt_ctx, svc->name, svc->restarts + 1);
8ad293
     } else {
8ad293
         /* Invalid type? */
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE,
8ad293
               "BUG: Invalid child process type [%d]\n", svc->type);
8ad293
     }
8ad293
 
8ad293
@@ -2580,14 +2580,14 @@ int main(int argc, const char *argv[])
8ad293
         switch (ret) {
8ad293
         case EPERM:
8ad293
         case EACCES:
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+            DEBUG(SSSDBG_FATAL_FAILURE,
8ad293
                   CONF_FILE_PERM_ERROR_MSG, config_file);
8ad293
-            sss_log(SSS_LOG_ALERT, CONF_FILE_PERM_ERROR_MSG, config_file);
8ad293
+            sss_log(SSS_LOG_CRIT, CONF_FILE_PERM_ERROR_MSG, config_file);
8ad293
             break;
8ad293
         default:
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+            DEBUG(SSSDBG_FATAL_FAILURE,
8ad293
                  "SSSD couldn't load the configuration database.\n");
8ad293
-            sss_log(SSS_LOG_ALERT,
8ad293
+            sss_log(SSS_LOG_CRIT,
8ad293
                    "SSSD couldn't load the configuration database [%d]: %s.\n",
8ad293
                     ret, strerror(ret));
8ad293
             break;
8ad293
diff --git a/src/p11_child/p11_child_common.c b/src/p11_child/p11_child_common.c
8ad293
index f17de1a9e..704ced4b6 100644
8ad293
--- a/src/p11_child/p11_child_common.c
8ad293
+++ b/src/p11_child/p11_child_common.c
8ad293
@@ -125,7 +125,7 @@ static errno_t p11c_recv_data(TALLOC_CTX *mem_ctx, int fd, char **pin)
8ad293
 
8ad293
     str = talloc_strndup(mem_ctx, (char *) buf, len);
8ad293
     if (str == NULL) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "talloc_strndup failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_strndup failed.\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/p11_child/p11_child_common_utils.c b/src/p11_child/p11_child_common_utils.c
8ad293
index 50cfebb4c..c5f324625 100644
8ad293
--- a/src/p11_child/p11_child_common_utils.c
8ad293
+++ b/src/p11_child/p11_child_common_utils.c
8ad293
@@ -107,6 +107,9 @@ errno_t parse_cert_verify_opts(TALLOC_CTX *mem_ctx, const char *verify_opts,
8ad293
                   "Found 'no_verification' option, "
8ad293
                   "disabling verification completely. "
8ad293
                   "This should not be used in production.\n");
8ad293
+            sss_log(SSS_LOG_CRIT,
8ad293
+                    "Smart card certificate verification disabled completely. "
8ad293
+                    "This should not be used in production.");
8ad293
             cert_verify_opts->do_verification = false;
8ad293
         } else if (strncasecmp(opts[c], OCSP_DEFAUL_RESPONDER,
8ad293
                                OCSP_DEFAUL_RESPONDER_LEN) == 0) {
8ad293
diff --git a/src/p11_child/p11_child_openssl.c b/src/p11_child/p11_child_openssl.c
8ad293
index d81a1a9ea..879b05b65 100644
8ad293
--- a/src/p11_child/p11_child_openssl.c
8ad293
+++ b/src/p11_child/p11_child_openssl.c
8ad293
@@ -226,7 +226,7 @@ static char *get_issuer_subject_str(TALLOC_CTX *mem_ctx, X509 *cert)
8ad293
 
8ad293
     bio_mem = BIO_new(BIO_s_mem());
8ad293
     if (bio_mem == NULL) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "BIO_new failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "BIO_new failed.\n");
8ad293
         return NULL;
8ad293
     }
8ad293
 
8ad293
@@ -591,7 +591,7 @@ errno_t init_p11_ctx(TALLOC_CTX *mem_ctx, const char *ca_db,
8ad293
     ret = SSL_library_init();
8ad293
 #endif
8ad293
     if (ret != 1) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to initialize OpenSSL.\n");
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Failed to initialize OpenSSL.\n");
8ad293
         return EIO;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ad/ad_cldap_ping.c b/src/providers/ad/ad_cldap_ping.c
8ad293
index ab234f4d7..7722af98a 100644
8ad293
--- a/src/providers/ad/ad_cldap_ping.c
8ad293
+++ b/src/providers/ad/ad_cldap_ping.c
8ad293
@@ -467,7 +467,7 @@ ad_cldap_ping_domain_send(TALLOC_CTX *mem_ctx,
8ad293
     domains[0] = discovery_domain;
8ad293
     domains[1] = NULL;
8ad293
     if (domains[0] == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory!");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Bad argument (discovery_domain)");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/providers/ad/ad_common.c b/src/providers/ad/ad_common.c
8ad293
index 624313942..eaa920ca0 100644
8ad293
--- a/src/providers/ad/ad_common.c
8ad293
+++ b/src/providers/ad/ad_common.c
8ad293
@@ -1072,15 +1072,14 @@ ad_resolve_callback(void *private_data, struct fo_server *server)
8ad293
     }
8ad293
 
8ad293
     if (!service->gc->uri) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to append to URI\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "NULL GC URI\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
     DEBUG(SSSDBG_CONF_SETTINGS, "Constructed GC uri '%s'\n", service->gc->uri);
8ad293
 
8ad293
     if (service->gc->sockaddr == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                "resolv_get_sockaddr_address failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "NULL GC sockaddr\n");
8ad293
         ret = EIO;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -1100,7 +1099,7 @@ ad_resolve_callback(void *private_data, struct fo_server *server)
8ad293
 done:
8ad293
     if (ret != EOK) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "Error: [%s]\n", strerror(ret));
8ad293
+              "Error: %d [%s]\n", ret, strerror(ret));
8ad293
     }
8ad293
     talloc_free(tmp_ctx);
8ad293
     return;
8ad293
diff --git a/src/providers/ad/ad_dyndns.c b/src/providers/ad/ad_dyndns.c
8ad293
index 71ef16c0b..19fc8acef 100644
8ad293
--- a/src/providers/ad/ad_dyndns.c
8ad293
+++ b/src/providers/ad/ad_dyndns.c
8ad293
@@ -63,7 +63,7 @@ errno_t ad_dyndns_init(struct be_ctx *be_ctx,
8ad293
      */
8ad293
     ret = ad_get_dyndns_options(be_ctx, ad_opts);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Could not set AD options\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Could not get AD dyndns options\n");
8ad293
         return ret;
8ad293
     }
8ad293
 
8ad293
@@ -209,8 +209,8 @@ static void ad_dyndns_update_connect_done(struct tevent_req *subreq)
8ad293
 
8ad293
     ret = ldap_url_parse(ctx->service->sdap->uri, &lud;;
8ad293
     if (ret != LDAP_SUCCESS) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "Failed to parse ldap URI (%s)!\n", ctx->service->sdap->uri);
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to parse ldap URI '%s': %d\n",
8ad293
+              ctx->service->sdap->uri, ret);
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
8ad293
index 0eb5416ac..b15e0f345 100644
8ad293
--- a/src/providers/ad/ad_gpo.c
8ad293
+++ b/src/providers/ad/ad_gpo.c
8ad293
@@ -671,7 +671,9 @@ ad_gpo_ace_includes_client_sid(const char *user_sid,
8ad293
 
8ad293
     err = sss_idmap_sid_to_smb_sid(idmap_ctx, user_sid, &user_dom_sid);
8ad293
     if (err != IDMAP_SUCCESS) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to initialize idmap context.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "sss_idmap_sid_to_smb_sid() failed for user_sid '%s': %d\n",
8ad293
+              user_sid, err);
8ad293
         return EFAULT;
8ad293
     }
8ad293
 
8ad293
@@ -684,7 +686,9 @@ ad_gpo_ace_includes_client_sid(const char *user_sid,
8ad293
 
8ad293
     err = sss_idmap_sid_to_smb_sid(idmap_ctx, host_sid, &host_dom_sid);
8ad293
     if (err != IDMAP_SUCCESS) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to initialize idmap context.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "sss_idmap_sid_to_smb_sid() failed for host_sid '%s': %d\n",
8ad293
+              host_sid, err);
8ad293
         return EFAULT;
8ad293
     }
8ad293
 
8ad293
@@ -698,7 +702,9 @@ ad_gpo_ace_includes_client_sid(const char *user_sid,
8ad293
     for (i = 0; i < group_size; i++) {
8ad293
         err = sss_idmap_sid_to_smb_sid(idmap_ctx, group_sids[i], &group_dom_sid);
8ad293
         if (err != IDMAP_SUCCESS) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Failed to initialize idmap context.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "sss_idmap_sid_to_smb_sid() failed for group_sid '%s': %d\n",
8ad293
+              group_sids[i], err);
8ad293
             return EFAULT;
8ad293
         }
8ad293
         included = ad_gpo_dom_sid_equal(&ace_dom_sid, group_dom_sid);
8ad293
@@ -4777,14 +4783,14 @@ gpo_fork_child(struct tevent_req *req)
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", errno, strerror(errno));
8ad293
+              "pipe (from) failed [%d][%s].\n", errno, strerror(errno));
8ad293
         goto fail;
8ad293
     }
8ad293
     ret = pipe(pipefd_to_child);
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", errno, strerror(errno));
8ad293
+              "pipe (to) failed [%d][%s].\n", errno, strerror(errno));
8ad293
         goto fail;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ad/ad_machine_pw_renewal.c b/src/providers/ad/ad_machine_pw_renewal.c
8ad293
index ce9bbe6f3..6e7137a86 100644
8ad293
--- a/src/providers/ad/ad_machine_pw_renewal.c
8ad293
+++ b/src/providers/ad/ad_machine_pw_renewal.c
8ad293
@@ -171,14 +171,14 @@ ad_machine_account_password_renewal_send(TALLOC_CTX *mem_ctx,
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", ret, strerror(ret));
8ad293
+              "pipe (from) failed [%d][%s].\n", ret, strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
     ret = pipe(pipefd_to_child);
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", ret, strerror(ret));
8ad293
+              "pipe (to) failed [%d][%s].\n", ret, strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
@@ -354,7 +354,8 @@ errno_t ad_machine_account_password_renewal_init(struct be_ctx *be_ctx,
8ad293
     }
8ad293
 
8ad293
     if (opt_list_size != 2) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Wrong number of renewal options.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Wrong number of renewal options %d\n",
8ad293
+              opt_list_size);
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/providers/ad/ad_pac.c b/src/providers/ad/ad_pac.c
8ad293
index 80424b44e..aff47304e 100644
8ad293
--- a/src/providers/ad/ad_pac.c
8ad293
+++ b/src/providers/ad/ad_pac.c
8ad293
@@ -120,7 +120,11 @@ errno_t check_if_pac_is_available(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     ret = find_user_entry(mem_ctx, dom, ar, &msg;;
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "find_user_entry failed.\n");
8ad293
+        if (ret == ENOENT) {
8ad293
+            DEBUG(SSSDBG_FUNC_DATA, "find_user_entry didn't find user entry.\n");
8ad293
+        } else {
8ad293
+            DEBUG(SSSDBG_OP_FAILURE, "find_user_entry failed.\n");
8ad293
+        }
8ad293
         return ret;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
8ad293
index 4c457b7e5..f5b0be6c2 100644
8ad293
--- a/src/providers/ad/ad_subdomains.c
8ad293
+++ b/src/providers/ad/ad_subdomains.c
8ad293
@@ -299,7 +299,7 @@ ad_subdom_ad_ctx_new(struct be_ctx *be_ctx,
8ad293
 
8ad293
     subdom_conf_path = subdomain_create_conf_path(id_ctx, subdom);
8ad293
     if (subdom_conf_path == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "subdom_conf_path failed\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "subdomain_create_conf_path failed\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/be_dyndns.c b/src/providers/be_dyndns.c
8ad293
index 2de3b11bb..1a304db37 100644
8ad293
--- a/src/providers/be_dyndns.c
8ad293
+++ b/src/providers/be_dyndns.c
8ad293
@@ -1111,7 +1111,8 @@ be_nsupdate_args(TALLOC_CTX *mem_ctx,
8ad293
         argc++;
8ad293
         break;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unknown nsupdate auth type\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "Unknown nsupdate auth type %d\n", auth_type);
8ad293
         goto fail;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/be_ptask.c b/src/providers/be_ptask.c
8ad293
index fb80909a0..fab9e21b8 100644
8ad293
--- a/src/providers/be_ptask.c
8ad293
+++ b/src/providers/be_ptask.c
8ad293
@@ -251,7 +251,7 @@ static void be_ptask_schedule(struct be_ptask *task,
8ad293
     task->timer = tevent_add_timer(task->ev, task, tv, be_ptask_execute, task);
8ad293
     if (task->timer == NULL) {
8ad293
         /* nothing we can do about it */
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "FATAL: Unable to schedule task [%s]\n",
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to schedule task [%s]\n",
8ad293
                                     task->name);
8ad293
         be_ptask_disable(task);
8ad293
     }
8ad293
diff --git a/src/providers/be_refresh.c b/src/providers/be_refresh.c
8ad293
index 01cbf03e2..fdddf8bca 100644
8ad293
--- a/src/providers/be_refresh.c
8ad293
+++ b/src/providers/be_refresh.c
8ad293
@@ -125,7 +125,8 @@ static errno_t be_refresh_get_values(TALLOC_CTX *mem_ctx,
8ad293
         base_dn = sysdb_netgroup_base_dn(mem_ctx, domain);
8ad293
         break;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Uknown or unsupported refresh type\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "Uknown or unsupported refresh type %d\n", type);
8ad293
         return ERR_INTERNAL;
8ad293
         break;
8ad293
     }
8ad293
diff --git a/src/providers/data_provider/dp.c b/src/providers/data_provider/dp.c
8ad293
index 0858c43d2..90324d74d 100644
8ad293
--- a/src/providers/data_provider/dp.c
8ad293
+++ b/src/providers/data_provider/dp.c
8ad293
@@ -109,7 +109,7 @@ dp_init_interface(struct data_provider *provider)
8ad293
 
8ad293
     ret = sbus_connection_add_path_map(provider->sbus_conn, paths);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
               ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
@@ -196,7 +196,7 @@ dp_init_send(TALLOC_CTX *mem_ctx,
8ad293
         (sbus_server_on_connection_cb)dp_client_init,
8ad293
         (sbus_server_on_connection_data)state->provider);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create subrequest!\n");
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to create subrequest!\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/providers/data_provider/dp_target_sudo.c b/src/providers/data_provider/dp_target_sudo.c
8ad293
index db14039c4..59e2358cc 100644
8ad293
--- a/src/providers/data_provider/dp_target_sudo.c
8ad293
+++ b/src/providers/data_provider/dp_target_sudo.c
8ad293
@@ -42,13 +42,13 @@ static errno_t dp_sudo_parse_message(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     ret = sbus_iterator_read_u(read_iter, &dp_flags);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed, to parse the message!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to parse the message (flags)!\n");
8ad293
         return ret;
8ad293
     }
8ad293
 
8ad293
     ret = sbus_iterator_read_u(read_iter, &sudo_type);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed, to parse the message!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to parse the message (type)!\n");
8ad293
         return ret;
8ad293
     }
8ad293
 
8ad293
@@ -66,13 +66,15 @@ static errno_t dp_sudo_parse_message(TALLOC_CTX *mem_ctx,
8ad293
         /* read rules_num */
8ad293
         ret = sbus_iterator_read_u(read_iter, &num_rules);
8ad293
         if (ret != EOK) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Failed, to parse the message!\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                  "Failed to parse the message (num rules)!\n");
8ad293
             return ret;
8ad293
         }
8ad293
 
8ad293
         ret = sbus_iterator_read_as(mem_ctx, read_iter, &rules);
8ad293
         if (ret != EOK) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Failed, to parse the message!\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                  "Failed to parse the message (rules)!\n");
8ad293
             return ret;
8ad293
         }
8ad293
         break;
8ad293
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
8ad293
index 10421c6b4..f059a3f96 100644
8ad293
--- a/src/providers/data_provider_be.c
8ad293
+++ b/src/providers/data_provider_be.c
8ad293
@@ -407,7 +407,7 @@ static void check_if_online(struct be_ctx *be_ctx, int delay)
8ad293
                                   check_if_online_delayed, be_ctx);
8ad293
 
8ad293
     if (time_event == NULL) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE,
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
               "Scheduling check_if_online_delayed failed.\n");
8ad293
         goto failed;
8ad293
     }
8ad293
@@ -420,7 +420,6 @@ static void check_if_online(struct be_ctx *be_ctx, int delay)
8ad293
 
8ad293
 failed:
8ad293
     be_ctx->check_online_ref_count--;
8ad293
-    DEBUG(SSSDBG_CRIT_FAILURE, "Failed to run a check_online test.\n");
8ad293
 
8ad293
     if (be_ctx->check_online_ref_count == 0) {
8ad293
         reset_fo(be_ctx);
8ad293
@@ -629,7 +628,7 @@ static void dp_initialized(struct tevent_req *req)
8ad293
 
8ad293
     ret = be_register_monitor_iface(be_ctx->mon_conn, be_ctx);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to register monitor interface "
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to register monitor interface "
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
8ad293
index 8dc09f5b2..0dfbb04b0 100644
8ad293
--- a/src/providers/data_provider_fo.c
8ad293
+++ b/src/providers/data_provider_fo.c
8ad293
@@ -651,7 +651,7 @@ errno_t be_resolve_server_process(struct tevent_req *subreq,
8ad293
         srvaddr = fo_get_server_hostent(state->srv);
8ad293
         if (!srvaddr) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "FATAL: No hostent available for server (%s)\n",
8ad293
+                  "No hostent available for server (%s)\n",
8ad293
                   fo_get_server_str_name(state->srv));
8ad293
             return EFAULT;
8ad293
         }
8ad293
diff --git a/src/providers/data_provider_opts.c b/src/providers/data_provider_opts.c
8ad293
index 9db43fc40..bb543ae4f 100644
8ad293
--- a/src/providers/data_provider_opts.c
8ad293
+++ b/src/providers/data_provider_opts.c
8ad293
@@ -233,7 +233,7 @@ static int dp_copy_options_ex(TALLOC_CTX *memctx,
8ad293
             }
8ad293
             if (ret != EOK) {
8ad293
                 DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                      "Failed to retrieve value for option (%s)\n",
8ad293
+                      "Failed to copy value for option (%s)\n",
8ad293
                        opts[i].opt_name);
8ad293
                 goto done;
8ad293
             }
8ad293
@@ -249,7 +249,7 @@ static int dp_copy_options_ex(TALLOC_CTX *memctx,
8ad293
             }
8ad293
             if (ret != EOK) {
8ad293
                 DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                      "Failed to retrieve value for option (%s)\n",
8ad293
+                      "Failed to copy value for option (%s)\n",
8ad293
                       opts[i].opt_name);
8ad293
                 goto done;
8ad293
             }
8ad293
@@ -265,7 +265,7 @@ static int dp_copy_options_ex(TALLOC_CTX *memctx,
8ad293
             }
8ad293
             if (ret != EOK) {
8ad293
                 DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                      "Failed to retrieve value for option (%s)\n",
8ad293
+                      "Failed to copy value for option (%s)\n",
8ad293
                        opts[i].opt_name);
8ad293
                 goto done;
8ad293
             }
8ad293
diff --git a/src/providers/data_provider_req.h b/src/providers/data_provider_req.h
8ad293
index f2e05797f..75f7f9713 100644
8ad293
--- a/src/providers/data_provider_req.h
8ad293
+++ b/src/providers/data_provider_req.h
8ad293
@@ -39,6 +39,7 @@
8ad293
 #define BE_REQ_USER_AND_GROUP 0x0012
8ad293
 #define BE_REQ_BY_UUID        0x0013
8ad293
 #define BE_REQ_BY_CERT        0x0014
8ad293
+#define BE_REQ__LAST          BE_REQ_BY_CERT /* must be equal to max REQ number */
8ad293
 #define BE_REQ_TYPE_MASK      0x00FF
8ad293
 
8ad293
 /**
8ad293
diff --git a/src/providers/files/files_ops.c b/src/providers/files/files_ops.c
8ad293
index 59fc20692..54d2b4164 100644
8ad293
--- a/src/providers/files/files_ops.c
8ad293
+++ b/src/providers/files/files_ops.c
8ad293
@@ -395,7 +395,7 @@ static errno_t refresh_override_attrs(struct files_id_ctx *id_ctx,
8ad293
                              override_attrs, &count, &msgs);
8ad293
     if (ret != EOK) {
8ad293
         if (ret == ENOENT) {
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "No overrides, nothing to do.\n");
8ad293
+            DEBUG(SSSDBG_TRACE_FUNC, "No overrides, nothing to do.\n");
8ad293
             ret = EOK;
8ad293
         } else {
8ad293
             DEBUG(SSSDBG_OP_FAILURE, "sysdb_search_entry failed.\n");
8ad293
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
8ad293
index 375b6f885..4a6727c97 100644
8ad293
--- a/src/providers/ipa/ipa_access.c
8ad293
+++ b/src/providers/ipa/ipa_access.c
8ad293
@@ -671,7 +671,7 @@ static void ipa_pam_access_handler_done(struct tevent_req *subreq)
8ad293
     talloc_free(subreq);
8ad293
 
8ad293
     if (ret == ENOENT) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "No HBAC rules find, denying access\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "No HBAC rules found, denying access\n");
8ad293
         state->pd->pam_status = PAM_PERM_DENIED;
8ad293
         goto done;
8ad293
     } else if (ret != EOK) {
8ad293
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
8ad293
index 1211ba4c9..8cadb9249 100644
8ad293
--- a/src/providers/ipa/ipa_common.c
8ad293
+++ b/src/providers/ipa/ipa_common.c
8ad293
@@ -781,8 +781,7 @@ int ipa_get_auth_options(struct ipa_options *ipa_opts,
8ad293
                                     dp_opt_get_string(ipa_opts->auth,
8ad293
                                                       KRB5_REALM));
8ad293
         if (value == NULL) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Cannot set %s!\n",
8ad293
-                     ipa_opts->auth[KRB5_FAST_PRINCIPAL].opt_name);
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "talloc_asprintf() failed\n");
8ad293
             ret = ENOMEM;
8ad293
             goto done;
8ad293
         }
8ad293
@@ -851,7 +850,7 @@ static void ipa_resolve_callback(void *private_data, struct fo_server *server)
8ad293
     srvaddr = fo_get_server_hostent(server);
8ad293
     if (!srvaddr) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "FATAL: No hostent available for server (%s)\n",
8ad293
+              "No hostent available for server (%s)\n",
8ad293
                   fo_get_server_str_name(server));
8ad293
         talloc_free(tmp_ctx);
8ad293
         return;
8ad293
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
8ad293
index 31e53d24d..1fee41a36 100644
8ad293
--- a/src/providers/ipa/ipa_hbac_common.c
8ad293
+++ b/src/providers/ipa/ipa_hbac_common.c
8ad293
@@ -423,7 +423,7 @@ hbac_eval_user_element(TALLOC_CTX *mem_ctx,
8ad293
     ret = sysdb_initgroups(tmp_ctx, domain, username, &res;;
8ad293
     if (ret != EOK) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "sysdb_asq_search failed [%d]: %s\n", ret, sss_strerror(ret));
8ad293
+              "sysdb_initgroups() failed [%d]: %s\n", ret, sss_strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ipa/ipa_hbac_services.c b/src/providers/ipa/ipa_hbac_services.c
8ad293
index 79088ff66..387e915cd 100644
8ad293
--- a/src/providers/ipa/ipa_hbac_services.c
8ad293
+++ b/src/providers/ipa/ipa_hbac_services.c
8ad293
@@ -487,7 +487,7 @@ hbac_service_attrs_to_rule(TALLOC_CTX *mem_ctx,
8ad293
             /* Original DN matched a single service. Get the service name */
8ad293
             name = ldb_msg_find_attr_as_string(msgs[0], IPA_CN, NULL);
8ad293
             if (name == NULL) {
8ad293
-                DEBUG(SSSDBG_CRIT_FAILURE, "Attribute is missing!\n");
8ad293
+                DEBUG(SSSDBG_CRIT_FAILURE, "Attribute IPA_CN is missing!\n");
8ad293
                 ret = EFAULT;
8ad293
                 goto done;
8ad293
             }
8ad293
@@ -523,7 +523,7 @@ hbac_service_attrs_to_rule(TALLOC_CTX *mem_ctx,
8ad293
                 /* Original DN matched a single group. Get the groupname */
8ad293
                 name = ldb_msg_find_attr_as_string(msgs[0], IPA_CN, NULL);
8ad293
                 if (name == NULL) {
8ad293
-                    DEBUG(SSSDBG_CRIT_FAILURE, "Attribute is missing!\n");
8ad293
+                    DEBUG(SSSDBG_CRIT_FAILURE, "Attribute IPA_CN is missing!\n");
8ad293
                     ret = EFAULT;
8ad293
                     goto done;
8ad293
                 }
8ad293
diff --git a/src/providers/ipa/ipa_hbac_users.c b/src/providers/ipa/ipa_hbac_users.c
8ad293
index 2801a3162..25850eac0 100644
8ad293
--- a/src/providers/ipa/ipa_hbac_users.c
8ad293
+++ b/src/providers/ipa/ipa_hbac_users.c
8ad293
@@ -124,7 +124,7 @@ get_ipa_groupname(TALLOC_CTX *mem_ctx,
8ad293
     if (strcasecmp("cn", account_comp_name) != 0) {
8ad293
         /* The third component name is not "cn" */
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "Expected cn in second component, got %s\n", account_comp_name);
8ad293
+              "Expected cn in third component, got %s\n", account_comp_name);
8ad293
         ret = ERR_UNEXPECTED_ENTRY_TYPE;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -135,7 +135,7 @@ get_ipa_groupname(TALLOC_CTX *mem_ctx,
8ad293
                     account_comp_val->length) != 0) {
8ad293
         /* The third component value is not "accounts" */
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "Expected cn accounts second component, got %s\n",
8ad293
+              "Expected accounts third component, got %s\n",
8ad293
               (const char *) account_comp_val->data);
8ad293
         ret = ERR_UNEXPECTED_ENTRY_TYPE;
8ad293
         goto done;
8ad293
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
8ad293
index 9253514a3..2cbe0c9c7 100644
8ad293
--- a/src/providers/ipa/ipa_id.c
8ad293
+++ b/src/providers/ipa/ipa_id.c
8ad293
@@ -266,7 +266,7 @@ ipa_initgr_get_overrides_send(TALLOC_CTX *memctx,
8ad293
     }
8ad293
     state->groups_id_attr = talloc_strdup(state, groups_id_attr);
8ad293
     if (state->groups_id_attr == NULL) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_strdup failed.\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c
8ad293
index a4d58e3bd..afdd6fdd0 100644
8ad293
--- a/src/providers/ipa/ipa_init.c
8ad293
+++ b/src/providers/ipa/ipa_init.c
8ad293
@@ -317,10 +317,10 @@ static errno_t ipa_init_client_mode(struct be_ctx *be_ctx,
8ad293
     ret = sysdb_get_view_name(ipa_id_ctx, be_ctx->domain->sysdb,
8ad293
                               &ipa_id_ctx->view_name);
8ad293
     if (ret == ENOENT) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Cannot find view name in the cache. "
8ad293
+        DEBUG(SSSDBG_MINOR_FAILURE, "Cannot find view name in the cache. "
8ad293
               "Will do online lookup later.\n");
8ad293
     } else if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "sysdb_get_view_name() failed [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "sysdb_get_view_name() failed [%d]: %s\n",
8ad293
               ret, sss_strerror(ret));
8ad293
         return ret;
8ad293
     }
8ad293
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
8ad293
index c3e1acb48..fb93c6233 100644
8ad293
--- a/src/providers/ipa/ipa_s2n_exop.c
8ad293
+++ b/src/providers/ipa/ipa_s2n_exop.c
8ad293
@@ -2224,7 +2224,8 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
8ad293
 
8ad293
         break;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected request type.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "Unexpected request type %d.\n", state->request_type);
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
8ad293
index 5cb02de86..760349134 100644
8ad293
--- a/src/providers/ipa/ipa_selinux.c
8ad293
+++ b/src/providers/ipa/ipa_selinux.c
8ad293
@@ -681,7 +681,7 @@ static errno_t selinux_fork_child(struct selinux_child_state *state)
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", errno, sss_strerror(errno));
8ad293
+              "pipe (from) failed [%d][%s].\n", errno, sss_strerror(errno));
8ad293
         return ret;
8ad293
     }
8ad293
 
8ad293
@@ -689,7 +689,7 @@ static errno_t selinux_fork_child(struct selinux_child_state *state)
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", errno, sss_strerror(errno));
8ad293
+              "pipe (to) failed [%d][%s].\n", errno, sss_strerror(errno));
8ad293
         return ret;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ipa/ipa_session.c b/src/providers/ipa/ipa_session.c
8ad293
index 6672cb349..935393ccd 100644
8ad293
--- a/src/providers/ipa/ipa_session.c
8ad293
+++ b/src/providers/ipa/ipa_session.c
8ad293
@@ -570,7 +570,7 @@ ipa_pam_session_handler_done(struct tevent_req *subreq)
8ad293
     talloc_free(subreq);
8ad293
 
8ad293
     if (ret == ENOENT) {
8ad293
-        DEBUG(SSSDBG_IMPORTANT_INFO, "No Desktop Profile rules found\n");
8ad293
+        DEBUG(SSSDBG_FUNC_DATA, "No Desktop Profile rules found\n");
8ad293
         if (!state->session_ctx->no_rules_found) {
8ad293
             state->session_ctx->no_rules_found = true;
8ad293
             state->session_ctx->last_request = time(NULL);
8ad293
@@ -668,7 +668,7 @@ ipa_pam_session_handler_get_deskprofile_user_info(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     if (res->count != 1) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "sysdb_getpwnam() got more users than expected. "
8ad293
+              "sysdb_getpwnam() returned unexpected amount of users. "
8ad293
               "Expected [%d], got [%d]\n", 1, res->count);
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
diff --git a/src/providers/ipa/ipa_subdomains_ext_groups.c b/src/providers/ipa/ipa_subdomains_ext_groups.c
8ad293
index c730c3317..790ae9d16 100644
8ad293
--- a/src/providers/ipa/ipa_subdomains_ext_groups.c
8ad293
+++ b/src/providers/ipa/ipa_subdomains_ext_groups.c
8ad293
@@ -840,7 +840,8 @@ static void ipa_add_ad_memberships_get_next(struct tevent_req *req)
8ad293
         }
8ad293
 
8ad293
         if (missing_groups) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "There are unresolved external group "
8ad293
+            /* this might be HBAC or sudo rule */
8ad293
+            DEBUG(SSSDBG_FUNC_DATA, "There are unresolved external group "
8ad293
                                        "memberships even after all groups "
8ad293
                                        "have been looked up on the LDAP "
8ad293
                                        "server.\n");
8ad293
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
8ad293
index 36f32fae8..46d496258 100644
8ad293
--- a/src/providers/ipa/ipa_subdomains_id.c
8ad293
+++ b/src/providers/ipa/ipa_subdomains_id.c
8ad293
@@ -506,7 +506,13 @@ struct tevent_req *ipa_get_subdom_acct_send(TALLOC_CTX *memctx,
8ad293
             break;
8ad293
         default:
8ad293
             ret = EINVAL;
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "Invalid sub-domain request type.\n");
8ad293
+            if (state->entry_type > BE_REQ__LAST) {
8ad293
+                DEBUG(SSSDBG_OP_FAILURE, "Invalid sub-domain request type %d.\n",
8ad293
+                      state->entry_type);
8ad293
+            } else {
8ad293
+                DEBUG(SSSDBG_TRACE_FUNC, "Unhandled sub-domain request type %d.\n",
8ad293
+                      state->entry_type);
8ad293
+            }
8ad293
     }
8ad293
     if (ret != EOK) goto fail;
8ad293
 
8ad293
@@ -1027,6 +1033,9 @@ apply_subdomain_homedir(TALLOC_CTX *mem_ctx, struct sss_domain_info *dom,
8ad293
     const char *homedir = NULL;
8ad293
     struct ldb_message_element *msg_el = NULL;
8ad293
     size_t c;
8ad293
+    const char *category = NULL;
8ad293
+    size_t length = 0;
8ad293
+    bool user_class = true;
8ad293
 
8ad293
     msg_el = ldb_msg_find_element(msg, SYSDB_OBJECTCATEGORY);
8ad293
     if (msg_el == NULL) {
8ad293
@@ -1039,12 +1048,15 @@ apply_subdomain_homedir(TALLOC_CTX *mem_ctx, struct sss_domain_info *dom,
8ad293
      * case of a MPG group lookup if SYSDB_OBJECTCATEGORY is SYSDB_GROUP_CLASS.
8ad293
      */
8ad293
     for (c = 0; c < msg_el->num_values; c++) {
8ad293
-        if (strncmp(SYSDB_USER_CLASS, (const char *)msg_el->values[c].data,
8ad293
-                    msg_el->values[c].length) == 0
8ad293
-                || (sss_domain_is_mpg(dom)
8ad293
-                    && strncmp(SYSDB_GROUP_CLASS,
8ad293
-                               (const char *)msg_el->values[c].data,
8ad293
-                               msg_el->values[c].length) == 0)) {
8ad293
+        category = (const char *)msg_el->values[c].data;
8ad293
+        length = msg_el->values[c].length;
8ad293
+        if (strncmp(SYSDB_USER_CLASS, category, length) == 0) {
8ad293
+            user_class = true;
8ad293
+            break;
8ad293
+        }
8ad293
+        if (sss_domain_is_mpg(dom)
8ad293
+               && strncmp(SYSDB_GROUP_CLASS, category, length) == 0) {
8ad293
+            user_class = false;
8ad293
             break;
8ad293
         }
8ad293
     }
8ad293
@@ -1064,8 +1076,12 @@ apply_subdomain_homedir(TALLOC_CTX *mem_ctx, struct sss_domain_info *dom,
8ad293
 
8ad293
     uid = ldb_msg_find_attr_as_uint64(msg, SYSDB_UIDNUM, 0);
8ad293
     if (uid == 0) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "UID for user [%s] is not known.\n",
8ad293
-                                  fqname);
8ad293
+        if (user_class) {
8ad293
+            DEBUG(SSSDBG_OP_FAILURE, "UID for user [%s] is unknown\n", fqname);
8ad293
+        } else {
8ad293
+            DEBUG(SSSDBG_TRACE_INTERNAL,
8ad293
+                  "No UID for object [%s], perhaps mpg\n", fqname);
8ad293
+        }
8ad293
         ret = ENOENT;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -1309,7 +1325,7 @@ ipa_get_ad_acct_ad_part_done(struct tevent_req *subreq)
8ad293
 
8ad293
         state->object_sid = talloc_strdup(state, sid);
8ad293
         if (state->object_sid == NULL) {
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "talloc_strdup failed.\n");
8ad293
             ret = ENOMEM;
8ad293
             goto fail;
8ad293
         }
8ad293
@@ -1521,7 +1537,7 @@ static errno_t ipa_get_ad_apply_override_step(struct tevent_req *req)
8ad293
 
8ad293
         state->ar->filter_value = talloc_strdup(state->ar, obj_name);
8ad293
         if (state->ar->filter_value == NULL) {
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "talloc_strdup failed.\n");
8ad293
             return ENOMEM;
8ad293
         }
8ad293
         state->ar->filter_type = BE_FILTER_NAME;
8ad293
diff --git a/src/providers/ipa/ipa_subdomains_server.c b/src/providers/ipa/ipa_subdomains_server.c
8ad293
index fcdd05322..deb2c2cee 100644
8ad293
--- a/src/providers/ipa/ipa_subdomains_server.c
8ad293
+++ b/src/providers/ipa/ipa_subdomains_server.c
8ad293
@@ -513,7 +513,7 @@ static void ipa_getkeytab_exec(const char *ccache,
8ad293
 
8ad293
     gkt_env[0] = talloc_asprintf(NULL, "KRB5CCNAME=%s", ccache);
8ad293
     if (gkt_env[0] == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to format KRB5CCNAME\n");
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Failed to format KRB5CCNAME\n");
8ad293
         exit(1);
8ad293
     }
8ad293
 
8ad293
@@ -522,7 +522,7 @@ static void ipa_getkeytab_exec(const char *ccache,
8ad293
     ret = unlink(keytab_path);
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE,
8ad293
               "Failed to unlink the temporary ccname [%d][%s]\n",
8ad293
               ret, sss_strerror(ret));
8ad293
         exit(1);
8ad293
@@ -533,12 +533,12 @@ static void ipa_getkeytab_exec(const char *ccache,
8ad293
                  "-r", "-s", server, "-p", principal, "-k", keytab_path, NULL,
8ad293
                  gkt_env);
8ad293
 
8ad293
-    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+    DEBUG(SSSDBG_FATAL_FAILURE,
8ad293
           "execle returned %d, this shouldn't happen!\n", ret);
8ad293
 
8ad293
     /* The child should never end up here */
8ad293
     ret = errno;
8ad293
-    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+    DEBUG(SSSDBG_FATAL_FAILURE,
8ad293
           "execle failed [%d][%s].\n", ret, sss_strerror(ret));
8ad293
     exit(1);
8ad293
 }
8ad293
@@ -748,7 +748,8 @@ static errno_t ipa_server_trusted_dom_setup_1way(struct tevent_req *req)
8ad293
 
8ad293
     state->new_keytab = talloc_asprintf(state, "%sXXXXXX", state->keytab);
8ad293
     if (state->new_keytab == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Cannot set up ipa_get_keytab\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "Cannot set up ipa_get_keytab. talloc_asprintf() failed\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ipa/ipa_sudo.c b/src/providers/ipa/ipa_sudo.c
8ad293
index 931770922..1b881d085 100644
8ad293
--- a/src/providers/ipa/ipa_sudo.c
8ad293
+++ b/src/providers/ipa/ipa_sudo.c
8ad293
@@ -223,7 +223,7 @@ ipa_sudo_init_ipa_schema(TALLOC_CTX *mem_ctx,
8ad293
                        ipa_sudorule_map, IPA_OPTS_SUDORULE,
8ad293
                        &sudo_ctx->sudorule_map);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to parse attribute map "
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to parse attribute map (rule) "
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
@@ -232,7 +232,7 @@ ipa_sudo_init_ipa_schema(TALLOC_CTX *mem_ctx,
8ad293
                        ipa_sudocmdgroup_map, IPA_OPTS_SUDOCMDGROUP,
8ad293
                        &sudo_ctx->sudocmdgroup_map);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to parse attribute map "
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to parse attribute map (cmdgroup) "
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
@@ -241,7 +241,7 @@ ipa_sudo_init_ipa_schema(TALLOC_CTX *mem_ctx,
8ad293
                        ipa_sudocmd_map, IPA_OPTS_SUDOCMD,
8ad293
                        &sudo_ctx->sudocmd_map);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to parse attribute map "
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to parse attribute map (cmd) "
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
@@ -250,16 +250,16 @@ ipa_sudo_init_ipa_schema(TALLOC_CTX *mem_ctx,
8ad293
                          CONFDB_SUDO_THRESHOLD, CONFDB_DEFAULT_SUDO_THRESHOLD,
8ad293
                          &sudo_ctx->sudocmd_threshold);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "Could not parse sudo search base\n");
8ad293
-        return ret;
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Could not get sudo threshold\n");
8ad293
+        goto done;
8ad293
     }
8ad293
 
8ad293
     ret = sdap_parse_search_base(sudo_ctx, sudo_ctx->sdap_opts->basic,
8ad293
                                  SDAP_SUDO_SEARCH_BASE,
8ad293
                                  &sudo_ctx->sudo_sb);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "Could not parse sudo search base\n");
8ad293
-        return ret;
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Could not parse sudo search base\n");
8ad293
+        goto done;
8ad293
     }
8ad293
 
8ad293
     ret = ipa_sudo_ptask_setup(be_ctx, sudo_ctx);
8ad293
diff --git a/src/providers/ipa/ipa_sudo_async.c b/src/providers/ipa/ipa_sudo_async.c
8ad293
index 1d7a69814..c531ecbf9 100644
8ad293
--- a/src/providers/ipa/ipa_sudo_async.c
8ad293
+++ b/src/providers/ipa/ipa_sudo_async.c
8ad293
@@ -520,7 +520,7 @@ ipa_sudo_fetch_addtl_cmdgroups_done(struct tevent_req *subreq)
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
-    DEBUG(SSSDBG_IMPORTANT_INFO, "Received %zu additional command groups\n",
8ad293
+    DEBUG(SSSDBG_FUNC_DATA, "Received %zu additional command groups\n",
8ad293
           num_attrs);
8ad293
 
8ad293
     ret = ipa_sudo_filter_rules_bycmdgroups(state, state->domain, attrs,
8ad293
@@ -609,7 +609,7 @@ ipa_sudo_fetch_rules_done(struct tevent_req *subreq)
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
-    DEBUG(SSSDBG_IMPORTANT_INFO, "Received %zu sudo rules\n", num_attrs);
8ad293
+    DEBUG(SSSDBG_FUNC_DATA, "Received %zu sudo rules\n", num_attrs);
8ad293
 
8ad293
     ret = ipa_sudo_conv_rules(state->conv, attrs, num_attrs);
8ad293
     if (ret != EOK) {
8ad293
@@ -689,7 +689,7 @@ ipa_sudo_fetch_cmdgroups_done(struct tevent_req *subreq)
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
-    DEBUG(SSSDBG_IMPORTANT_INFO, "Received %zu sudo command groups\n",
8ad293
+    DEBUG(SSSDBG_FUNC_DATA, "Received %zu sudo command groups\n",
8ad293
           num_attrs);
8ad293
 
8ad293
     ret = ipa_sudo_conv_cmdgroups(state->conv, attrs, num_attrs);
8ad293
@@ -769,7 +769,7 @@ ipa_sudo_fetch_cmds_done(struct tevent_req *subreq)
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
-    DEBUG(SSSDBG_IMPORTANT_INFO, "Received %zu sudo commands\n", num_attrs);
8ad293
+    DEBUG(SSSDBG_FUNC_DATA, "Received %zu sudo commands\n", num_attrs);
8ad293
 
8ad293
     ret = ipa_sudo_conv_cmds(state->conv, attrs, num_attrs);
8ad293
     if (ret != EOK) {
8ad293
@@ -1109,7 +1109,7 @@ done:
8ad293
     if (in_transaction) {
8ad293
         sret = sysdb_transaction_cancel(state->sysdb);
8ad293
         if (sret != EOK) {
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "Could not cancel transaction\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "Could not cancel transaction\n");
8ad293
         }
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ipa/ipa_sudo_conversion.c b/src/providers/ipa/ipa_sudo_conversion.c
8ad293
index b5fc49379..bd1ec72b3 100644
8ad293
--- a/src/providers/ipa/ipa_sudo_conversion.c
8ad293
+++ b/src/providers/ipa/ipa_sudo_conversion.c
8ad293
@@ -801,7 +801,7 @@ convert_host(TALLOC_CTX *mem_ctx,
8ad293
         *skip_entry = true;
8ad293
         return NULL;
8ad293
     } else if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "ipa_get_rdn() failed on value %s [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "ipa_get_rdn() failed on value %s [%d]: %s\n",
8ad293
               value, ret, sss_strerror(ret));
8ad293
         return NULL;
8ad293
     }
8ad293
@@ -841,7 +841,7 @@ convert_user(TALLOC_CTX *mem_ctx,
8ad293
         *skip_entry = true;
8ad293
         return NULL;
8ad293
     } else if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "ipa_get_rdn() failed on value %s [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "ipa_get_rdn() failed on value %s [%d]: %s\n",
8ad293
               value, ret, sss_strerror(ret));
8ad293
         return NULL;
8ad293
     }
8ad293
@@ -904,7 +904,7 @@ convert_group(TALLOC_CTX *mem_ctx,
8ad293
         *skip_entry = true;
8ad293
         return NULL;
8ad293
     } else if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "ipa_get_rdn() failed on value %s [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "ipa_get_rdn() failed on value %s [%d]: %s\n",
8ad293
               value, ret, sss_strerror(ret));
8ad293
         return NULL;
8ad293
     }
8ad293
diff --git a/src/providers/ipa/ipa_views.c b/src/providers/ipa/ipa_views.c
8ad293
index 2a918bdc8..e1090d03b 100644
8ad293
--- a/src/providers/ipa/ipa_views.c
8ad293
+++ b/src/providers/ipa/ipa_views.c
8ad293
@@ -232,7 +232,7 @@ static errno_t get_dp_id_data_for_xyz(TALLOC_CTX *mem_ctx, const char *val,
8ad293
     ar->filter_value = talloc_strdup(ar, val);
8ad293
     ar->domain = talloc_strdup(ar, domain_name);
8ad293
     if (ar->filter_value == NULL || ar->domain == NULL) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_strdup failed.\n");
8ad293
         talloc_free(ar);
8ad293
         return ENOMEM;
8ad293
     }
8ad293
@@ -471,7 +471,7 @@ static void ipa_get_ad_override_done(struct tevent_req *subreq)
8ad293
 
8ad293
     ret = ipa_get_ad_override_qualify_name(state);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "Cannot qualify object name\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Cannot qualify object name\n");
8ad293
         goto fail;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/krb5/krb5_access.c b/src/providers/krb5/krb5_access.c
8ad293
index be9068c0f..2ae5abe14 100644
8ad293
--- a/src/providers/krb5/krb5_access.c
8ad293
+++ b/src/providers/krb5/krb5_access.c
8ad293
@@ -78,7 +78,8 @@ struct tevent_req *krb5_access_send(TALLOC_CTX *mem_ctx,
8ad293
     }
8ad293
 
8ad293
     if (pd->cmd != SSS_PAM_ACCT_MGMT) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected pam task.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "Unexpected pam task %d.\n", pd->cmd);
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
8ad293
index a1c0b3640..699c2467b 100644
8ad293
--- a/src/providers/krb5/krb5_auth.c
8ad293
+++ b/src/providers/krb5/krb5_auth.c
8ad293
@@ -499,7 +499,7 @@ struct tevent_req *krb5_auth_send(TALLOC_CTX *mem_ctx,
8ad293
                 /* handle empty password gracefully */
8ad293
                 if (authtok_type == SSS_AUTHTOK_TYPE_EMPTY) {
8ad293
                     DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                          "Illegal zero-length authtok for user [%s]\n",
8ad293
+                          "Illegal empty authtok for user [%s]\n",
8ad293
                            pd->user);
8ad293
                     state->pam_status = PAM_AUTH_ERR;
8ad293
                     state->dp_err = DP_ERR_OK;
8ad293
@@ -854,7 +854,7 @@ static void krb5_auth_done(struct tevent_req *subreq)
8ad293
             ret = EOK;
8ad293
             goto done;
8ad293
         default:
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected PAM task\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected PAM task %d\n", pd->cmd);
8ad293
             ret = EINVAL;
8ad293
             goto done;
8ad293
         }
8ad293
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
8ad293
index cab7b27a2..06fdf7156 100644
8ad293
--- a/src/providers/krb5/krb5_child.c
8ad293
+++ b/src/providers/krb5/krb5_child.c
8ad293
@@ -258,7 +258,7 @@ static void sss_krb5_expire_callback_func(krb5_context context, void *data,
8ad293
 
8ad293
     blob = talloc_array(kr->pd, uint32_t, 2);
8ad293
     if (blob == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_size failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_array failed.\n");
8ad293
         return;
8ad293
     }
8ad293
 
8ad293
@@ -525,7 +525,8 @@ static krb5_error_code tokeninfo_matches(TALLOC_CTX *mem_ctx,
8ad293
                                      out_token, out_pin);
8ad293
         break;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unsupported authtok type.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "Unsupported authtok type %d\n", sss_authtok_get_type(auth_tok));
8ad293
     }
8ad293
 
8ad293
     return EINVAL;
8ad293
@@ -1087,7 +1088,7 @@ static errno_t pack_response_packet(TALLOC_CTX *mem_ctx, errno_t error,
8ad293
 
8ad293
     buf = talloc_array(mem_ctx, uint8_t, size);
8ad293
     if (!buf) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Insufficient memory to create message.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_array failed\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
@@ -1958,13 +1959,12 @@ static errno_t changepw_child(struct krb5_req *kr, bool prelim)
8ad293
                                           &msg_len, &msg;;
8ad293
         if (ret != EOK) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "pack_user_info_chpass_error failed.\n");
8ad293
+                  "pack_user_info_chpass_error failed [%d]\n", ret);
8ad293
         } else {
8ad293
             ret = pam_add_response(kr->pd, SSS_PAM_USER_INFO, msg_len,
8ad293
                                    msg);
8ad293
             if (ret != EOK) {
8ad293
-                DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                      "pam_add_response failed.\n");
8ad293
+                DEBUG(SSSDBG_CRIT_FAILURE, "pam_add_response failed.\n");
8ad293
             }
8ad293
         }
8ad293
         return kerr;
8ad293
@@ -2036,13 +2036,12 @@ static errno_t changepw_child(struct krb5_req *kr, bool prelim)
8ad293
                                               &user_resp_len, &user_resp);
8ad293
             if (ret != EOK) {
8ad293
                 DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                      "pack_user_info_chpass_error failed.\n");
8ad293
+                      "pack_user_info_chpass_error failed [%d]\n", ret);
8ad293
             } else {
8ad293
                 ret = pam_add_response(kr->pd, SSS_PAM_USER_INFO, user_resp_len,
8ad293
                                        user_resp);
8ad293
                 if (ret != EOK) {
8ad293
-                    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                          "pam_add_response failed.\n");
8ad293
+                    DEBUG(SSSDBG_CRIT_FAILURE, "pam_add_response failed.\n");
8ad293
                 }
8ad293
             }
8ad293
         }
8ad293
@@ -2448,7 +2447,7 @@ static errno_t unpack_buffer(uint8_t *buf, size_t size,
8ad293
 
8ad293
     pd = create_pam_data(kr);
8ad293
     if (pd == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "create_pam_data failed.\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
     kr->pd = pd;
8ad293
@@ -3110,7 +3109,7 @@ static int k5c_setup(struct krb5_req *kr, uint32_t offline)
8ad293
 
8ad293
     kr->creds = calloc(1, sizeof(krb5_creds));
8ad293
     if (kr->creds == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "calloc failed.\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
@@ -3345,7 +3344,7 @@ int main(int argc, const char *argv[])
8ad293
 
8ad293
     kr = talloc_zero(NULL, struct krb5_req);
8ad293
     if (kr == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "talloc failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed.\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -3403,7 +3402,7 @@ int main(int argc, const char *argv[])
8ad293
 
8ad293
     ret = k5c_setup(kr, offline);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "krb5_child_setup failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "k5c_setup failed.\n");
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/krb5/krb5_child_handler.c b/src/providers/krb5/krb5_child_handler.c
8ad293
index 37f4304e8..01777e22b 100644
8ad293
--- a/src/providers/krb5/krb5_child_handler.c
8ad293
+++ b/src/providers/krb5/krb5_child_handler.c
8ad293
@@ -449,14 +449,14 @@ static errno_t fork_child(struct tevent_req *req)
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", errno, strerror(errno));
8ad293
+              "pipe (from) failed [%d][%s].\n", errno, strerror(errno));
8ad293
         goto fail;
8ad293
     }
8ad293
     ret = pipe(pipefd_to_child);
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", errno, strerror(errno));
8ad293
+              "pipe (to) failed [%d][%s].\n", errno, strerror(errno));
8ad293
         goto fail;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c
8ad293
index 5c11c347b..316603946 100644
8ad293
--- a/src/providers/krb5/krb5_common.c
8ad293
+++ b/src/providers/krb5/krb5_common.c
8ad293
@@ -793,7 +793,7 @@ static void krb5_resolve_callback(void *private_data, struct fo_server *server)
8ad293
 
8ad293
     krb5_service = talloc_get_type(private_data, struct krb5_service);
8ad293
     if (!krb5_service) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "FATAL: Bad private_data\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Bad private_data\n");
8ad293
         return;
8ad293
     }
8ad293
 
8ad293
@@ -1110,7 +1110,7 @@ void remove_krb5_info_files_callback(void *pvt)
8ad293
                                               ctx->kdc_service_name);
8ad293
     if (ret != EOK) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "be_fo_run_callbacks_at_next_request failed, "
8ad293
+              "be_fo_run_callbacks_at_next_request(kdc_service_name) failed, "
8ad293
                   "krb5 info files will not be removed, because "
8ad293
                   "it is unclear if they will be recreated properly.\n");
8ad293
         return;
8ad293
@@ -1120,7 +1120,7 @@ void remove_krb5_info_files_callback(void *pvt)
8ad293
                                             ctx->kpasswd_service_name);
8ad293
         if (ret != EOK) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "be_fo_run_callbacks_at_next_request failed, "
8ad293
+                  "be_fo_run_callbacks_at_next_request(kpasswd_service_name) failed, "
8ad293
                       "krb5 info files will not be removed, because "
8ad293
                       "it is unclear if they will be recreated properly.\n");
8ad293
             return;
8ad293
diff --git a/src/providers/krb5/krb5_delayed_online_authentication.c b/src/providers/krb5/krb5_delayed_online_authentication.c
8ad293
index 8572d1249..07d375b9d 100644
8ad293
--- a/src/providers/krb5/krb5_delayed_online_authentication.c
8ad293
+++ b/src/providers/krb5/krb5_delayed_online_authentication.c
8ad293
@@ -173,7 +173,7 @@ static errno_t authenticate_stored_users(
8ad293
         ret = hash_lookup(uid_table, &key, &value);
8ad293
 
8ad293
         if (ret == HASH_SUCCESS) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "User [%s] is still logged in, "
8ad293
+            DEBUG(SSSDBG_FUNC_DATA, "User [%s] is still logged in, "
8ad293
                       "trying online authentication.\n", pd->user);
8ad293
 
8ad293
             auth_data = talloc_zero(deferred_auth_ctx->be_ctx,
8ad293
@@ -193,7 +193,7 @@ static errno_t authenticate_stored_users(
8ad293
                 }
8ad293
             }
8ad293
         } else {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "User [%s] is not logged in anymore, "
8ad293
+            DEBUG(SSSDBG_FUNC_DATA, "User [%s] is not logged in anymore, "
8ad293
                       "discarding online authentication.\n", pd->user);
8ad293
             talloc_free(pd);
8ad293
         }
8ad293
diff --git a/src/providers/krb5/krb5_renew_tgt.c b/src/providers/krb5/krb5_renew_tgt.c
8ad293
index 8b2159e92..d79e7c367 100644
8ad293
--- a/src/providers/krb5/krb5_renew_tgt.c
8ad293
+++ b/src/providers/krb5/krb5_renew_tgt.c
8ad293
@@ -405,7 +405,7 @@ static errno_t check_ccache_files(struct renew_tgt_ctx *renew_tgt_ctx)
8ad293
 
8ad293
     base_dn = sysdb_user_base_dn(tmp_ctx, renew_tgt_ctx->be_ctx->domain);
8ad293
     if (base_dn == NULL) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "sysdb_base_dn failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "sysdb_base_dn failed.\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -440,7 +440,7 @@ static errno_t check_ccache_files(struct renew_tgt_ctx *renew_tgt_ctx)
8ad293
 
8ad293
         ret = sss_parse_internal_fqname(tmp_ctx, user_name, NULL, &user_dom);
8ad293
         if (ret != EOK) {
8ad293
-            DEBUG(SSSDBG_OP_FAILURE,
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
                   "Cannot parse internal fqname [%d]: %s\n",
8ad293
                   ret, sss_strerror(ret));
8ad293
             goto done;
8ad293
diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c
8ad293
index e3f8f2140..43056ba28 100644
8ad293
--- a/src/providers/krb5/krb5_utils.c
8ad293
+++ b/src/providers/krb5/krb5_utils.c
8ad293
@@ -287,7 +287,7 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct krb5child_req *kr,
8ad293
                 name = sss_output_name(tmp_ctx, kr->pd->user, case_sensitive, 0);
8ad293
                 if (name == NULL) {
8ad293
                     DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                          "sss_get_cased_name failed\n");
8ad293
+                          "sss_output_name failed\n");
8ad293
                     goto done;
8ad293
                 }
8ad293
 
8ad293
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c
8ad293
index 89ff4ece0..42ef962b4 100644
8ad293
--- a/src/providers/ldap/ldap_auth.c
8ad293
+++ b/src/providers/ldap/ldap_auth.c
8ad293
@@ -64,7 +64,7 @@ static errno_t add_expired_warning(struct pam_data *pd, long exp_time)
8ad293
 
8ad293
     data = talloc_array(pd, uint32_t, 2);
8ad293
     if (data == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_size failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_array failed.\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
@@ -249,7 +249,8 @@ errno_t check_pwexpire_policy(enum pwexpire pw_expire_type,
8ad293
         ret = EOK;
8ad293
         break;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unknown password expiration type.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "Unknown password expiration type %d.\n", pw_expire_type);
8ad293
         ret = EINVAL;
8ad293
     }
8ad293
 
8ad293
@@ -1355,9 +1356,10 @@ static void sdap_pam_chpass_handler_auth_done(struct tevent_req *subreq)
8ad293
         case PWEXPIRE_NONE:
8ad293
             break;
8ad293
         default:
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Unknown password expiration type.\n");
8ad293
-                state->pd->pam_status = PAM_SYSTEM_ERR;
8ad293
-                goto done;
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                  "Unknown password expiration type %d.\n", pw_expire_type);
8ad293
+            state->pd->pam_status = PAM_SYSTEM_ERR;
8ad293
+            goto done;
8ad293
         }
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ldap/ldap_child.c b/src/providers/ldap/ldap_child.c
8ad293
index 84941c6e4..8580e2785 100644
8ad293
--- a/src/providers/ldap/ldap_child.c
8ad293
+++ b/src/providers/ldap/ldap_child.c
8ad293
@@ -223,7 +223,7 @@ static int lc_verify_keytab_ex(const char *principal,
8ad293
             /* This should never happen. The API docs for this function
8ad293
              * specify only success for this function
8ad293
              */
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE,"Could not free keytab entry contents\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "Could not free keytab entry contents\n");
8ad293
             /* This is non-fatal, so we'll continue here */
8ad293
         }
8ad293
 
8ad293
diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
8ad293
index cd589a7c0..2ad8680a1 100644
8ad293
--- a/src/providers/ldap/ldap_init.c
8ad293
+++ b/src/providers/ldap/ldap_init.c
8ad293
@@ -43,8 +43,8 @@ struct ldap_init_ctx {
8ad293
 };
8ad293
 
8ad293
 /* Please use this only for short lists */
8ad293
-errno_t check_order_list_for_duplicates(char **list,
8ad293
-                                        bool case_sensitive)
8ad293
+static errno_t check_order_list_for_duplicates(char **list,
8ad293
+                                               bool case_sensitive)
8ad293
 {
8ad293
     size_t c;
8ad293
     size_t d;
8ad293
diff --git a/src/providers/ldap/ldap_options.c b/src/providers/ldap/ldap_options.c
8ad293
index d06d3980e..bb51785fb 100644
8ad293
--- a/src/providers/ldap/ldap_options.c
8ad293
+++ b/src/providers/ldap/ldap_options.c
8ad293
@@ -408,14 +408,15 @@ int ldap_get_options(TALLOC_CTX *memctx,
8ad293
         sss_erase_talloc_mem_securely(cleartext);
8ad293
         talloc_free(cleartext);
8ad293
         if (ret != EOK) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "dp_opt_set_string failed.\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "dp_opt_set_blob(authtok) failed.\n");
8ad293
             goto done;
8ad293
         }
8ad293
 
8ad293
         ret = dp_opt_set_string(opts->basic, SDAP_DEFAULT_AUTHTOK_TYPE,
8ad293
                                 "password");
8ad293
         if (ret != EOK) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "dp_opt_set_string failed.\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                  "dp_opt_set_string(authtok_type) failed.\n");
8ad293
             goto done;
8ad293
         }
8ad293
     }
8ad293
@@ -629,7 +630,8 @@ int ldap_get_autofs_options(TALLOC_CTX *memctx,
8ad293
             default_entry_map = rfc2307bis_autofs_entry_map;
8ad293
             break;
8ad293
         default:
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Unknown LDAP schema!\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                  "Unknown LDAP schema %d!\n", opts->schema_type);
8ad293
             return EINVAL;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
8ad293
index 7cb00480d..32c0144b9 100644
8ad293
--- a/src/providers/ldap/sdap.c
8ad293
+++ b/src/providers/ldap/sdap.c
8ad293
@@ -371,7 +371,7 @@ int sdap_get_map(TALLOC_CTX *memctx,
8ad293
 
8ad293
         if (map[i].def_name && !map[i].name) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "Failed to retrieve value for %s\n", map[i].opt_name);
8ad293
+                  "Failed to process value for %s\n", map[i].opt_name);
8ad293
             talloc_zfree(map);
8ad293
             return EINVAL;
8ad293
         }
8ad293
@@ -532,7 +532,8 @@ int sdap_parse_entry(TALLOC_CTX *memctx,
8ad293
             if (!vals) {
8ad293
                 ldap_get_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno);
8ad293
                 if (lerrno != LDAP_SUCCESS) {
8ad293
-                    DEBUG(SSSDBG_CRIT_FAILURE, "LDAP Library error: %d(%s)\n",
8ad293
+                    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                          "ldap_get_values_len() failed: %d(%s)\n",
8ad293
                           lerrno, sss_ldap_err2string(lerrno));
8ad293
                     ret = EIO;
8ad293
                     goto done;
8ad293
@@ -613,7 +614,7 @@ int sdap_parse_entry(TALLOC_CTX *memctx,
8ad293
 
8ad293
     ldap_get_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno);
8ad293
     if (lerrno) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "LDAP Library error: %d(%s)\n",
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "ldap_get_option() failed: %d(%s)\n",
8ad293
               lerrno, sss_ldap_err2string(lerrno));
8ad293
         ret = EIO;
8ad293
         goto done;
8ad293
@@ -884,7 +885,8 @@ errno_t setup_tls_config(struct dp_option *basic_opts)
8ad293
             ldap_opt_x_tls_require_cert = LDAP_OPT_X_TLS_HARD;
8ad293
         }
8ad293
         else {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Unknown value for tls_reqcert.\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+                  "Unknown value for tls_reqcert '%s'.\n", tls_opt);
8ad293
             return EINVAL;
8ad293
         }
8ad293
         /* LDAP_OPT_X_TLS_REQUIRE_CERT has to be set as a global option,
8ad293
@@ -893,7 +895,8 @@ errno_t setup_tls_config(struct dp_option *basic_opts)
8ad293
                               &ldap_opt_x_tls_require_cert);
8ad293
         if (ret != LDAP_OPT_SUCCESS) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "ldap_set_option failed: %s\n", sss_ldap_err2string(ret));
8ad293
+                  "ldap_set_option(req_cert) failed: %s\n",
8ad293
+                  sss_ldap_err2string(ret));
8ad293
             return EIO;
8ad293
         }
8ad293
     }
8ad293
@@ -903,7 +906,8 @@ errno_t setup_tls_config(struct dp_option *basic_opts)
8ad293
         ret = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, tls_opt);
8ad293
         if (ret != LDAP_OPT_SUCCESS) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "ldap_set_option failed: %s\n", sss_ldap_err2string(ret));
8ad293
+                  "ldap_set_option(cacertfile) failed: %s\n",
8ad293
+                  sss_ldap_err2string(ret));
8ad293
             return EIO;
8ad293
         }
8ad293
     }
8ad293
@@ -913,7 +917,8 @@ errno_t setup_tls_config(struct dp_option *basic_opts)
8ad293
         ret = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTDIR, tls_opt);
8ad293
         if (ret != LDAP_OPT_SUCCESS) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "ldap_set_option failed: %s\n", sss_ldap_err2string(ret));
8ad293
+                  "ldap_set_option(cacertdir) failed: %s\n",
8ad293
+                  sss_ldap_err2string(ret));
8ad293
             return EIO;
8ad293
         }
8ad293
     }
8ad293
@@ -923,7 +928,8 @@ errno_t setup_tls_config(struct dp_option *basic_opts)
8ad293
         ret = ldap_set_option(NULL, LDAP_OPT_X_TLS_CERTFILE, tls_opt);
8ad293
         if (ret != LDAP_OPT_SUCCESS) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "ldap_set_option failed: %s\n", sss_ldap_err2string(ret));
8ad293
+                  "ldap_set_option(certfile) failed: %s\n",
8ad293
+                  sss_ldap_err2string(ret));
8ad293
             return EIO;
8ad293
         }
8ad293
     }
8ad293
@@ -933,7 +939,8 @@ errno_t setup_tls_config(struct dp_option *basic_opts)
8ad293
         ret = ldap_set_option(NULL, LDAP_OPT_X_TLS_KEYFILE, tls_opt);
8ad293
         if (ret != LDAP_OPT_SUCCESS) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "ldap_set_option failed: %s\n", sss_ldap_err2string(ret));
8ad293
+                  "ldap_set_option(keyfile) failed: %s\n",
8ad293
+                  sss_ldap_err2string(ret));
8ad293
             return EIO;
8ad293
         }
8ad293
     }
8ad293
@@ -943,7 +950,8 @@ errno_t setup_tls_config(struct dp_option *basic_opts)
8ad293
         ret = ldap_set_option(NULL, LDAP_OPT_X_TLS_CIPHER_SUITE, tls_opt);
8ad293
         if (ret != LDAP_OPT_SUCCESS) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "ldap_set_option failed: %s\n", sss_ldap_err2string(ret));
8ad293
+                  "ldap_set_option(cipher) failed: %s\n",
8ad293
+                  sss_ldap_err2string(ret));
8ad293
             return EIO;
8ad293
         }
8ad293
     }
8ad293
diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c
8ad293
index dd04ec512..8add97ba8 100644
8ad293
--- a/src/providers/ldap/sdap_access.c
8ad293
+++ b/src/providers/ldap/sdap_access.c
8ad293
@@ -317,7 +317,8 @@ static errno_t sdap_access_check_next_rule(struct sdap_access_req_ctx *state,
8ad293
 
8ad293
         default:
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "Unexpected access rule type. Access denied.\n");
8ad293
+                  "Unexpected access rule type %d. Access denied.\n",
8ad293
+                  state->access_ctx->access_rule[state->current_rule]);
8ad293
             ret = ERR_ACCESS_DENIED;
8ad293
         }
8ad293
 
8ad293
@@ -1220,13 +1221,13 @@ static errno_t sdap_save_user_cache_bool(struct sss_domain_info *domain,
8ad293
     attrs = sysdb_new_attrs(NULL);
8ad293
     if (attrs == NULL) {
8ad293
         ret = ENOMEM;
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Could not set up attrs\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Could not create attrs\n");
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
     ret = sysdb_attrs_add_bool(attrs, attr_name, value);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Could not set up attrs\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Could not set up attr value\n");
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
@@ -1787,7 +1788,7 @@ errno_t sdap_access_ppolicy_step(struct tevent_req *req)
8ad293
                                    false);
8ad293
 
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "sdap_access_ppolicy_send failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "sdap_get_generic_send failed.\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -1913,7 +1914,7 @@ static void sdap_access_ppolicy_step_done(struct tevent_req *subreq)
8ad293
             ret = sdap_access_decide_offline(state->cached_access);
8ad293
         } else {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "sdap_get_generic_send() returned error [%d][%s]\n",
8ad293
+                  "sdap_id_op_done() returned error [%d][%s]\n",
8ad293
                   ret, sss_strerror(ret));
8ad293
         }
8ad293
 
8ad293
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
8ad293
index 68d5d44f8..cc77fb249 100644
8ad293
--- a/src/providers/ldap/sdap_async.c
8ad293
+++ b/src/providers/ldap/sdap_async.c
8ad293
@@ -749,7 +749,7 @@ sdap_modify_send(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     ret = ldap_modify_ext(state->sh->ldap, dn, mods, NULL, NULL, &msgid);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to send operation!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "ldap_modify_ext() failed [%d]\n", ret);
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
@@ -2120,7 +2120,7 @@ static int sdap_x_deref_create_control(struct sdap_handle *sh,
8ad293
 
8ad293
     ret = ldap_create_deref_control_value(sh->ldap, ds, &derefval);
8ad293
     if (ret != LDAP_SUCCESS) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "sss_ldap_control_create failed: %s\n",
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "ldap_create_deref_control_value failed: %s\n",
8ad293
                   ldap_err2string(ret));
8ad293
         return ret;
8ad293
     }
8ad293
@@ -2129,7 +2129,7 @@ static int sdap_x_deref_create_control(struct sdap_handle *sh,
8ad293
                               1, &derefval, 1, ctrl);
8ad293
     ldap_memfree(derefval.bv_val);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "sss_ldap_control_create failed\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "sdap_control_create failed %d\n", ret);
8ad293
         return ret;
8ad293
     }
8ad293
 
8ad293
@@ -2875,7 +2875,8 @@ static void sdap_deref_search_done(struct tevent_req *subreq)
8ad293
                 &state->reply_count, &state->reply);
8ad293
         break;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unknown deref method\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+              "Unknown deref method %d\n", state->deref_type);
8ad293
         tevent_req_error(req, EINVAL);
8ad293
         return;
8ad293
     }
8ad293
diff --git a/src/providers/ldap/sdap_async_autofs.c b/src/providers/ldap/sdap_async_autofs.c
8ad293
index eaca0324e..ae2fa33e1 100644
8ad293
--- a/src/providers/ldap/sdap_async_autofs.c
8ad293
+++ b/src/providers/ldap/sdap_async_autofs.c
8ad293
@@ -720,7 +720,7 @@ sdap_autofs_setautomntent_send(TALLOC_CTX *memctx,
8ad293
                                       dp_opt_get_int(state->opts->basic,
8ad293
                                                      SDAP_SEARCH_TIMEOUT));
8ad293
     if (!subreq) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "sdap_get_automntmap_send failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto fail;
8ad293
     }
8ad293
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
8ad293
index 5f69cedcc..eead3f119 100644
8ad293
--- a/src/providers/ldap/sdap_async_connection.c
8ad293
+++ b/src/providers/ldap/sdap_async_connection.c
8ad293
@@ -694,10 +694,10 @@ static struct tevent_req *simple_bind_send(TALLOC_CTX *memctx,
8ad293
                               LDAP_OPT_RESULT_CODE, &ldap_err);
8ad293
         if (ret != LDAP_OPT_SUCCESS) {
8ad293
             DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-                  "ldap_bind failed (couldn't get ldap error)\n");
8ad293
+                  "ldap_sasl_bind failed (couldn't get ldap error)\n");
8ad293
             ret = LDAP_LOCAL_ERROR;
8ad293
         } else {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "ldap_bind failed (%d)[%s]\n",
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "ldap_sasl_bind failed (%d)[%s]\n",
8ad293
                       ldap_err, sss_ldap_err2string(ldap_err));
8ad293
             ret = ldap_err;
8ad293
         }
8ad293
@@ -988,7 +988,7 @@ static struct tevent_req *sasl_bind_send(TALLOC_CTX *memctx,
8ad293
                                        (*sdap_sasl_interact), state);
8ad293
     if (ret != LDAP_SUCCESS) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "ldap_sasl_bind failed (%d)[%s]\n",
8ad293
+              "ldap_sasl_interactive_bind_s failed (%d)[%s]\n",
8ad293
                ret, sss_ldap_err2string(ret));
8ad293
 
8ad293
         optret = sss_ldap_get_diagnostic_msg(state, state->sh->ldap,
8ad293
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
8ad293
index 5dbfd73c4..16c4a5f37 100644
8ad293
--- a/src/providers/ldap/sdap_async_groups.c
8ad293
+++ b/src/providers/ldap/sdap_async_groups.c
8ad293
@@ -883,10 +883,7 @@ static int sdap_save_grpmem(TALLOC_CTX *memctx,
8ad293
     const char *check_name;
8ad293
 
8ad293
     if (dom->ignore_group_members) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "Group members are ignored, nothing to do. If you see this " \
8ad293
-              "message it might indicate an error in the group processing " \
8ad293
-              "logic.\n");
8ad293
+        DEBUG(SSSDBG_TRACE_FUNC, "Group members are ignored, nothing to do.\n");
8ad293
         return EOK;
8ad293
     }
8ad293
 
8ad293
@@ -978,7 +975,12 @@ static int sdap_save_grpmem(TALLOC_CTX *memctx,
8ad293
         ret = sysdb_remove_attrs(group_dom, group_name, SYSDB_MEMBER_GROUP,
8ad293
                                  discard_const(remove_attrs));
8ad293
         if (ret != EOK) {
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "sysdb_remove_attrs failed.\n");
8ad293
+            if (ret != ENOENT) {
8ad293
+                DEBUG(SSSDBG_OP_FAILURE, "sysdb_remove_attrs failed.\n");
8ad293
+            } else {
8ad293
+                DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
+                      "sysdb_remove_attrs failed for missing entry\n");
8ad293
+            }
8ad293
             goto fail;
8ad293
         }
8ad293
     } else {
8ad293
@@ -1014,7 +1016,7 @@ static int sdap_save_grpmem(TALLOC_CTX *memctx,
8ad293
     return EOK;
8ad293
 
8ad293
 fail:
8ad293
-    DEBUG(SSSDBG_OP_FAILURE,
8ad293
+    DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
            "Failed to save members of group %s\n", group_name);
8ad293
     return ret;
8ad293
 }
8ad293
@@ -1130,8 +1132,13 @@ static int sdap_save_groups(TALLOC_CTX *memctx,
8ad293
             /* Do not fail completely on errors.
8ad293
              * Just report the failure to save and go on */
8ad293
             if (ret) {
8ad293
-                DEBUG(SSSDBG_OP_FAILURE,
8ad293
-                      "Failed to store group %d members.\n", i);
8ad293
+                if (ret != ENOENT) {
8ad293
+                    DEBUG(SSSDBG_OP_FAILURE,
8ad293
+                          "Failed to store group %d members: %d\n", i, ret);
8ad293
+                } else {
8ad293
+                    DEBUG(SSSDBG_FUNC_DATA,
8ad293
+                          "Can't save members of missing group %d\n", i);
8ad293
+                }
8ad293
             } else {
8ad293
                 DEBUG(SSSDBG_TRACE_ALL, "Group %d members processed!\n", i);
8ad293
             }
8ad293
@@ -1270,7 +1277,7 @@ sdap_process_group_send(TALLOC_CTX *memctx,
8ad293
 
8ad293
     /* Group without members */
8ad293
     if (el->num_values == 0) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE, "No Members. Done!\n");
8ad293
+        DEBUG(SSSDBG_FUNC_DATA, "No Members. Done!\n");
8ad293
         ret = EOK;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -2249,7 +2256,7 @@ static void sdap_nested_done(struct tevent_req *subreq)
8ad293
 
8ad293
     if (hash_count(state->missing_external) == 0) {
8ad293
         /* No external members. Processing complete */
8ad293
-        DEBUG(SSSDBG_TRACE_INTERNAL, "No external members, done");
8ad293
+        DEBUG(SSSDBG_TRACE_INTERNAL, "No external members, done\n");
8ad293
         tevent_req_done(req);
8ad293
         return;
8ad293
     }
8ad293
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
8ad293
index 4b5b36403..bf8f9482b 100644
8ad293
--- a/src/providers/ldap/sdap_async_initgroups.c
8ad293
+++ b/src/providers/ldap/sdap_async_initgroups.c
8ad293
@@ -345,7 +345,7 @@ int sdap_initgr_common_store(struct sysdb_ctx *sysdb,
8ad293
                                          add_groups, ldap_groups,
8ad293
                                          ldap_groups_count);
8ad293
         if (ret != EOK) {
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Adding incomplete users failed\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "Adding incomplete groups failed\n");
8ad293
             goto done;
8ad293
         }
8ad293
     }
8ad293
@@ -1043,6 +1043,10 @@ static void sdap_initgr_nested_search(struct tevent_req *subreq)
8ad293
         state->groups[state->groups_cur] = talloc_steal(state->groups,
8ad293
                                                         groups[0]);
8ad293
         state->groups_cur++;
8ad293
+    } else if (count == 0) {
8ad293
+        /* this might be HBAC or sudo rule */
8ad293
+        DEBUG(SSSDBG_FUNC_DATA, "Object %s not found. Skipping\n",
8ad293
+              state->group_dns[state->cur]);
8ad293
     } else {
8ad293
         DEBUG(SSSDBG_OP_FAILURE,
8ad293
               "Search for group %s, returned %zu results. Skipping\n",
8ad293
diff --git a/src/providers/ldap/sdap_async_initgroups_ad.c b/src/providers/ldap/sdap_async_initgroups_ad.c
8ad293
index eb3e779ed..80ac4c1f4 100644
8ad293
--- a/src/providers/ldap/sdap_async_initgroups_ad.c
8ad293
+++ b/src/providers/ldap/sdap_async_initgroups_ad.c
8ad293
@@ -378,7 +378,7 @@ static void sdap_ad_resolve_sids_done(struct tevent_req *subreq)
8ad293
         /* Group was not found, we will ignore the error and continue with
8ad293
          * next group. This may happen for example if the group is built-in,
8ad293
          * but a custom search base is provided. */
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+        DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
               "Unable to resolve SID %s - will try next sid.\n",
8ad293
               state->current_sid);
8ad293
     } else if (ret != EOK || sdap_error != EOK || dp_error != DP_ERR_OK) {
8ad293
diff --git a/src/providers/ldap/sdap_async_sudo.c b/src/providers/ldap/sdap_async_sudo.c
8ad293
index 5473e1df8..28b65b639 100644
8ad293
--- a/src/providers/ldap/sdap_async_sudo.c
8ad293
+++ b/src/providers/ldap/sdap_async_sudo.c
8ad293
@@ -111,7 +111,7 @@ static void sdap_sudo_load_sudoers_done(struct tevent_req *subreq)
8ad293
         return;
8ad293
     }
8ad293
 
8ad293
-    DEBUG(SSSDBG_IMPORTANT_INFO, "Received %zu sudo rules\n",
8ad293
+    DEBUG(SSSDBG_FUNC_DATA, "Received %zu sudo rules\n",
8ad293
           state->num_rules);
8ad293
 
8ad293
     tevent_req_done(req);
8ad293
@@ -665,7 +665,7 @@ done:
8ad293
     if (in_transaction) {
8ad293
         sret = sysdb_transaction_cancel(state->sysdb);
8ad293
         if (sret != EOK) {
8ad293
-            DEBUG(SSSDBG_OP_FAILURE, "Could not cancel transaction\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "Could not cancel transaction\n");
8ad293
         }
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ldap/sdap_child_helpers.c b/src/providers/ldap/sdap_child_helpers.c
8ad293
index 9d25aea8b..480efc41b 100644
8ad293
--- a/src/providers/ldap/sdap_child_helpers.c
8ad293
+++ b/src/providers/ldap/sdap_child_helpers.c
8ad293
@@ -95,14 +95,14 @@ static errno_t sdap_fork_child(struct tevent_context *ev,
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", ret, strerror(ret));
8ad293
+              "pipe(from) failed [%d][%s].\n", ret, strerror(ret));
8ad293
         goto fail;
8ad293
     }
8ad293
     ret = pipe(pipefd_to_child);
8ad293
     if (ret == -1) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pipe failed [%d][%s].\n", ret, strerror(ret));
8ad293
+              "pipe(to) failed [%d][%s].\n", ret, strerror(ret));
8ad293
         goto fail;
8ad293
     }
8ad293
 
8ad293
@@ -332,7 +332,7 @@ struct tevent_req *sdap_get_tgt_send(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     ret = set_tgt_child_timeout(req, ev, timeout);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "activate_child_timeout_handler failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "set_tgt_child_timeout failed.\n");
8ad293
         goto fail;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/ldap/sdap_hostid.c b/src/providers/ldap/sdap_hostid.c
8ad293
index d90a83854..ae8caaddb 100644
8ad293
--- a/src/providers/ldap/sdap_hostid.c
8ad293
+++ b/src/providers/ldap/sdap_hostid.c
8ad293
@@ -166,7 +166,7 @@ hosts_get_done(struct tevent_req *subreq)
8ad293
     }
8ad293
 
8ad293
     if (state->count == 0) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE,
8ad293
+        DEBUG(SSSDBG_FUNC_DATA,
8ad293
               "No host with name [%s] found.\n", state->name);
8ad293
 
8ad293
         ret = sysdb_delete_ssh_host(state->domain, state->name);
8ad293
diff --git a/src/providers/ldap/sdap_id_op.c b/src/providers/ldap/sdap_id_op.c
8ad293
index 6c803f31d..b8d76f8a5 100644
8ad293
--- a/src/providers/ldap/sdap_id_op.c
8ad293
+++ b/src/providers/ldap/sdap_id_op.c
8ad293
@@ -563,7 +563,7 @@ static void sdap_id_op_connect_done(struct tevent_req *subreq)
8ad293
                    "is enabled.\n");
8ad293
         } else {
8ad293
             /* be is going offline as there is no more servers to try */
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+            DEBUG(SSSDBG_OP_FAILURE,
8ad293
                   "Failed to connect, going offline (%d [%s])\n",
8ad293
                    ret, strerror(ret));
8ad293
             is_offline = true;
8ad293
diff --git a/src/providers/proxy/proxy_auth.c b/src/providers/proxy/proxy_auth.c
8ad293
index 926ce98f4..0e6fc8ea8 100644
8ad293
--- a/src/providers/proxy/proxy_auth.c
8ad293
+++ b/src/providers/proxy/proxy_auth.c
8ad293
@@ -68,7 +68,7 @@ static struct tevent_req *proxy_child_send(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     req = tevent_req_create(mem_ctx, &state, struct proxy_child_ctx);
8ad293
     if (req == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Could not send PAM request to child\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
8ad293
         return NULL;
8ad293
     }
8ad293
 
8ad293
@@ -391,7 +391,7 @@ static void proxy_child_init_done(struct tevent_req *subreq) {
8ad293
      */
8ad293
     sig_ctx = talloc_zero(child_ctx->auth_ctx, struct proxy_child_sig_ctx);
8ad293
     if(sig_ctx == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_add_signal failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed.\n");
8ad293
         tevent_req_error(req, ENOMEM);
8ad293
         return;
8ad293
     }
8ad293
@@ -753,7 +753,7 @@ proxy_pam_handler_send(TALLOC_CTX *mem_ctx,
8ad293
         pd->pam_status = PAM_SUCCESS;
8ad293
         goto immediately;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unsupported PAM task.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Unsupported PAM task %d\n", pd->cmd);
8ad293
         pd->pam_status = PAM_MODULE_UNKNOWN;
8ad293
         goto immediately;
8ad293
     }
8ad293
diff --git a/src/providers/proxy/proxy_child.c b/src/providers/proxy/proxy_child.c
8ad293
index dc06f4669..bb96ec0f4 100644
8ad293
--- a/src/providers/proxy/proxy_child.c
8ad293
+++ b/src/providers/proxy/proxy_child.c
8ad293
@@ -270,7 +270,7 @@ static errno_t call_pam_stack(const char *pam_target, struct pam_data *pd)
8ad293
                 }
8ad293
                 break;
8ad293
             default:
8ad293
-                DEBUG(SSSDBG_CRIT_FAILURE, "unknown PAM call\n");
8ad293
+                DEBUG(SSSDBG_CRIT_FAILURE, "unknown PAM call %d\n", pd->cmd);
8ad293
                 pam_status=PAM_ABORT;
8ad293
         }
8ad293
 
8ad293
@@ -383,13 +383,13 @@ proxy_cli_init(struct pc_ctx *ctx)
8ad293
     ret = sss_iface_connect_address(ctx, ctx->ev, sbus_cliname, sbus_address,
8ad293
                                     NULL, &ctx->conn);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to connect to %s\n", sbus_address);
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to connect to %s\n", sbus_address);
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
     ret = sbus_connection_add_path_map(ctx->conn, paths);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
               ret, sss_strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
@@ -580,7 +580,7 @@ int main(int argc, const char *argv[])
8ad293
         return 3;
8ad293
     }
8ad293
 
8ad293
-    DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+    DEBUG(SSSDBG_IMPORTANT_INFO,
8ad293
           "Proxy child for domain [%s] started!\n", domain);
8ad293
 
8ad293
     /* loop on main */
8ad293
diff --git a/src/providers/proxy/proxy_client.c b/src/providers/proxy/proxy_client.c
8ad293
index 09ebf3bda..5a4fbcde1 100644
8ad293
--- a/src/providers/proxy/proxy_client.c
8ad293
+++ b/src/providers/proxy/proxy_client.c
8ad293
@@ -116,7 +116,7 @@ proxy_client_init(struct sbus_connection *conn,
8ad293
 
8ad293
     ret = sbus_connection_add_path_map(conn, paths);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
               ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
8ad293
index 82394862c..f36386089 100644
8ad293
--- a/src/providers/proxy/proxy_id.c
8ad293
+++ b/src/providers/proxy/proxy_id.c
8ad293
@@ -170,7 +170,7 @@ handle_getpw_result(enum nss_status status, struct passwd *pwd,
8ad293
     switch (status) {
8ad293
     case NSS_STATUS_NOTFOUND:
8ad293
 
8ad293
-        DEBUG(SSSDBG_MINOR_FAILURE, "User not found.\n");
8ad293
+        DEBUG(SSSDBG_TRACE_FUNC, "User not found.\n");
8ad293
         *del_user = true;
8ad293
         break;
8ad293
 
8ad293
@@ -979,9 +979,7 @@ static int get_gr_name(struct proxy_id_ctx *ctx,
8ad293
     grp = talloc(tmpctx, struct group);
8ad293
     if (!grp) {
8ad293
         ret = ENOMEM;
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "proxy -> getgrnam_r failed for '%s': [%d] %s\n",
8ad293
-              i_name, ret, strerror(ret));
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc() failed\n");
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c
8ad293
index 07f05ff17..294a4b882 100644
8ad293
--- a/src/resolv/async_resolv.c
8ad293
+++ b/src/resolv/async_resolv.c
8ad293
@@ -177,7 +177,7 @@ add_timeout_timer(struct tevent_context *ev, struct resolv_ctx *ctx)
8ad293
     ctx->timeout_watcher = tevent_add_timer(ev, ctx, tv, check_fd_timeouts,
8ad293
                                             ctx);
8ad293
     if (ctx->timeout_watcher == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_add_timer() failed\n");
8ad293
     }
8ad293
 }
8ad293
 
8ad293
diff --git a/src/responder/autofs/autofssrv.c b/src/responder/autofs/autofssrv.c
8ad293
index a802ed5d0..27de1b44a 100644
8ad293
--- a/src/responder/autofs/autofssrv.c
8ad293
+++ b/src/responder/autofs/autofssrv.c
8ad293
@@ -85,7 +85,7 @@ autofs_register_service_iface(struct autofs_ctx *autofs_ctx,
8ad293
 
8ad293
     ret = sbus_connection_add_path(rctx->mon_conn, SSS_BUS_PATH, &iface_svc);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to register service interface"
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to register service interface"
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/autofs/autofssrv_cmd.c b/src/responder/autofs/autofssrv_cmd.c
8ad293
index 6d51e75ac..7c8090993 100644
8ad293
--- a/src/responder/autofs/autofssrv_cmd.c
8ad293
+++ b/src/responder/autofs/autofssrv_cmd.c
8ad293
@@ -477,7 +477,7 @@ sss_autofs_cmd_setautomntent(struct cli_ctx *cli_ctx)
8ad293
                                             autofs_ctx->rctx->ncache, 0, NULL,
8ad293
                                             cmd_ctx->mapname);
8ad293
     if (req == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "cache_req_autofs_map_by_name_send failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -685,7 +685,7 @@ sss_autofs_cmd_getautomntent(struct cli_ctx *cli_ctx)
8ad293
 
8ad293
     req = autofs_setent_send(cli_ctx, cli_ctx->ev, autofs_ctx, cmd_ctx->mapname);
8ad293
     if (req == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "autofs_setent_send failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -886,7 +886,7 @@ sss_autofs_cmd_getautomntbyname(struct cli_ctx *cli_ctx)
8ad293
                                               cmd_ctx->mapname,
8ad293
                                               cmd_ctx->keyname);
8ad293
     if (req == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "cache_req_autofs_entry_by_name_send failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/responder/common/cache_req/cache_req.c b/src/responder/common/cache_req/cache_req.c
8ad293
index 0c8538414..c6902f842 100644
8ad293
--- a/src/responder/common/cache_req/cache_req.c
8ad293
+++ b/src/responder/common/cache_req/cache_req.c
8ad293
@@ -1187,7 +1187,7 @@ static errno_t cache_req_process_input(TALLOC_CTX *mem_ctx,
8ad293
     subreq = sss_parse_inp_send(mem_ctx, cr->rctx, default_domain,
8ad293
                                 cr->data->name.input);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "sss_parse_inp_send() failed\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/common/cache_req/plugins/cache_req_object_by_name.c b/src/responder/common/cache_req/plugins/cache_req_object_by_name.c
8ad293
index a740fbb8d..83d00f775 100644
8ad293
--- a/src/responder/common/cache_req/plugins/cache_req_object_by_name.c
8ad293
+++ b/src/responder/common/cache_req/plugins/cache_req_object_by_name.c
8ad293
@@ -47,8 +47,8 @@ cache_req_object_by_name_well_known(TALLOC_CTX *mem_ctx,
8ad293
     }
8ad293
 
8ad293
     if (domname == NULL || name == NULL) {
8ad293
-        CACHE_REQ_DEBUG(SSSDBG_OP_FAILURE, cr, "Unable to split [%s] in "
8ad293
-                        "name and odmain part. Skipping detection of "
8ad293
+        CACHE_REQ_DEBUG(SSSDBG_FUNC_DATA, cr, "Unable to split [%s] in "
8ad293
+                        "name and domain part. Skipping detection of "
8ad293
                         "well-known name.\n", data->name.input);
8ad293
         return ENOENT;
8ad293
     }
8ad293
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
8ad293
index e8d298546..7061d018a 100644
8ad293
--- a/src/responder/common/responder_common.c
8ad293
+++ b/src/responder/common/responder_common.c
8ad293
@@ -116,7 +116,7 @@ static errno_t get_client_cred(struct cli_ctx *cctx)
8ad293
     if (ret != EOK) {
8ad293
         ret = errno;
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "getsock failed [%d][%s].\n", ret, strerror(ret));
8ad293
+              "getsockopt failed [%d][%s].\n", ret, strerror(ret));
8ad293
         return ret;
8ad293
     }
8ad293
     if (client_cred_len != sizeof(struct ucred)) {
8ad293
@@ -805,7 +805,7 @@ sss_dp_on_reconnect(struct sbus_connection *conn,
8ad293
                                             SSS_BUS_PATH,
8ad293
                                             be_conn->cli_name);
8ad293
     if (req == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "sbus_call_dp_client_Register_send() failed\n");
8ad293
         return;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/common/responder_get_domains.c b/src/responder/common/responder_get_domains.c
8ad293
index 10939600d..e551b0fff 100644
8ad293
--- a/src/responder/common/responder_get_domains.c
8ad293
+++ b/src/responder/common/responder_get_domains.c
8ad293
@@ -630,7 +630,7 @@ static void sss_parse_inp_done(struct tevent_req *subreq)
8ad293
                                      state->rawinp,
8ad293
                                      &state->domname, &state->name);
8ad293
     if (ret == EAGAIN && state->domname != NULL && state->name == NULL) {
8ad293
-        DEBUG(SSSDBG_OP_FAILURE,
8ad293
+        DEBUG(SSSDBG_FUNC_DATA,
8ad293
               "Unknown domain in [%s]\n", state->rawinp);
8ad293
         state->error = ERR_DOMAIN_NOT_FOUND;
8ad293
     } else if (ret != EOK) {
8ad293
diff --git a/src/responder/common/responder_iface.c b/src/responder/common/responder_iface.c
8ad293
index 911cd6cc0..aaa765950 100644
8ad293
--- a/src/responder/common/responder_iface.c
8ad293
+++ b/src/responder/common/responder_iface.c
8ad293
@@ -127,7 +127,7 @@ sss_resp_register_sbus_iface(struct sbus_connection *conn,
8ad293
 
8ad293
     ret = sbus_connection_add_path_map(conn, paths);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
               ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
@@ -151,7 +151,7 @@ sss_resp_register_service_iface(struct resp_ctx *rctx)
8ad293
 
8ad293
     ret = sbus_connection_add_path(rctx->mon_conn, SSS_BUS_PATH, &iface_svc);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to register service interface"
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to register service interface"
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/ifp/ifp_iface/ifp_iface.c b/src/responder/ifp/ifp_iface/ifp_iface.c
8ad293
index a3385091b..833cf6843 100644
8ad293
--- a/src/responder/ifp/ifp_iface/ifp_iface.c
8ad293
+++ b/src/responder/ifp/ifp_iface/ifp_iface.c
8ad293
@@ -264,7 +264,7 @@ ifp_register_sbus_interface(struct sbus_connection *conn,
8ad293
 
8ad293
     ret = sbus_connection_add_path_map(conn, paths);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to add paths [%d]: %s\n",
8ad293
               ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/ifp/ifpsrv.c b/src/responder/ifp/ifpsrv.c
8ad293
index 17d7692d3..7407ee07b 100644
8ad293
--- a/src/responder/ifp/ifpsrv.c
8ad293
+++ b/src/responder/ifp/ifpsrv.c
8ad293
@@ -67,7 +67,7 @@ sysbus_init(TALLOC_CTX *mem_ctx,
8ad293
     sysbus = sbus_connect_system(mem_ctx, ev, dbus_name,
8ad293
                                  &ifp_ctx->rctx->last_request_time);
8ad293
     if (sysbus == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to connect to system bus!\n");
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to connect to system bus!\n");
8ad293
         return ERR_NO_SYSBUS;
8ad293
     }
8ad293
 
8ad293
@@ -75,13 +75,13 @@ sysbus_init(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     ret = ifp_register_sbus_interface(sysbus, ifp_ctx);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Could not register interfaces\n");
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Could not register interfaces\n");
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
     ret = ifp_register_nodes(ifp_ctx, sysbus);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Could not register nodes factories\n");
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Could not register nodes factories\n");
8ad293
         goto done;
8ad293
     }
8ad293
 
8ad293
@@ -148,7 +148,7 @@ ifp_register_service_iface(struct ifp_ctx *ifp_ctx,
8ad293
 
8ad293
     ret = sbus_connection_add_path(rctx->mon_conn, SSS_BUS_PATH, &iface_svc);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to register service interface"
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to register service interface"
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/ifp/ifpsrv_util.c b/src/responder/ifp/ifpsrv_util.c
8ad293
index ebc4c2118..3b3df7bc0 100644
8ad293
--- a/src/responder/ifp/ifpsrv_util.c
8ad293
+++ b/src/responder/ifp/ifpsrv_util.c
8ad293
@@ -341,7 +341,7 @@ immediately:
8ad293
     list_ctx->paths = talloc_realloc(list_ctx, list_ctx->paths, const char *,
8ad293
                                      list_ctx->paths_max + 1);
8ad293
     if (list_ctx->paths == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero_array() failed\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_realloc() failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/responder/nss/nss_cmd.c b/src/responder/nss/nss_cmd.c
8ad293
index eac955b4a..844776c5f 100644
8ad293
--- a/src/responder/nss/nss_cmd.c
8ad293
+++ b/src/responder/nss/nss_cmd.c
8ad293
@@ -121,7 +121,7 @@ static errno_t nss_getby_name(struct cli_ctx *cli_ctx,
8ad293
     subreq = nss_get_object_send(cmd_ctx, cli_ctx->ev, cli_ctx,
8ad293
                                  data, memcache, rawname, 0);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_get_object_send() failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -187,7 +187,7 @@ static errno_t nss_getby_id(struct cli_ctx *cli_ctx,
8ad293
     subreq = nss_get_object_send(cmd_ctx, cli_ctx->ev, cli_ctx,
8ad293
                                  data, memcache, NULL, id);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_get_object_send() failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -240,7 +240,7 @@ static errno_t nss_getby_svc(struct cli_ctx *cli_ctx,
8ad293
     subreq = nss_get_object_send(cmd_ctx, cli_ctx->ev, cli_ctx,
8ad293
                                  data, SSS_MC_NONE, NULL, 0);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_get_object_send() failed\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
@@ -376,7 +376,7 @@ static errno_t nss_getby_cert(struct cli_ctx *cli_ctx,
8ad293
     subreq = nss_get_object_send(cmd_ctx, cli_ctx->ev, cli_ctx,
8ad293
                                  data, SSS_MC_NONE, NULL, 0);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_get_object_send() failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -433,7 +433,7 @@ static errno_t nss_getby_sid(struct cli_ctx *cli_ctx,
8ad293
     subreq = nss_get_object_send(cmd_ctx, cli_ctx->ev, cli_ctx,
8ad293
                                  data, SSS_MC_NONE, NULL, 0);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_get_object_send() failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -488,7 +488,7 @@ static errno_t nss_getby_addr(struct cli_ctx *cli_ctx,
8ad293
     subreq = nss_get_object_send(cmd_ctx, cli_ctx->ev, cli_ctx,
8ad293
                                  data, memcache, NULL, 0);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_get_object_send() failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -640,7 +640,7 @@ static errno_t nss_setent(struct cli_ctx *cli_ctx,
8ad293
 
8ad293
     subreq = nss_setent_send(cli_ctx, cli_ctx->ev, cli_ctx, type, enum_ctx);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_setent_send() failed\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
@@ -697,7 +697,7 @@ static errno_t nss_getent(struct cli_ctx *cli_ctx,
8ad293
 
8ad293
     subreq = nss_setent_send(cli_ctx, cli_ctx->ev, cli_ctx, type, enum_ctx);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create setent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_setent_send() failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -829,7 +829,7 @@ static errno_t sss_nss_setnetgrent(struct cli_ctx *cli_ctx,
8ad293
     subreq = nss_setnetgrent_send(cli_ctx, cli_ctx->ev, cli_ctx, type,
8ad293
                                   nss_ctx->netgrent, state_ctx->netgroup);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_setnetgrent_send() failed\n");
8ad293
         ret = ENOMEM;
8ad293
         goto done;
8ad293
     }
8ad293
@@ -904,7 +904,7 @@ static errno_t nss_getnetgrent(struct cli_ctx *cli_ctx,
8ad293
                                   cmd_ctx->nss_ctx->netgrent,
8ad293
                                   cmd_ctx->state_ctx->netgroup);
8ad293
     if (subreq == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create tevent request!\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "nss_setnetgrent_send() failed\n");
8ad293
         return ENOMEM;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/nss/nss_iface.c b/src/responder/nss/nss_iface.c
8ad293
index a47b35fca..ab2ba926d 100644
8ad293
--- a/src/responder/nss/nss_iface.c
8ad293
+++ b/src/responder/nss/nss_iface.c
8ad293
@@ -67,7 +67,7 @@ nss_update_initgr_memcache(struct nss_ctx *nctx,
8ad293
     ret = sysdb_initgroups(tmp_ctx, dom, fq_name, &res;;
8ad293
     if (ret != EOK && ret != ENOENT) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "Failed to make request to our cache! [%d][%s]\n",
8ad293
+              "sysdb_initgroups() failed [%d][%s]\n",
8ad293
               ret, strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
@@ -234,7 +234,7 @@ nss_register_backend_iface(struct sbus_connection *conn,
8ad293
 
8ad293
     ret = sbus_connection_add_path(conn, SSS_BUS_PATH, &iface);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to register service interface"
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to register service interface"
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/nss/nss_protocol_netgr.c b/src/responder/nss/nss_protocol_netgr.c
8ad293
index 1e9959c72..274d43007 100644
8ad293
--- a/src/responder/nss/nss_protocol_netgr.c
8ad293
+++ b/src/responder/nss/nss_protocol_netgr.c
8ad293
@@ -159,7 +159,7 @@ nss_protocol_fill_netgrent(struct nss_ctx *nss_ctx,
8ad293
             ret = nss_protocol_fill_netgr_member(packet, entry, &rp);
8ad293
             break;
8ad293
         default:
8ad293
-            DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected value type!\n");
8ad293
+            DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected value type %d!\n", entry->type);
8ad293
             ret = ERR_INTERNAL;
8ad293
             break;
8ad293
         }
8ad293
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
8ad293
index 31a2750b1..e80104e3d 100644
8ad293
--- a/src/responder/nss/nsssrv.c
8ad293
+++ b/src/responder/nss/nsssrv.c
8ad293
@@ -347,7 +347,7 @@ nss_register_service_iface(struct nss_ctx *nss_ctx,
8ad293
 
8ad293
     ret = sbus_connection_add_path(rctx->mon_conn, SSS_BUS_PATH, &iface_svc);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to register service interface"
8ad293
+        DEBUG(SSSDBG_FATAL_FAILURE, "Unable to register service interface"
8ad293
               "[%d]: %s\n", ret, sss_strerror(ret));
8ad293
     }
8ad293
 
8ad293
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
8ad293
index d3f092b2b..c526f665b 100644
8ad293
--- a/src/responder/pam/pamsrv_cmd.c
8ad293
+++ b/src/responder/pam/pamsrv_cmd.c
8ad293
@@ -138,7 +138,7 @@ static void inform_user(struct pam_data* pd, const char *pam_message)
8ad293
     ret = pack_user_info_msg(pd, pam_message, &msg_len, &msg;;
8ad293
     if (ret != EOK) {
8ad293
         DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
-              "pack_user_info_account_expired failed.\n");
8ad293
+              "pack_user_info_msg failed.\n");
8ad293
     } else {
8ad293
         ret = pam_add_response(pd, SSS_PAM_USER_INFO, msg_len, msg);
8ad293
         if (ret != EOK) {
8ad293
diff --git a/src/responder/pam/pamsrv_p11.c b/src/responder/pam/pamsrv_p11.c
8ad293
index e1fd72e64..bf285c264 100644
8ad293
--- a/src/responder/pam/pamsrv_p11.c
8ad293
+++ b/src/responder/pam/pamsrv_p11.c
8ad293
@@ -425,7 +425,7 @@ bool may_do_cert_auth(struct pam_ctx *pctx, struct pam_data *pd)
8ad293
         }
8ad293
     }
8ad293
     if (pctx->smartcard_services[c] == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+        DEBUG(SSSDBG_CONF_SETTINGS,
8ad293
               "Smartcard authentication for service [%s] not supported.\n",
8ad293
               pd->service);
8ad293
         return false;
8ad293
@@ -810,7 +810,7 @@ struct tevent_req *pam_check_cert_send(TALLOC_CTX *mem_ctx,
8ad293
     } else if (pd->cmd == SSS_PAM_PREAUTH) {
8ad293
         extra_args[arg_c++] = "--pre";
8ad293
     } else {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected PAM command [%d}.\n", pd->cmd);
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected PAM command [%d].\n", pd->cmd);
8ad293
         ret = EINVAL;
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/sbus/router/sbus_router_handler.c b/src/sbus/router/sbus_router_handler.c
8ad293
index 91a84c51b..a92cf524b 100644
8ad293
--- a/src/sbus/router/sbus_router_handler.c
8ad293
+++ b/src/sbus/router/sbus_router_handler.c
8ad293
@@ -239,7 +239,8 @@ sbus_signal_handler(struct sbus_connection *conn,
8ad293
     list = sbus_router_listeners_lookup(router->listeners, meta->interface,
8ad293
                                         meta->member);
8ad293
     if (list == NULL) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "We do not listen to this signal!\n");
8ad293
+        /* Most probably not fully initialized yet */
8ad293
+        DEBUG(SSSDBG_FUNC_DATA, "We do not listen to this signal!\n");
8ad293
         return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/sss_iface/sss_iface.c b/src/sss_iface/sss_iface.c
8ad293
index e20c14fea..ed70e30eb 100644
8ad293
--- a/src/sss_iface/sss_iface.c
8ad293
+++ b/src/sss_iface/sss_iface.c
8ad293
@@ -116,8 +116,8 @@ sss_iface_connect_address(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     conn = sbus_connect_private(mem_ctx, ev, address,
8ad293
                                 conn_name, last_request_time);
8ad293
-    if (conn == NULL) {
8ad293
-        return ENOMEM;
8ad293
+    if (conn == NULL) { /* most probably sbus_dbus_connect_address() failed */
8ad293
+        return EFAULT;
8ad293
     }
8ad293
 
8ad293
     *_conn = conn;
8ad293
diff --git a/src/util/child_common.c b/src/util/child_common.c
8ad293
index 5cac725ca..7e8c30552 100644
8ad293
--- a/src/util/child_common.c
8ad293
+++ b/src/util/child_common.c
8ad293
@@ -768,7 +768,7 @@ void exec_child_ex(TALLOC_CTX *mem_ctx,
8ad293
                              binary, extra_argv, extra_args_only,
8ad293
                              &argv);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "prepare_child_argv.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "prepare_child_argv() failed.\n");
8ad293
         exit(EXIT_FAILURE);
8ad293
     }
8ad293
 
8ad293
diff --git a/src/util/debug.h b/src/util/debug.h
8ad293
index 20db0f5e4..43d36720f 100644
8ad293
--- a/src/util/debug.h
8ad293
+++ b/src/util/debug.h
8ad293
@@ -91,8 +91,8 @@ int get_fd_from_debug_file(void);
8ad293
 /* enables all debug levels;
8ad293
    0x0800 isn't used for historical reasons: 0x1FFF0 - 0x0800 = 0x1F7F0
8ad293
 */
8ad293
-#define SSSDBG_MASK_ALL       0x1F7F0
8ad293
-#define SSSDBG_DEFAULT        SSSDBG_FATAL_FAILURE
8ad293
+#define SSSDBG_MASK_ALL  0x1F7F0
8ad293
+#define SSSDBG_DEFAULT   (SSSDBG_FATAL_FAILURE|SSSDBG_CRIT_FAILURE|SSSDBG_OP_FAILURE)
8ad293
 
8ad293
 #define SSSDBG_TIMESTAMP_UNRESOLVED   -1
8ad293
 #define SSSDBG_TIMESTAMP_DEFAULT       1
8ad293
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c
8ad293
index 4d4726daa..57157861e 100644
8ad293
--- a/src/util/domain_info_utils.c
8ad293
+++ b/src/util/domain_info_utils.c
8ad293
@@ -207,7 +207,7 @@ find_domain_by_object_name_ex(struct sss_domain_info *domain,
8ad293
     ret = sss_parse_internal_fqname(tmp_ctx, object_name,
8ad293
                                     NULL, &domainname);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to parse name '%s' [%d]: %s\n",
8ad293
+        DEBUG(SSSDBG_MINOR_FAILURE, "Unable to parse name '%s' [%d]: %s\n",
8ad293
                                     object_name, ret, sss_strerror(ret));
8ad293
         goto done;
8ad293
     }
8ad293
diff --git a/src/util/server.c b/src/util/server.c
8ad293
index b27cbc155..869ed62a6 100644
8ad293
--- a/src/util/server.c
8ad293
+++ b/src/util/server.c
8ad293
@@ -374,7 +374,7 @@ static void te_server_hup(struct tevent_context *ev,
8ad293
     struct logrotate_ctx *lctx =
8ad293
             talloc_get_type(private_data, struct logrotate_ctx);
8ad293
 
8ad293
-    DEBUG(SSSDBG_CRIT_FAILURE, "Received SIGHUP. Rotating logfiles.\n");
8ad293
+    DEBUG(SSSDBG_IMPORTANT_INFO, "Received SIGHUP. Rotating logfiles.\n");
8ad293
 
8ad293
     ret = server_common_rotate_logs(lctx->confdb, lctx->confdb_path);
8ad293
     if (ret != EOK) {
8ad293
@@ -462,6 +462,7 @@ int server_setup(const char *name, int flags,
8ad293
     int watchdog_interval;
8ad293
     pid_t my_pid;
8ad293
     char *pidfile_name;
8ad293
+    int cfg_debug_level = SSSDBG_INVALID;
8ad293
 
8ad293
     my_pid = getpid();
8ad293
     ret = setpgid(my_pid, my_pid);
8ad293
@@ -588,20 +589,20 @@ int server_setup(const char *name, int flags,
8ad293
         /* set debug level if any in conf_entry */
8ad293
         ret = confdb_get_int(ctx->confdb_ctx, conf_entry,
8ad293
                              CONFDB_SERVICE_DEBUG_LEVEL,
8ad293
-                             SSSDBG_UNRESOLVED,
8ad293
-                             &debug_level);
8ad293
+                             SSSDBG_INVALID,
8ad293
+                             &cfg_debug_level);
8ad293
         if (ret != EOK) {
8ad293
             DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) "
8ad293
                                          "[%s]\n", ret, strerror(ret));
8ad293
             return ret;
8ad293
         }
8ad293
 
8ad293
-        if (debug_level == SSSDBG_UNRESOLVED) {
8ad293
+        if (cfg_debug_level == SSSDBG_INVALID) {
8ad293
             /* Check for the `debug` alias */
8ad293
             ret = confdb_get_int(ctx->confdb_ctx, conf_entry,
8ad293
                     CONFDB_SERVICE_DEBUG_LEVEL_ALIAS,
8ad293
                     SSSDBG_DEFAULT,
8ad293
-                    &debug_level);
8ad293
+                    &cfg_debug_level);
8ad293
             if (ret != EOK) {
8ad293
                 DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) "
8ad293
                                             "[%s]\n", ret, strerror(ret));
8ad293
@@ -609,7 +610,7 @@ int server_setup(const char *name, int flags,
8ad293
             }
8ad293
         }
8ad293
 
8ad293
-        debug_level = debug_convert_old_level(debug_level);
8ad293
+        debug_level = debug_convert_old_level(cfg_debug_level);
8ad293
     }
8ad293
 
8ad293
     /* same for debug timestamps */
8ad293
@@ -678,6 +679,8 @@ int server_setup(const char *name, int flags,
8ad293
             return ret;
8ad293
         }
8ad293
     }
8ad293
+    DEBUG(SSSDBG_IMPORTANT_INFO,
8ad293
+          "Starting with debug level = %#.4x\n", debug_level);
8ad293
 
8ad293
     /* Setup the internal watchdog */
8ad293
     ret = confdb_get_int(ctx->confdb_ctx, conf_entry,
8ad293
diff --git a/src/util/sss_sockets.c b/src/util/sss_sockets.c
8ad293
index c6504ae13..8944e2c4e 100644
8ad293
--- a/src/util/sss_sockets.c
8ad293
+++ b/src/util/sss_sockets.c
8ad293
@@ -322,7 +322,7 @@ struct tevent_req *sssd_async_socket_init_send(TALLOC_CTX *mem_ctx,
8ad293
 
8ad293
     ret = set_fcntl_flags(state->sd, FD_CLOEXEC, O_NONBLOCK);
8ad293
     if (ret != EOK) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "settting fd flags failed.\n");
8ad293
+        DEBUG(SSSDBG_CRIT_FAILURE, "setting fd flags failed.\n");
8ad293
         goto fail;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/util/string_utils.c b/src/util/string_utils.c
8ad293
index 1215ec96a..f54395a59 100644
8ad293
--- a/src/util/string_utils.c
8ad293
+++ b/src/util/string_utils.c
8ad293
@@ -90,7 +90,7 @@ errno_t guid_blob_to_string_buf(const uint8_t *blob, char *str_buf,
8ad293
     int ret;
8ad293
 
8ad293
     if (blob == NULL || str_buf == NULL || buf_size < GUID_STR_BUF_SIZE) {
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE, "Buffer too small.\n");
8ad293
+        DEBUG(SSSDBG_OP_FAILURE, "Buffer too small.\n");
8ad293
         return EINVAL;
8ad293
     }
8ad293
 
8ad293
diff --git a/src/util/util_errors.c b/src/util/util_errors.c
8ad293
index 05a66d293..b5c7419a9 100644
8ad293
--- a/src/util/util_errors.c
8ad293
+++ b/src/util/util_errors.c
8ad293
@@ -165,6 +165,7 @@ errno_t sss_ldb_error_to_errno(int ldberr)
8ad293
     case LDB_ERR_OPERATIONS_ERROR:
8ad293
         return EIO;
8ad293
     case LDB_ERR_NO_SUCH_OBJECT:
8ad293
+    case LDB_ERR_NO_SUCH_ATTRIBUTE:
8ad293
         return ENOENT;
8ad293
     case LDB_ERR_BUSY:
8ad293
         return EBUSY;
8ad293
@@ -174,7 +175,7 @@ errno_t sss_ldb_error_to_errno(int ldberr)
8ad293
     case LDB_ERR_INVALID_ATTRIBUTE_SYNTAX:
8ad293
         return EINVAL;
8ad293
     default:
8ad293
-        DEBUG(SSSDBG_CRIT_FAILURE,
8ad293
+        DEBUG(SSSDBG_MINOR_FAILURE,
8ad293
               "LDB returned unexpected error: [%i]\n",
8ad293
               ldberr);
8ad293
         return EFAULT;
8ad293
-- 
8ad293
2.21.3
8ad293