Server Help

ASSS Questions - security.so request for the latest asss 64 bit

the_snake - Thu May 19, 2011 2:32 am
Post subject: security.so request for the latest asss 64 bit
Hey there,

I require the latest security.so in order to run the security modules.

I have the latest asss 64 bit build provided by Jowie..

If anyone could provide me with it, it would be much appreciated..

thanks,

Snake
JoWie - Thu May 19, 2011 4:46 am
Post subject:
latest build = hg clone https://bitbucket.org/grelminar/asss
Arnk Kilo Dylie - Sun May 22, 2011 8:28 pm
Post subject:
He means the security.so module..

Sorry for not seeing this sooner, I didn't realize I logged out so it looked like the forum had no activity.

I'll try to cook something up for you this week. Thanks. I encourage you to bug me in game on Arnk Dylie too because I have many distractions to deal with.
Samapico - Mon May 23, 2011 5:26 pm
Post subject:
Hmmm, is this why I get this also?


I <cmod> loading C module 'security' from 'security'
E <cmod> error in dlopen: /home/parallel/private_content/subspace/asss/zone/bin/security.so: wrong ELF class: ELFCLASS32

My host just moved to a 64bit server... ?

Edit: Ok, the_snake helped me out... i can run the server now, but we'll need the real one eventually icon_smile.gif
Samapico - Wed May 25, 2011 7:59 am
Post subject:
On a side note, what does it do when we use enc_null? Do the passwords end up in plain text somewhere or something?
Arnk Kilo Dylie - Thu May 26, 2011 10:42 pm
Post subject:
My linux-carrying HD is disabled probably due to bad cable but it could be worse

so it'll be a bit longer, have to find the time to install linux on my other HD
JoWie - Mon May 30, 2011 8:04 am
Post subject:
Samapico wrote:
On a side note, what does it do when we use enc_null? Do the passwords end up in plain text somewhere or something?


if you load enc_null someone could modify packets with a simple proxy. Passwords are plaintext unless you are on SSC
Arnk Kilo Dylie - Wed Jun 01, 2011 9:16 pm
Post subject:
I am looking into getting a new install, but I had a work snafu this weekend and I am going to try to be super careful to not mess up my windows install with a one-HD dual-boot solution so it's going to be this weekend. If not, I will go out and buy a cable to power the old drive.

Thank you for your continued patience -.-
Arnk Kilo Dylie - Mon Jun 06, 2011 9:53 pm
Post subject:
https://bitbucket.org/grelminar/asss/downloads

they were built using asss tip...so if you're building from that it will be okay. if you need something else, maybe you should be upgrading instead because this security.so includes the arenarefcount patch which changes up the binary format anyway.. hopefully there won't be anymore things like that

let me know though

i386 = should be compatible on any 32-bit intel thingy
x86_64 = 64-bit
Samapico - Mon Jun 06, 2011 11:00 pm
Post subject:
Cool thanks. I'll hook it up as soon as I can and tell you how it goes biggrin.gif
the_snake - Tue Jun 07, 2011 5:35 am
Post subject:
thansk a lot!

seems to be working properly!
Cheese - Tue Jun 07, 2011 6:17 pm
Post subject:
works

also why the hell doesnt it allow .so files on the forum
Samapico - Tue Jun 07, 2011 7:31 pm
Post subject:
I <cmod> loading C module 'enc_cont' from 'security'
E <cmod> error loading module 'enc_cont'
Unrecoverable error (5): Error in loading module 'security:enc_cont'
*** asss exited: error loading modules


What am I doing wrong? icon_surprised.gif I renamed security_x86-64.so to security.so and overwrite the old security.so

My modules.conf (cut off after the enc_ stuff):
Code: Show/Hide

unixsignal

deadlock

prng
logman
log_console
mainloop
config
log_file
playerdata
lagdata

bw_default
net
chatnet

arenaman
mapdata
capman
mapnewsdl
core
clientset
scoring:persist
idle

cmdman
; obscene
chat
cmdlist:cmdlist

scoring:stats
scoring:basicstats

log_sysop
log_staff

;; enable this for password security without a billing server:
auth_file

security:security
directory
; billing
;; if you're using a billing server, you'll probably want to use this:
; billing_ssc

; funky:auth_prefix
;; enable this for ?kick:
auth_ban

banners
game_timer
flagcore
balls
bricks
koth
game
freqman

lagaction

cfghelp
filetrans
quickfix

scoring:jackpot
scoring:periodic
scoring:points_kill
scoring:points_flag
scoring:points_goal


turf:turf_reward
turf:turf_stats
turf:points_turf_reward

playercmd
admincmd
help
notify
sendfile

funky:autowarp
funky:brickwriter
buy

fake
funky:autoturret
funky:record
;; adds compatibility for a bunch of subgame commands:
funky:sgcompat

;; uncomment this for multiple pub arena support:
; ap_multipub

;; important: enc_null cannot coexist with either of the other
;; encryption modules! comment it out to use them.
;enc_null
security:enc_cont
enc_vie

Dr Brain - Tue Jun 07, 2011 7:58 pm
Post subject:
Are you running against source from the bitbucket tip? As arnk mentioned, there were some binary incompatibilities introduced that could potentially cause trouble for older versions.

EDIT: you've got the right modules, and I doubt you're running out of memory. Any of the other potential errors print stuff to the log & console, which would be hard to miss.
Samapico - Tue Jun 07, 2011 8:26 pm
Post subject:
I grabbed that source again... but...

am I the only one having this issue:

In defs.h, there's this:

/** ship mask values, notably for use with freqman enforcers */
/* pyconst: define int, "SHIPMASK_*" */

A couple lines later, there's this:

/** use this macro to check whether a certain ship is marked in the mask */
#define SHIPMASK_HAS(ship, mask) ((mask) & (1 << (ship)))


So.... python stuff are giving me errors when I build because it thinks SHIPMASK_HAS is a constant, while it's not :/

I was able to work around that by moving that def to whatever part of the code was using it, but I have to do it again now icon_sad.gif

There's another similar case, in core.h:
/* pyconst: define int, "AUTH_*" */

...

#define AUTH_IS_OK(a) \
((a) == AUTH_OK || (a) == AUTH_SPECONLY || (a) == AUTH_NOSCORES || (a) == AUTH_ASKDEMOGRAPHICS)
Samapico - Tue Jun 07, 2011 8:50 pm
Post subject:
Still can't load enc_cont...

I only grabbed the stuff in the 'src' folder of the tip... is there something else I'd need?
Dr Brain - Tue Jun 07, 2011 10:02 pm
Post subject:
Not sure exactly what's up with those, but try copying the stuff from scripts/ as well. Perhaps the python parsing stuff was updated.
Samapico - Tue Jun 07, 2011 10:16 pm
Post subject:
Still no luck icon_sad.gif


Why do I always get the weirdest bugs... bleh...
Cheese - Tue Jun 07, 2011 11:49 pm
Post subject:
pro tip:
thats the message you get when you try to run the 32 bit security.so on a 64 bit system
JoWie - Wed Jun 08, 2011 7:04 am
Post subject:
"Error in loading module" only occurs if the module returns MM_FAIL (=1)
(in theory it could also occur if the module forgets to pass a return value, but the compiler should warn about that).
If you see that error, the dynamic library was properly loaded, so he has the correct architecture.

The error message about an incorrect architecture would probably look like "<cmod> error in dlopen: ..." (linux) or "<cmod> error in LoadLibrary: .." (windows).
Dr Brain - Wed Jun 08, 2011 7:17 am
Post subject:
Samapico wrote:
Still no luck icon_sad.gif


Were you able to get things compiled, or are you still having trouble with that?
Samapico - Wed Jun 08, 2011 8:17 am
Post subject:
With the 32 bit version it said this:
I <cmod> loading C module 'security' from 'security'
E <cmod> error in dlopen: /home/parallel/private_content/subspace/asss/zone/bin/security.so: wrong ELF class: ELFCLASS32




Everything compiles fine (after moving the SHIPMASK_HAS and AUTH_IS_OK macros, as explained above... I also added a macro that changes 'stricmp' to 'strcasecmp' because it only exists on Win32...)

The compiler wouldn't necessarily warn about a missing return MM_OK... I had that issue with the hosted game core module, the code looked like this, and apparently i was the only one having issues with it tongue.gif

Code: Show/Hide

else if (action == MM_DETACH)
    {
        //Data
        hgcore_adata *ad = P_ARENA_DATA(arena, adkey);
        if(ad->Status != HGS_IDLE)
        {
            CleanupGame(arena);
        }
        pthread_mutex_lock(&globalmutex);
        LLFree(ad->Teams);
        HashFree(ad->Players);
        pthread_mutex_unlock(&globalmutex);
        afree(ad->cfg_AllowedGames);

        //Timers

        //Callbacks
        mm->UnregCallback(CB_PLAYERACTION, PlayerAction, arena);
        mm->UnregCallback(CB_SHIPCHANGE, ShipChange, arena);
        mm->UnregCallback(CB_FREQCHANGE, FreqChange, arena);
        mm->UnregCallback(CB_ARENAACTION, ArenaAction, arena);

        //Commands
        cmd->RemoveCommand("newgame", C_newgame, arena);
        cmd->RemoveCommand("addteam", C_addteam, arena);
        cmd->RemoveCommand("removeteam", C_removeteam, arena);
        cmd->RemoveCommand("showteams", C_showteams, arena);
        cmd->RemoveCommand("startgame", C_startgame, arena);
        cmd->RemoveCommand("stopgame", C_stopgame, arena);
        cmd->RemoveCommand("listgames", C_listgames, arena);
        cmd->RemoveCommand("switchgame", C_switchgame, arena);
        cmd->RemoveCommand("pausegame", C_pausegame, arena);
        cmd->RemoveCommand("resumegame", C_resumegame, arena);

   *** MISSING RETURN MM_OK HERE ***

    }
    else if (action == MM_PREUNLOAD) //server is shutting down
    {
        Link *link;
        Arena *a;
        aman->Lock();
        FOR_EACH_ARENA(a)
        {
            EndGame(a, HGR_FORCED);
            DetachGame(a);
        }
        aman->Unlock();

      *** MISSING RETURN MM_OK HERE ***
    }

    return MM_FAIL;

JoWie - Wed Jun 08, 2011 8:30 am
Post subject:
That is because there is still a return MM_FAIL.

If you did something like this (which is valid C):
Code: Show/Hide

int bla()
{
   printf("bla!\n")
}

int ret = bla();

The value of ret is undefined, usually it is whatever is left in the registry.
So it is possible that the return value becomes 1 (MM_FAIL).

This is similar to getting a local variable without ever setting it.
Code: Show/Hide

int bla()
{
   int abc;
   printf("bla! %d\n", abc)
}

Samapico - Wed Jun 08, 2011 10:13 am
Post subject:
I know that... I was using it to refute this:
Quote:
(in theory it could also occur if the module forgets to pass a return value, but the compiler should warn about that).


Most modules have a return MM_FAIL at the end, so if you forget the return MM_OK, you don't get any compiler warning
Dr Brain - Wed Jun 08, 2011 5:24 pm
Post subject:
That's not the case in this module. After all, no one else has had this problem, and the module has been used for 8+ years pretty much unchanged.

There are only two reasons that it can fail in this manner (i.e. returning MM_FAIL). Either it fails to get one of lm, playerdata, mainloop or net. Or, far less likely, pd->AllocatePlayerData fails.

So operating under the assumption that it's failing to get one of those 4 modules, the most likely is that you've got different a different header file than one used to compile security.so.

My suggestion is to clone a new copy of the repository using mercurial, rather than upgrading your current one piecemeal. Show any compiler errors that appear (after setting system.mk), as they indicate something's broken.
JoWie - Wed Jun 08, 2011 6:26 pm
Post subject:
You could check your source to see if the following interface definitions match:
Quote:

playerdata-8
arenaman-9
net-10
config-4
mainloop-3
logman-2
clientset-5
mapdata-9
capman-4
lagcollect-4
prng-2


An easy way to check this is to use <py> exec:
Code: Show/Hide

?py print(I_PLAYERDATA)
?py print(I_NET)
check mainloop manually
?py print(I_LOGMAN)

Samapico - Wed Jun 08, 2011 10:15 pm
Post subject:
JoWie wrote:

An easy way to check this is to use <py> exec:
Code: Show/Hide

?py print(I_PLAYERDATA)
?py print(I_NET)
check mainloop manually
?py print(I_LOGMAN)
uuuuh.... where do you type that? These look like ?server commands... but it doesn't make sense to type server commands when the server doesn't work... I'm confused :>
Cheese - Wed Jun 08, 2011 11:27 pm
Post subject:
lolpwnt
Dr Brain - Thu Jun 09, 2011 6:42 am
Post subject:
Load up enc_null and enter. I think you have to load the python exec module too.
Samapico - Thu Jun 09, 2011 8:56 pm
Post subject:
JoWie wrote:
You could check your source to see if the following interface definitions match:
Quote:

playerdata-8
arenaman-9
net-10
config-4
mainloop-3
logman-2
clientset-5
mapdata-9
capman-4
lagcollect-4
prng-2


An easy way to check this is to use <py> exec:
Code: Show/Hide

?py print(I_PLAYERDATA)
?py print(I_NET)
check mainloop manually
?py print(I_LOGMAN)

I searched for the #define's directly in the source code, and all of them match exactly
Dr Brain - Thu Jun 09, 2011 10:48 pm
Post subject:
The question is more along the lines of "Does your source match your binaries?"

I don't know what else could be the issue except that.
Samapico - Thu Jun 09, 2011 10:54 pm
Post subject:
Oh I see... well... ?py print's all return the same values :/
JoWie - Fri Jun 10, 2011 6:09 am
Post subject:
is your loading order correct?
Samapico - Fri Jun 10, 2011 7:40 am
Post subject:
Code: Show/Hide
;; this file contains the names of modules to load at startup. modules
;; are specified as 'modname' for internal modules, or
;; 'file:modulename'. file is the name of the .so file (without the
;; .so).
;;
;; the load order of some of these is very sensitive. don't move stuff
;; around without verifying that it's a valid load order.

unixsignal

deadlock

prng
logman
log_console
mainloop
config
log_file
playerdata
lagdata

bw_default
net
chatnet

arenaman
mapdata
capman
mapnewsdl
core
clientset
scoring:persist
idle

cmdman
; obscene
chat
cmdlist:cmdlist

scoring:stats
scoring:basicstats

log_sysop
log_staff

;; enable this for password security without a billing server:
auth_file

security:security
directory
; billing
;; if you're using a billing server, you'll probably want to use this:
; billing_ssc

; funky:auth_prefix
;; enable this for ?kick:
auth_ban

banners
game_timer
flagcore
balls
bricks
koth
game
freqman

lagaction

cfghelp
filetrans
quickfix

scoring:jackpot
scoring:periodic
scoring:points_kill
scoring:points_flag
scoring:points_goal


turf:turf_reward
turf:turf_stats
turf:points_turf_reward

playercmd
admincmd
help
notify
sendfile

funky:autowarp
funky:brickwriter
buy

fake
funky:autoturret
funky:record
;; adds compatibility for a bunch of subgame commands:
funky:sgcompat

;; uncomment this for multiple pub arena support:
; ap_multipub


;;-------------
;; important: enc_null cannot coexist with either of the other
;; encryption modules! comment it out to use them.
enc_null
;security:enc_cont
;enc_vie

; ^
; WORKS
;
;;--- OR ---
;enc_null
security:enc_cont
enc_vie

;^
; does not work
;;-------------


;; alias database stuff:
; database:mysql
; database:aliasdb

;; python modules:
;; pymod must be loaded before any "<py>" modules.
pymod:pymod
; <py> fm_password
<py> exec
; <py> fg_wz
; <py> fg_turf

objects


colors:colors
;colors:say
;colors:voice
doors:doors

lvzhud:lvzhud
ball_motion:ball_motion

sockey:sockey

hosted:hgcore
hosted:hg_race

Cheese - Fri Jun 10, 2011 3:52 pm
Post subject:
jesus christ theres code tags for a reason
Samapico - Fri Jun 10, 2011 5:42 pm
Post subject:
I was in a hurry tongue.gif
Dr Brain - Fri Jun 10, 2011 7:00 pm
Post subject:
The only other option is that the scrty stuff is failing, but it gives you large warning messages on the console and in the log about that.

Post the log of it during startup and we can cross another thing off the list.
Samapico - Fri Jun 10, 2011 7:53 pm
Post subject:
Well, the log of it is just 'Loading xxxxxxxxxxx....' for all the modules before, and then the generic 'failed to load module' for that one :/

Code: Show/Hide
asss 1.5.0 built at Jun  7 2011 22:14:36
Loading modules...
I <cmod> loading C module 'unixsignal' from 'internal'
I <cmod> loading C module 'deadlock' from 'internal'
I <cmod> loading C module 'prng' from 'internal'
I <cmod> loading C module 'logman' from 'internal'
I <cmod> loading C module 'mainloop' from 'internal'
I <cmod> loading C module 'config' from 'internal'
I <cmod> loading C module 'log_file' from 'internal'
I <cmod> loading C module 'playerdata' from 'internal'
I <cmod> loading C module 'lagdata' from 'internal'
I <cmod> loading C module 'bw_default' from 'internal'
I <cmod> loading C module 'net' from 'internal'
I <cmod> loading C module 'chatnet' from 'internal'
I <cmod> loading C module 'arenaman' from 'internal'
I <cmod> loading C module 'mapdata' from 'internal'
I <cmod> loading C module 'capman' from 'internal'
I <cmod> loading C module 'mapnewsdl' from 'internal'
I <cmod> loading C module 'core' from 'internal'
I <cmod> loading C module 'clientset' from 'internal'
I <cmod> loading C module 'persist' from 'scoring'
I <cmod> loading C module 'idle' from 'internal'
I <cmod> loading C module 'cmdman' from 'internal'
I <cmod> loading C module 'chat' from 'internal'
I <cmod> loading C module 'stats' from 'scoring'
I <cmod> loading C module 'basicstats' from 'scoring'
I <cmod> loading C module 'log_sysop' from 'internal'
I <cmod> loading C module 'log_staff' from 'internal'
I <cmod> loading C module 'auth_file' from 'internal'
I <cmod> loading C module 'security' from 'security'
I <cmod> loading C module 'directory' from 'internal'
I <cmod> loading C module 'auth_ban' from 'internal'
I <cmod> loading C module 'banners' from 'internal'
I <cmod> loading C module 'game_timer' from 'internal'
I <cmod> loading C module 'flagcore' from 'internal'
I <cmod> loading C module 'balls' from 'internal'
I <cmod> loading C module 'bricks' from 'internal'
I <cmod> loading C module 'koth' from 'internal'
I <cmod> loading C module 'game' from 'internal'
I <cmod> loading C module 'freqman' from 'internal'
I <cmod> loading C module 'lagaction' from 'internal'
I <cmod> loading C module 'cfghelp' from 'internal'
I <cmod> loading C module 'filetrans' from 'internal'
I <cmod> loading C module 'quickfix' from 'internal'
I <cmod> loading C module 'jackpot' from 'scoring'
I <cmod> loading C module 'periodic' from 'scoring'
I <cmod> loading C module 'points_kill' from 'scoring'
I <cmod> loading C module 'points_flag' from 'scoring'
I <cmod> loading C module 'points_goal' from 'scoring'
I <cmod> loading C module 'turf_reward' from 'turf'
I <cmod> loading C module 'turf_stats' from 'turf'
I <cmod> loading C module 'points_turf_reward' from 'turf'
I <cmod> loading C module 'playercmd' from 'internal'
I <cmod> loading C module 'admincmd' from 'internal'
I <cmod> loading C module 'help' from 'internal'
I <cmod> loading C module 'notify' from 'internal'
I <cmod> loading C module 'sendfile' from 'internal'
I <cmod> loading C module 'autowarp' from 'funky'
I <cmod> loading C module 'brickwriter' from 'funky'
I <cmod> loading C module 'buy' from 'internal'
I <cmod> loading C module 'fake' from 'internal'
I <cmod> loading C module 'autoturret' from 'funky'
I <cmod> loading C module 'record' from 'funky'
I <cmod> loading C module 'sgcompat' from 'funky'
I <cmod> loading C module 'enc_cont' from 'security'
E <cmod> error loading module 'enc_cont'
Unrecoverable error (5): Error in loading module 'security:enc_cont'


Edit: When using enc_null, I got a map checksum mismatch warning for myself after a few seconds in the pub arena... if that can be a clue for anything (probably not)
Arnk Kilo Dylie - Fri Jun 10, 2011 9:36 pm
Post subject:
I'll add explicit error logging to this module when I get some time then.

Don't think you can use security with enc_null...
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group