Scags / TF2-Jailbreak-Redux

A modified, rewritten version of the original TF2Jail. https://forums.alliedmods.net/showthread.php?p=2626905
GNU General Public License v3.0
23 stars 8 forks source link

Administrator permissions broken after loading TF2Jail_Redux #38

Closed uniacke1 closed 5 years ago

uniacke1 commented 5 years ago

Running latest master build as of this message, administrators are denied access to any command (e.g sm_admin) despite having permissions.

Using Sourcebans to manage admins, but flatfile also seems to exhibit this problem.

sm_dump_admcache shows admins correctly but at times there are duplicate empty entries for each one. Not sure whether that is relevant.

I've found that if an administrator is already in game before the plugin is loaded, their permissions continue to work. However, if they connect afterwards, their permissions are no longer available and they will get access denied errors.

Sourcemod 1.9.0, administrators work fine with all other plugins loaded and only disabling TF2Jail.

Scags commented 5 years ago

TF2JR doesn't/shouldn't be setting any admin flags, only reading them. Have you tried compiling the plugin locally? If that doesn't work then I don't know what else to tell you.

uniacke1 commented 5 years ago

I have (since we wanted to disable sniper), same result, both with and without sourcebans.inc in the compile step. I agree it does not make sense given the code; the only thing I can possibly think of is that it is inserting itself somewhere that sourcemod does not expect and/or intercepting something that needs to be passed on...or the sourcemod admin cache is getting corrupted somehow.

FWIW the old JB plugin doesn't seem to have this issue. Is there a way I can get you a debug dump of some kind that might be informative?

Sourcemod 1.9.0 git 6259, if it helps.

Scags commented 5 years ago

If by that you mean sending me something, go for it I guess. johnmascagni@gmail.com

uniacke1 commented 5 years ago

Sorry, I don't have anything to send; I was asking whether there was e.g. a debug log of some kind on your plugin that I could enable and would be informative to help figure out what's going on. If not, I'm also out of ideas as to what's going on; I see nothing in the error or server logs that suggest plugin malfunctions of this plugin or others.

Scags commented 5 years ago

Hah ok, I misread your statement. As of now, no there isn't really anything debug-esque stuff in the plugin really. This is all strange because there's a bunch of stuff that's been happening in the plugin that I really can't explain; see #34, #17 and #10. You could try maybe updating your compiler and SourceMod if you haven't already. It might just be "one of those things". Also I'm sorry to here about this. Kinda sucks when you're checking out a new plugin and your server suddenly explodes.

uniacke1 commented 5 years ago

Interesting... I wonder if this is an extension of #10 and somehow the administration system implodes... I did see the below output in the logs at one point, but it does not happen all the time.

No worries, I do sofware dev as a day job so I've had my fair share of true "WTF" issues that make no logical sense whatsoever... I feel your pain and wish you the best in finding the source.

While I'm not overly familiar with SP development (so this may not even be possible here)... at least in C++ this kind of stuff has all the hallmarks of either uninitialized memory, or going out of bounds and overwriting somebody else's memory.

What SM branch are you using? if 1.9 I'l try updating to latest git snapshot, if 1.10 I can try switching to that.


L 10/20/2018 - 03:52:04: [SM] Exception reported: Client 1 is not authorized L 10/20/2018 - 03:52:04: [SM] Blaming: sourcebans.smx L 10/20/2018 - 03:52:04: [SM] Call stack trace: L 10/20/2018 - 03:52:04: [SM] [0] RunAdminCacheChecks L 10/20/2018 - 03:52:04: [SM] [1] Line 2161, D:\htdocs\sourcebans\trunk\game_upload\addons\sourcemod\scripting\sourcebans.sp::CheckLoadAdmins L 10/20/2018 - 03:52:04: [SM] [2] Line 1746, D:\htdocs\sourcebans\trunk\game_upload\addons\sourcemod\scripting\sourcebans.sp::GroupsDone L 10/20/2018 - 03:52:04: [SM] Exception reported: Client 1 is not authorized L 10/20/2018 - 03:52:04: [SM] Blaming: sourcebans.smx L 10/20/2018 - 03:52:04: [SM] Call stack trace: L 10/20/2018 - 03:52:04: [SM] [0] RunAdminCacheChecks L 10/20/2018 - 03:52:04: [SM] [1] Line 2161, D:\htdocs\sourcebans\trunk\game_upload\addons\sourcemod\scripting\sourcebans.sp::CheckLoadAdmins L 10/20/2018 - 03:52:04: [SM] [2] Line 1656, D:\htdocs\sourcebans\trunk\game_upload\addons\sourcemod\scripting\sourcebans.sp::AdminsDone L 10/20/2018 - 03:53:57: SourceMod error session started

Scags commented 5 years ago

Running on 1.9.0.6256 You can try 1.10, let me know if anything changes. SP code essentially calls into C++ code, so your theory makes complete sense. Hell you might be on the bullseye; it's probably a matter of where and how. The plugin does a hefty amount of memory management, I'm not sure if it's something internal or just a goof that's staring us in the face.

uniacke1 commented 5 years ago

I'll try that, hopefully I can get to it in the next few days

uniacke1 commented 5 years ago

Changing to 1.10 seems to have fixed it.

Scags commented 5 years ago

Good to hear. I'll try 1.10 on my side and see if that fixes any other bugs in the plugin.