moved LOG_DEBUG messages to debug level 3 or higher

This commit is contained in:
Nikos Mavrogiannopoulos
2015-01-28 11:42:03 +01:00
parent b8bcf8b835
commit 6c8174668d
3 changed files with 8 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ void __attribute__ ((format(printf, 3, 4)))
const char* ip;
va_list args;
if (priority == LOG_DEBUG && ws->config->debug == 0)
if (priority == LOG_DEBUG && ws->config->debug < 3)
return;
if (priority == LOG_HTTP_DEBUG) {
@@ -139,7 +139,7 @@ void __attribute__ ((format(printf, 4, 5)))
const char* ip = NULL;
va_list args;
if (priority == LOG_DEBUG && s->config->debug == 0)
if (priority == LOG_DEBUG && s->config->debug < 3)
return;
if (priority == LOG_HTTP_DEBUG) {

View File

@@ -84,12 +84,12 @@ void cleanup_client_entries(sec_mod_st *sec);
#ifdef __GNUC__
# define seclog(sec, prio, fmt, ...) \
if (prio != LOG_DEBUG || sec->config->debug != 0) { \
if (prio != LOG_DEBUG || sec->config->debug >= 3) { \
syslog(prio, "sec-mod: "fmt, ##__VA_ARGS__); \
}
#else
# define seclog(sec,prio,...) \
if (prio != LOG_DEBUG || sec->config->debug != 0) { \
if (prio != LOG_DEBUG || sec->config->debug >= 3) { \
syslog(prio, __VA_ARGS__); \
}
#endif

View File

@@ -104,7 +104,7 @@ int check_upeer_id(const char *mod, int debug, int cfd, uid_t uid, uid_t gid, ui
return -1;
}
if (debug != 0)
if (debug >= 3)
syslog(LOG_DEBUG,
"%s: received request from pid %u and uid %u",
mod, (unsigned)cr.pid, (unsigned)cr.uid);
@@ -112,7 +112,7 @@ int check_upeer_id(const char *mod, int debug, int cfd, uid_t uid, uid_t gid, ui
if (ruid)
*ruid = cr.uid;
if (cr.uid != 0 && (cr.uid != uid || cr.gid != gid)) {
if (debug >= 3 && cr.uid != 0 && (cr.uid != uid || cr.gid != gid)) {
syslog(LOG_DEBUG,
"%s: received unauthorized request from pid %u and uid %u",
mod, (unsigned)cr.pid, (unsigned)cr.uid);
@@ -134,11 +134,11 @@ int check_upeer_id(const char *mod, int debug, int cfd, uid_t uid, uid_t gid, ui
if (ruid)
*ruid = euid;
if (debug = 0)
if (debug >= 3)
syslog(LOG_DEBUG,
"%s: received request from a processes with uid %u",
mod, (unsigned)euid);
if (euid != 0 && (euid != uid || egid != gid)) {
if (debug >= 3 && euid != 0 && (euid != uid || egid != gid)) {
syslog(LOG_DEBUG,
"%s: received unauthorized request from a process with uid %u",
mod, (unsigned)euid);