summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/selinux.c14
-rw-r--r--src/tools/sss_cache.c2
-rw-r--r--src/tools/sss_groupadd.c2
-rw-r--r--src/tools/sss_groupdel.c2
-rw-r--r--src/tools/sss_groupmod.c2
-rw-r--r--src/tools/sss_groupshow.c2
-rw-r--r--src/tools/sss_useradd.c2
-rw-r--r--src/tools/sss_userdel.c2
-rw-r--r--src/tools/sss_usermod.c2
9 files changed, 9 insertions, 21 deletions
diff --git a/src/tools/selinux.c b/src/tools/selinux.c
index 45672d1b..8eb19a23 100644
--- a/src/tools/selinux.c
+++ b/src/tools/selinux.c
@@ -121,19 +121,7 @@ static void sss_semanage_error_callback(void *varg,
return;
}
- if (level <= debug_level) {
- if (debug_timestamps) {
- time_t rightnow = time(NULL);
- char stamp[25];
- memcpy(stamp, ctime(&rightnow), 24);
- stamp[24] = '\0';
- debug_fn("(%s) [%s] [libsemanage] (%d): %s\n",
- stamp, debug_prg_name, level, message);
- } else {
- debug_fn("[%s] [libsemanage] (%d): %s\n",
- debug_prg_name, level, message);
- }
- }
+ DEBUG_MSG(level, "libsemanage", message);
free(message);
}
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
index 37b60c89..7f45ebb8 100644
--- a/src/tools/sss_cache.c
+++ b/src/tools/sss_cache.c
@@ -300,7 +300,7 @@ errno_t init_context(int argc, const char *argv[], struct cache_tool_ctx **tctx)
BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
}
- debug_level = debug;
+ debug_level = debug_convert_old_level(debug);
debug_prg_name = argv[0];
CHECK_ROOT(ret, debug_prg_name);
diff --git a/src/tools/sss_groupadd.c b/src/tools/sss_groupadd.c
index 8817625d..90b1d08f 100644
--- a/src/tools/sss_groupadd.c
+++ b/src/tools/sss_groupadd.c
@@ -65,7 +65,7 @@ int main(int argc, const char **argv)
BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
}
- debug_level = pc_debug;
+ debug_level = debug_convert_old_level(pc_debug);
/* groupname is an argument, not option */
pc_groupname = poptGetArg(pc);
diff --git a/src/tools/sss_groupdel.c b/src/tools/sss_groupdel.c
index c9af565c..49c5ad34 100644
--- a/src/tools/sss_groupdel.c
+++ b/src/tools/sss_groupdel.c
@@ -61,7 +61,7 @@ int main(int argc, const char **argv)
BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
}
- debug_level = pc_debug;
+ debug_level = debug_convert_old_level(pc_debug);
pc_groupname = poptGetArg(pc);
if (pc_groupname == NULL) {
diff --git a/src/tools/sss_groupmod.c b/src/tools/sss_groupmod.c
index 48701adf..bea57f87 100644
--- a/src/tools/sss_groupmod.c
+++ b/src/tools/sss_groupmod.c
@@ -98,7 +98,7 @@ int main(int argc, const char **argv)
BAD_POPT_PARAMS(pc, _("Specify group to modify\n"), ret, fini);
}
- debug_level = pc_debug;
+ debug_level = debug_convert_old_level(pc_debug);
CHECK_ROOT(ret, debug_prg_name);
diff --git a/src/tools/sss_groupshow.c b/src/tools/sss_groupshow.c
index a5702b58..40af95cc 100644
--- a/src/tools/sss_groupshow.c
+++ b/src/tools/sss_groupshow.c
@@ -639,7 +639,7 @@ int main(int argc, const char **argv)
}
}
- debug_level = pc_debug;
+ debug_level = debug_convert_old_level(pc_debug);
if (ret != -1) {
BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
diff --git a/src/tools/sss_useradd.c b/src/tools/sss_useradd.c
index 8de4816f..3b035163 100644
--- a/src/tools/sss_useradd.c
+++ b/src/tools/sss_useradd.c
@@ -96,7 +96,7 @@ int main(int argc, const char **argv)
}
}
- debug_level = pc_debug;
+ debug_level = debug_convert_old_level(pc_debug);
if (ret != -1) {
BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
diff --git a/src/tools/sss_userdel.c b/src/tools/sss_userdel.c
index c5010e34..1de40690 100644
--- a/src/tools/sss_userdel.c
+++ b/src/tools/sss_userdel.c
@@ -173,7 +173,7 @@ int main(int argc, const char **argv)
}
}
- debug_level = pc_debug;
+ debug_level = debug_convert_old_level(pc_debug);
if (ret != -1) {
BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
diff --git a/src/tools/sss_usermod.c b/src/tools/sss_usermod.c
index e6d54d58..50fb0a0e 100644
--- a/src/tools/sss_usermod.c
+++ b/src/tools/sss_usermod.c
@@ -109,7 +109,7 @@ int main(int argc, const char **argv)
BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
}
- debug_level = pc_debug;
+ debug_level = debug_convert_old_level(pc_debug);
/* username is an argument without --option */
pc_username = poptGetArg(pc);