mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
moved LOG_DEBUG messages to debug level 3 or higher
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user