diff options
author | norrarvid <norrarvid@gmail.com> | 2012-05-27 17:17:39 +0200 |
---|---|---|
committer | norrarvid <norrarvid@gmail.com> | 2012-05-27 17:17:39 +0200 |
commit | 4d4ebbf3632bed609b41a9d36969c08d36791417 (patch) | |
tree | 3c81398b71442617a3897f00f3be400b6fdd29d3 /sesman/access.c | |
parent | 900a2541ca94b5c4cb839c3bd6d35e6460ca1c48 (diff) | |
download | xrdp-proprietary-4d4ebbf3632bed609b41a9d36969c08d36791417.tar.gz xrdp-proprietary-4d4ebbf3632bed609b41a9d36969c08d36791417.zip |
Initial syslog support in XRDP
Diffstat (limited to 'sesman/access.c')
-rw-r--r-- | sesman/access.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sesman/access.c b/sesman/access.c index f4bfd30a..0037de3f 100644 --- a/sesman/access.c +++ b/sesman/access.c @@ -38,33 +38,33 @@ access_login_allowed(char* user) if ((0 == g_strncmp(user, "root", 5)) && (0 == g_cfg->sec.allow_root)) { - log_message(&(g_cfg->log), LOG_LEVEL_WARNING, + log_message(LOG_LEVEL_WARNING, "ROOT login attempted, but root login is disabled"); return 0; } if (0 == g_cfg->sec.ts_users_enable) { - LOG_DBG(&(g_cfg->log), "Terminal Server Users group is disabled, allowing authentication", + LOG_DBG("Terminal Server Users group is disabled, allowing authentication", 1); return 1; } if (0 != g_getuser_info(user, &gid, 0, 0, 0, 0)) { - log_message(&(g_cfg->log), LOG_LEVEL_ERROR, "Cannot read user info! - login denied"); + log_message(LOG_LEVEL_ERROR, "Cannot read user info! - login denied"); return 0; } if (g_cfg->sec.ts_users == gid) { - LOG_DBG(&(g_cfg->log), "ts_users is user's primary group"); + LOG_DBG("ts_users is user's primary group"); return 1; } if (0 != g_check_user_in_group(user, g_cfg->sec.ts_users, &ok)) { - log_message(&(g_cfg->log), LOG_LEVEL_ERROR, "Cannot read group info! - login denied"); + log_message(LOG_LEVEL_ERROR, "Cannot read group info! - login denied"); return 0; } @@ -73,7 +73,7 @@ access_login_allowed(char* user) return 1; } - log_message(&(g_cfg->log), LOG_LEVEL_INFO, "login denied for user %s", user); + log_message(LOG_LEVEL_INFO, "login denied for user %s", user); return 0; } @@ -87,33 +87,33 @@ access_login_mng_allowed(char* user) if ((0 == g_strncmp(user, "root", 5)) && (0 == g_cfg->sec.allow_root)) { - log_message(&(g_cfg->log), LOG_LEVEL_WARNING, + log_message(LOG_LEVEL_WARNING, "[MNG] ROOT login attempted, but root login is disabled"); return 0; } if (0 == g_cfg->sec.ts_admins_enable) { - LOG_DBG(&(g_cfg->log), "[MNG] Terminal Server Admin group is disabled, allowing authentication", - 1); + LOG_DBG("[MNG] Terminal Server Admin group is disabled," + "allowing authentication",1); return 1; } if (0 != g_getuser_info(user, &gid, 0, 0, 0, 0)) { - log_message(&(g_cfg->log), LOG_LEVEL_ERROR, "[MNG] Cannot read user info! - login denied"); + log_message(LOG_LEVEL_ERROR, "[MNG] Cannot read user info! - login denied"); return 0; } if (g_cfg->sec.ts_admins == gid) { - LOG_DBG(&(g_cfg->log), "[MNG] ts_users is user's primary group"); + LOG_DBG("[MNG] ts_users is user's primary group"); return 1; } if (0 != g_check_user_in_group(user, g_cfg->sec.ts_admins, &ok)) { - log_message(&(g_cfg->log), LOG_LEVEL_ERROR, "[MNG] Cannot read group info! - login denied"); + log_message(LOG_LEVEL_ERROR, "[MNG] Cannot read group info! - login denied"); return 0; } @@ -122,7 +122,7 @@ access_login_mng_allowed(char* user) return 1; } - log_message(&(g_cfg->log), LOG_LEVEL_INFO, "[MNG] login denied for user %s", user); + log_message(LOG_LEVEL_INFO, "[MNG] login denied for user %s", user); return 0; } |