New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux cgame, ui, jampgame DLLs no longer installed by default #643
Comments
|
I'll try to look into this this evening if nobody has spotted the cause by then - all three MP-relevant DLLs are missing, so it looks as though maybe |
|
Relatedly, to make this work optimally, should I be installing the DLLs in |
|
This is related to my changes to the CMake files to build the PK3 file at build time. I was working on Windows to get this working and forgot about the implications to Linux and OS X! d4cc979 is where I made the changes.
I don't think there's any advantange or disadvantage of having them symlinked. They will be kept in a read-only place anyway, and they can be overridden by individual users so they will almost never need to be touched. |
|
The symlink is an irrelevant implementation detail; my question would be the same if I was just copying the DLLs' file contents instead. My question is, should I have |
|
OK, I see what's happened. Thanks for pointing me to the relevant commit. The "else" clause for "we are not building a Mac application bundle" has got lost; I'll bring it back. Is it acceptable for the DLLs to be installed as non-PK3'd files (next to openjk.pk3) for all platforms, or do you specifically want to avoid them existing outside a PK3 file on Windows? |
|
For now I've put it back to how it was before (Windows and non-Mac-bundle Unix both install DLLs, to OpenJK only). If either of those is not ideal, it's easy to change. |
|
MP won't try to load the DLLs from openjk mod folder unless its set to fs_game OpenJK. And since there was no Linux version of cgame and ui I'm not yet sure what to do for defaults. |
|
On Windows/Mac, is the intention to be treating OpenJK like an unofficial patch for JA (i.e. overwriting bits of JA), or setting it up so you can use Raven's DLLs with the OpenJK engine when playing on (or serving) an OpenJK server, or what? On platforms where JA/JK2 didn't exist before OpenJK (Linux, or anything else non-Windows non-Mac if people port it) I suspect the best way might be to install the DLLs to |
Is your intention that people should do that, or not? My assumption had been that the normal setup would be to leave both fs_game and fs_basegame unset, so the engine ends up loading everything from the fallback path (base). |
|
I'm still alive! DLLs in the PK3I've forgotten which OSs are able to extract the DLLs from PK3 files, so I'll assume that only Windows can extract from the PK3 for now. The intention of my commit was to automatically put the DLLs into a PK3. This is something which our Windows build server does as an extra step after compiling the DLLs, and having it as part of the CMake script means that the PK3 can be auto-generated when running CPack to make the installation files. The Linux and OS X build servers don't do this as far as I know. For Windows, this is fine as the DLLs can be extracted from the PK3. For OS X, you'll notice that I left the DLL placementOpenJK is meant to be a drop-in replacement for JK game binaries, but without altering any of the existing gameplay (where possible). This means that the DLLs should be kept in the However, there might not be an existing DLL for some platforms or some architectures so like you say, there needs to be a fallback. In this scenario, a copy of the OpenJK DLLs should be placed in the
|
What's the intention here? Is the idea that you can send an updated or modded ui/cgame to users of a server, or perhaps even send the OpenJK ui/cgame to vanilla clients? Although it looks as though this doesn't affect the platform I'm mostly interested in, I should perhaps remind you that in the presence of auto-downloading, this is a security vulnerability: downloading arbitrary native code from a remote server and running it with your own privileges means that the server operator, or anyone who can interfere with the Internet route from the server to you, can control your computer entirely. In Quake III Arena (and hence ioquake3) it isn't quite so bad, because the QVM bytecode interpreter is somewhat sandboxed, and the engine doesn't unpack DLLs from PK3s or allow QVM bytecode to write to any file with the platform's DLL extension (although it's probably still possible for a determined attacker to break out of the sandbox).
Right, and you copy them to both
As opposed to OpenJK's
OK, so turning that around, you basically want to avoid altering At this point, with JA a decade old and (AIUI) known security vulnerabilities in its version of the Q3 engine, I would be inclined to say the official JA Linux dedicated server is just a bad idea, and 32-bit Linux users should copy their PK3s into a "clean" OpenJK installation; so I don't think special-casing i386 Linux is necessary, or a particularly good idea. Many Linux users will prefer open-source code over binaries anyway, and it's not as if anyone not technically-inclined will have been using the existing Linux dedicated server, whereas the Windows and Mac clients have lots of non-technical users. |
|
Yes the intention is for pure server usage and downloading same as qvm mods in q3. At least on Windows from Raven. |
|
But generally all servers disable downloading because of the other exploits that were unfixed in the original versions. |
The usual convention is for mods to package everything into PK3s, and many existing mods do this already. I guess the security vulnerability is not something we have (or at least, I had) ever considered. It's always been the case that this was possible. In the retail version of JO/JA, the DLLs are stored in the
I don't think we ever decided on what to do! But I would be okay with using OpenJK as the canonical folder name.
Unfortunately there's some political reasons with not doing this. There's a reasonably sized following (I don't have numbers, but at a guess, a third or a quarter of all JKA players) who will not play anything other than the vanilla MP game. They claim that by recompiling the code, the lightsaber combat feels subtly different. Now, this might be due to any number of reasons such as the RNG being slightly different, bugs in the code which exhibit slightly different behaviour with the specific compiler that was used at the time, placebo effect, we don't know and it's not something anybody has fully investigated before. I don't think it's a good idea to rattle the cage so to speak, so I think it's best to leave the existing Having said that (and not wanting to delete all my text!), I suppose we could replace the jampgame DLL in base and if players do want to setup a vanilla "base" server, they can overwrite our DLL. |
Well, you've made a decision whether you intended to or not :-) The source code says so that's where Linux builds look. Keeping it as-is seems easier than changing it.
I'll open one.
That's what I'd recommend - it's much simpler, and it gently pushes people in the direction of running code where security flaws are fixable. But if you want the special case, I can just undo it in the Debian package (I'm using symlinks instead of copying anyway, to save a small amount of disk space). I've pushed some more commits to #644. |
|
Now resolved, except for worries about the security of Sys_UnpackDLL(), which are #646. |
Last time I did a build for Debian (from commit 471dd02) I could configure cmake with
and then
make install DESTDIR=$(pwd)/debian/tmpwould leave me with these files in debian/tmp, where*is a wildcard for architecture-dependent bits and.sois the Linux equivalent of.dll:(and then I split up JA and JK2 between base directories /usr/lib/openjk-academy and /usr/lib/openjk-outcast so they don't try to use each other's files, but that's in the Debian packaging not the upstream bit).
In current builds I get a new empty zip file at
openjk.pk3, but I no longer get the cgame, ui or jampgame DLLs.Unpacking DLLs from the pk3 file is not implemented on Linux, so it's OK that it's empty - as far as I'm concerned, if this worked, it would be a security vulnerability (because auto-downloading exists, and arbitrary native code execution from unauthenticated auto-downloaded packages is a bad thing) so I would like to continue to use DLLs that are ordinary files in the filesystem.
The text was updated successfully, but these errors were encountered: