aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService/GatekeeperService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/HypergridService/GatekeeperService.cs')
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 5c6abd2..019bab8 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -62,6 +62,7 @@ namespace OpenSim.Services.HypergridService
62 62
63 private static string m_AllowedClients = string.Empty; 63 private static string m_AllowedClients = string.Empty;
64 private static string m_DeniedClients = string.Empty; 64 private static string m_DeniedClients = string.Empty;
65 private static string m_DeniedMacs = string.Empty;
65 private static bool m_ForeignAgentsAllowed = true; 66 private static bool m_ForeignAgentsAllowed = true;
66 private static List<string> m_ForeignsAllowedExceptions = new List<string>(); 67 private static List<string> m_ForeignsAllowedExceptions = new List<string>();
67 private static List<string> m_ForeignsDisallowedExceptions = new List<string>(); 68 private static List<string> m_ForeignsDisallowedExceptions = new List<string>();
@@ -137,6 +138,8 @@ namespace OpenSim.Services.HypergridService
137 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty); 138 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
138 m_DeniedClients = Util.GetConfigVarFromSections<string>( 139 m_DeniedClients = Util.GetConfigVarFromSections<string>(
139 config, "DeniedClients", possibleAccessControlConfigSections, string.Empty); 140 config, "DeniedClients", possibleAccessControlConfigSections, string.Empty);
141 m_DeniedMacs = Util.GetConfigVarFromSections<string>(
142 config, "DeniedMacs", possibleAccessControlConfigSections, string.Empty);
140 m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true); 143 m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true);
141 144
142 LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions); 145 LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions);
@@ -275,6 +278,8 @@ namespace OpenSim.Services.HypergridService
275 (source == null) ? "Unknown" : string.Format("{0} ({1}){2}", source.RegionName, source.RegionID, (source.RawServerURI == null) ? "" : " @ " + source.ServerURI)); 278 (source == null) ? "Unknown" : string.Format("{0} ({1}){2}", source.RegionName, source.RegionID, (source.RawServerURI == null) ? "" : " @ " + source.ServerURI));
276 279
277 string curViewer = Util.GetViewerName(aCircuit); 280 string curViewer = Util.GetViewerName(aCircuit);
281 string curMac = aCircuit.Mac.ToString();
282
278 283
279 // 284 //
280 // Check client 285 // Check client
@@ -304,6 +309,17 @@ namespace OpenSim.Services.HypergridService
304 return false; 309 return false;
305 } 310 }
306 } 311 }
312
313 if (m_DeniedMacs != string.Empty)
314 {
315 m_log.InfoFormat("[GATEKEEPER SERVICE]: Checking users Mac {0} against list of denied macs {1} ...", curMac, m_DeniedMacs);
316 if (m_DeniedMacs.Contains(curMac))
317 {
318 reason = "Login failed: client with Mac " + curMac + " is denied";
319 m_log.InfoFormat("[GATEKEEPER SERVICE]: Login failed, reason: client with mac {0} is denied", curMac);
320 return false;
321 }
322 }
307 323
308 // 324 //
309 // Authenticate the user 325 // Authenticate the user