199 lines
7.1 KiB
Diff
199 lines
7.1 KiB
Diff
From 0cddb67128edc86be4163489e29eaa3c4e123b7b Mon Sep 17 00:00:00 2001
|
|
From: Alexey Tikhonov <atikhono@redhat.com>
|
|
Date: Fri, 12 Mar 2021 19:27:12 +0100
|
|
Subject: [PATCH] DEBUG: introduce SSSDBG_TOOLS_DEFAULT
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Resolves: https://github.com/SSSD/sssd/issues/5488
|
|
|
|
Reviewed-by: Tomáš Halman <thalman@redhat.com>
|
|
---
|
|
src/sss_client/ssh/sss_ssh_authorizedkeys.c | 2 +-
|
|
src/sss_client/ssh/sss_ssh_knownhostsproxy.c | 2 +-
|
|
src/tools/common/sss_tools.c | 2 +-
|
|
src/tools/sss_cache.c | 2 +-
|
|
src/tools/sss_groupadd.c | 2 +-
|
|
src/tools/sss_groupdel.c | 2 +-
|
|
src/tools/sss_groupmod.c | 2 +-
|
|
src/tools/sss_groupshow.c | 2 +-
|
|
src/tools/sss_seed.c | 2 +-
|
|
src/tools/sss_useradd.c | 2 +-
|
|
src/tools/sss_userdel.c | 2 +-
|
|
src/tools/sss_usermod.c | 2 +-
|
|
src/util/debug.h | 1 +
|
|
13 files changed, 13 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/src/sss_client/ssh/sss_ssh_authorizedkeys.c b/src/sss_client/ssh/sss_ssh_authorizedkeys.c
|
|
index e356f28c3..324e5e3a3 100644
|
|
--- a/src/sss_client/ssh/sss_ssh_authorizedkeys.c
|
|
+++ b/src/sss_client/ssh/sss_ssh_authorizedkeys.c
|
|
@@ -32,7 +32,7 @@
|
|
int main(int argc, const char **argv)
|
|
{
|
|
TALLOC_CTX *mem_ctx = NULL;
|
|
- int pc_debug = SSSDBG_FATAL_FAILURE;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
const char *pc_domain = NULL;
|
|
const char *pc_user = NULL;
|
|
struct poptOption long_options[] = {
|
|
diff --git a/src/sss_client/ssh/sss_ssh_knownhostsproxy.c b/src/sss_client/ssh/sss_ssh_knownhostsproxy.c
|
|
index 3cd12b480..170ba30a3 100644
|
|
--- a/src/sss_client/ssh/sss_ssh_knownhostsproxy.c
|
|
+++ b/src/sss_client/ssh/sss_ssh_knownhostsproxy.c
|
|
@@ -174,7 +174,7 @@ connect_proxy_command(char **args)
|
|
int main(int argc, const char **argv)
|
|
{
|
|
TALLOC_CTX *mem_ctx = NULL;
|
|
- int pc_debug = SSSDBG_FATAL_FAILURE;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
int pc_port = 22;
|
|
const char *pc_domain = NULL;
|
|
const char *pc_host = NULL;
|
|
diff --git a/src/tools/common/sss_tools.c b/src/tools/common/sss_tools.c
|
|
index 368d09ae2..637e251f6 100644
|
|
--- a/src/tools/common/sss_tools.c
|
|
+++ b/src/tools/common/sss_tools.c
|
|
@@ -56,7 +56,7 @@ static void sss_tool_common_opts(struct sss_tool_ctx *tool_ctx,
|
|
int *argc, const char **argv)
|
|
{
|
|
poptContext pc;
|
|
- int debug = SSSDBG_DEFAULT;
|
|
+ int debug = SSSDBG_TOOLS_DEFAULT;
|
|
int orig_argc = *argc;
|
|
int help = 0;
|
|
|
|
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
|
|
index cea900bf1..b5391b16d 100644
|
|
--- a/src/tools/sss_cache.c
|
|
+++ b/src/tools/sss_cache.c
|
|
@@ -709,7 +709,7 @@ static errno_t init_context(int argc, const char *argv[],
|
|
struct cache_tool_ctx *ctx = NULL;
|
|
int idb = INVALIDATE_NONE;
|
|
struct input_values values = { 0 };
|
|
- int debug = SSSDBG_DEFAULT;
|
|
+ int debug = SSSDBG_TOOLS_DEFAULT;
|
|
errno_t ret = EOK;
|
|
|
|
poptContext pc = NULL;
|
|
diff --git a/src/tools/sss_groupadd.c b/src/tools/sss_groupadd.c
|
|
index f71d6dde7..91559116d 100644
|
|
--- a/src/tools/sss_groupadd.c
|
|
+++ b/src/tools/sss_groupadd.c
|
|
@@ -34,7 +34,7 @@
|
|
int main(int argc, const char **argv)
|
|
{
|
|
gid_t pc_gid = 0;
|
|
- int pc_debug = SSSDBG_DEFAULT;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
struct poptOption long_options[] = {
|
|
POPT_AUTOHELP
|
|
{ "debug",'\0', POPT_ARG_INT | POPT_ARGFLAG_DOC_HIDDEN, &pc_debug,
|
|
diff --git a/src/tools/sss_groupdel.c b/src/tools/sss_groupdel.c
|
|
index 5dcc2056d..e64441758 100644
|
|
--- a/src/tools/sss_groupdel.c
|
|
+++ b/src/tools/sss_groupdel.c
|
|
@@ -33,7 +33,7 @@
|
|
int main(int argc, const char **argv)
|
|
{
|
|
int ret = EXIT_SUCCESS;
|
|
- int pc_debug = SSSDBG_DEFAULT;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
const char *pc_groupname = NULL;
|
|
struct tools_ctx *tctx = NULL;
|
|
|
|
diff --git a/src/tools/sss_groupmod.c b/src/tools/sss_groupmod.c
|
|
index eddc7034a..8770b6684 100644
|
|
--- a/src/tools/sss_groupmod.c
|
|
+++ b/src/tools/sss_groupmod.c
|
|
@@ -35,7 +35,7 @@
|
|
int main(int argc, const char **argv)
|
|
{
|
|
gid_t pc_gid = 0;
|
|
- int pc_debug = SSSDBG_DEFAULT;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
struct poptOption long_options[] = {
|
|
POPT_AUTOHELP
|
|
{ "debug", '\0', POPT_ARG_INT | POPT_ARGFLAG_DOC_HIDDEN, &pc_debug,
|
|
diff --git a/src/tools/sss_groupshow.c b/src/tools/sss_groupshow.c
|
|
index 7b0fbe117..aa618eecb 100644
|
|
--- a/src/tools/sss_groupshow.c
|
|
+++ b/src/tools/sss_groupshow.c
|
|
@@ -654,7 +654,7 @@ static void print_recursive(struct group_info **group_members, unsigned level)
|
|
int main(int argc, const char **argv)
|
|
{
|
|
int ret = EXIT_SUCCESS;
|
|
- int pc_debug = SSSDBG_DEFAULT;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
bool pc_recursive = false;
|
|
const char *pc_groupname = NULL;
|
|
struct tools_ctx *tctx = NULL;
|
|
diff --git a/src/tools/sss_seed.c b/src/tools/sss_seed.c
|
|
index 1189604a3..17ba81956 100644
|
|
--- a/src/tools/sss_seed.c
|
|
+++ b/src/tools/sss_seed.c
|
|
@@ -460,7 +460,7 @@ static int seed_init(TALLOC_CTX *mem_ctx,
|
|
struct seed_ctx **_sctx)
|
|
{
|
|
TALLOC_CTX *tmp_ctx = NULL;
|
|
- int pc_debug = SSSDBG_DEFAULT;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
const char *pc_domain = NULL;
|
|
const char *pc_name = NULL;
|
|
uid_t pc_uid = 0;
|
|
diff --git a/src/tools/sss_useradd.c b/src/tools/sss_useradd.c
|
|
index ca2cbd6c1..fa1091ec8 100644
|
|
--- a/src/tools/sss_useradd.c
|
|
+++ b/src/tools/sss_useradd.c
|
|
@@ -38,7 +38,7 @@ int main(int argc, const char **argv)
|
|
const char *pc_gecos = NULL;
|
|
const char *pc_home = NULL;
|
|
char *pc_shell = NULL;
|
|
- int pc_debug = SSSDBG_DEFAULT;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
int pc_create_home = 0;
|
|
const char *pc_username = NULL;
|
|
const char *pc_skeldir = NULL;
|
|
diff --git a/src/tools/sss_userdel.c b/src/tools/sss_userdel.c
|
|
index bd703fd2e..60bb0f835 100644
|
|
--- a/src/tools/sss_userdel.c
|
|
+++ b/src/tools/sss_userdel.c
|
|
@@ -125,7 +125,7 @@ int main(int argc, const char **argv)
|
|
struct tools_ctx *tctx = NULL;
|
|
const char *pc_username = NULL;
|
|
|
|
- int pc_debug = SSSDBG_DEFAULT;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
int pc_remove = 0;
|
|
int pc_force = 0;
|
|
int pc_kick = 0;
|
|
diff --git a/src/tools/sss_usermod.c b/src/tools/sss_usermod.c
|
|
index 6a818f13a..0f3230d27 100644
|
|
--- a/src/tools/sss_usermod.c
|
|
+++ b/src/tools/sss_usermod.c
|
|
@@ -40,7 +40,7 @@ int main(int argc, const char **argv)
|
|
char *pc_gecos = NULL;
|
|
char *pc_home = NULL;
|
|
char *pc_shell = NULL;
|
|
- int pc_debug = SSSDBG_DEFAULT;
|
|
+ int pc_debug = SSSDBG_TOOLS_DEFAULT;
|
|
const char *pc_selinux_user = NULL;
|
|
struct poptOption long_options[] = {
|
|
POPT_AUTOHELP
|
|
diff --git a/src/util/debug.h b/src/util/debug.h
|
|
index a3adfe576..54a7e3934 100644
|
|
--- a/src/util/debug.h
|
|
+++ b/src/util/debug.h
|
|
@@ -108,6 +108,7 @@ int rotate_debug_files(void);
|
|
#define SSSDBG_INVALID -1
|
|
#define SSSDBG_UNRESOLVED 0
|
|
#define SSSDBG_DEFAULT (SSSDBG_FATAL_FAILURE|SSSDBG_CRIT_FAILURE|SSSDBG_OP_FAILURE)
|
|
+#define SSSDBG_TOOLS_DEFAULT (SSSDBG_FATAL_FAILURE)
|
|
|
|
|
|
/** \def DEBUG(level, format, ...)
|
|
--
|
|
2.26.3
|
|
|