Minkata source code

Discussions about the OpenUru.org Minkata test shard

Moderator: rarified

Post Reply
Boq
Member
Posts: 3
Joined: Tue Feb 21, 2012 10:07 pm

Minkata source code

Post by Boq »

While looking through Jenkins logs (like this one http://foundry.openuru.org/hudson/job/C ... /3/console) I noticed that there are some patches applied just before compilation. Are they available anywhere? And even if they are published, wouldn't it be easier and less confusing to just put everything in main repository?

Looks like those are mostly keys and product names, so they may be hidden for security purposes, but they are still part of code that is used to compile released binary (GPL applies).
User avatar
rarified
Member
Posts: 1061
Joined: Tue Dec 16, 2008 10:48 pm
Location: Colorado, US

Re: Minkata source code

Post by rarified »

Your hypothesis is correct, the patches "configure" the generic CWE source with the URLs, hostnames and IP addresses, encryption keys, and logging levels of the Minkata client. Nothing more.

Here is a sanitized copy of the first patch applied (sans the encryption keys):
Spoiler

Code: Select all

diff -r af2228c6af23 .hgignore
--- a/.hgignore Mon Jan 23 19:51:24 2012 -0700
+++ b/.hgignore Fri Feb 03 16:48:35 2012 -0700
@@ -0,0 +1,8 @@
+syntax: glob
+*.ncb
+*.suo
+Release/
+Debug/
+syntax: regexp
+^MOULOpenSourceClientPlugin/Plasma20/test/
+^MOULOpenSourceClientPlugin/StaticSDKs/
diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/winmain.cpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/winmain.cpp      Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/winmain.cpp      Fri Feb 03 16:48:35 2012 -0700
@@ -88,7 +88,7 @@
 #if BUILD_TYPE == BUILD_TYPE_DEV
        #define STATUS_PATH L"www2.cyanworlds.com"
 #else
-       #define STATUS_PATH L"support.cyanworlds.com"
+       #define STATUS_PATH L"foundry.openuru.org"
 #endif

 //
@@ -1415,7 +1415,7 @@
                        }
                        else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_URULOGIN_GAMETAPLINK)
                        {
-                               ShellExecute(NULL, "open", "http://www.mystonline.com/signup.html", NULL, NULL, SW_SHOWNORMAL);
+                               ShellExecute(NULL, "open", "http://foundry.openuru.org/forms/index.php", NULL, NULL, SW_SHOWNORMAL);

                                return TRUE;
                        }
diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plUruLauncher/Main.cpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plUruLauncher/Main.cpp    Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plUruLauncher/Main.cpp    Fri Feb 03 16:48:35 2012 -0700
@@ -58,7 +58,7 @@
 #if BUILD_TYPE == BUILD_TYPE_DEV
        #define STATUS_PATH L"www2.cyanworlds.com"
 #else
-       #define STATUS_PATH L"support.cyanworlds.com"
+       #define STATUS_PATH L"foundry.openuru.org"
 #endif


diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp      Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp      Fri Feb 03 16:48:35 2012 -0700
@@ -73,7 +73,7 @@
 #elif BUILD_TYPE == BUILD_TYPE_BETA
        L"beta-auth.urulive.com"
 #elif BUILD_TYPE == BUILD_TYPE_LIVE
-       L"184.73.198.22"  //L"auth.urulive.com"
+       L"foundry.openuru.org"  //L"auth.urulive.com"
 #else
 # error "Unknown build type"
 #endif
@@ -99,7 +99,7 @@
 #elif BUILD_TYPE == BUILD_TYPE_BETA
        L"beta-file.urulive.com"
 #elif BUILD_TYPE == BUILD_TYPE_LIVE
-       L"67.202.54.141" //unused
+       L"foundry.openuru.org" //unused
 #else
 # error "Unknown build type"
 #endif
@@ -151,7 +151,7 @@
 #elif BUILD_TYPE == BUILD_TYPE_BETA
        L"beta-csr.urulive.com"
 #elif BUILD_TYPE == BUILD_TYPE_LIVE
-       L"184.73.198.22"
+       L"foundry.openuru.org"
 #else
 # error "Unknown build type"
 #endif
diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbAuthKey.hpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbAuthKey.hpp   Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbAuthKey.hpp   Fri Feb 03 16:48:35 2012 -0700
...OMITTED...
diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbGameKey.hpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbGameKey.hpp   Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbGameKey.hpp   Fri Feb 03 16:48:35 2012 -0700
...OMITTED...
diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbGateKeeperKey.hpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbGateKeeperKey.hpp     Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnNetBase/pnNbGateKeeperKey.hpp     Fri Feb 03 16:48:35 2012 -0700
...OMITTED...
diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp Fri Feb 03 16:48:35 2012 -0700
@@ -60,7 +60,8 @@
 namespace Uru {
     static const wchar kCoreName[]     = L"UruLive";
     static const wchar kShortName[]    = L"UruLive";
-    static const wchar kLongName[]     = L"Uru Live";
+//  static const wchar kLongName[]     = L"Uru Live";
+    static const wchar kLongName[]     = L"Uru Live Minkata Shard";
     static const Uuid  kId(L"ea489821-6c35-4bd0-9dae-bb17c585e680");
 }

diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp Fri Feb 03 16:48:35 2012 -0700
@@ -48,7 +48,7 @@
 #include "Pch.h"
 #pragma hdrstop

-#if defined(PLASMA_EXTERNAL_RELEASE) && (BUILD_TYPE == BUILD_TYPE_LIVE)
+#if 0//Minkata//defined(PLASMA_EXTERNAL_RELEASE) && (BUILD_TYPE == BUILD_TYPE_LIVE)
        // If this is an external live build then don't write log files
        #define ACELOG_NO_LOG_FILES
 #endif
diff -r af2228c6af23 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp Mon Jan 23 19:51:24 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp Fri Feb 03 16:48:35 2012 -0700
@@ -392,7 +392,7 @@
 //// plStatusLog ////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////

-#if defined(PLASMA_EXTERNAL_RELEASE) && (BUILD_TYPE == BUILD_TYPE_LIVE)
+#if 0//Minkata//defined(PLASMA_EXTERNAL_RELEASE) && (BUILD_TYPE == BUILD_TYPE_LIVE)
 // If this is an external live build then don't write log files
 UInt32 plStatusLog::fLoggingOff = true;
 #else
@@ -466,7 +466,7 @@
                wchar* ext=nil;
                IParseFileName(file, fileNoExt, &ext);
                fEncryptMe = false;
-#ifdef PLASMA_EXTERNAL_RELEASE
+#if 0//Minkata//def PLASMA_EXTERNAL_RELEASE
                fEncryptMe = ( wcsicmp( fFilename.c_str(), L"chat.log" ) != 0 ) ? true : false;
                if( fEncryptMe )
                        ext = L".elf";
diff -r 2a3419e38fc2 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/winmain.cpp
--- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/winmain.cpp      Mon Jan 23 20:40:32 2012 -0700
+++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/winmain.cpp      Mon Jan 23 20:41:48 2012 -0700
@@ -145,7 +145,7 @@
 //============================================================================
 // External patcher file
 //============================================================================
-#ifdef PLASMA_EXTERNAL_RELEASE
+#if 0//Minkata//def PLASMA_EXTERNAL_RELEASE

 static wchar s_patcherExeName[] = L"UruLauncher.exe";

@@ -919,7 +919,7 @@

 void DebugMsgF(const char* format, ...)
 {
-#ifndef PLASMA_EXTERNAL_RELEASE
+#if 1//Minkata//ndef PLASMA_EXTERNAL_RELEASE
        va_list args;
        va_start(args, format);

@@ -1131,7 +1131,7 @@
                wchar fileAndPath[MAX_PATH];
                PathGetInitDirectory(fileAndPath, arrsize(fileAndPath));
                PathAddFilename(fileAndPath, fileAndPath, L"login.dat", arrsize(fileAndPath));
-#ifndef PLASMA_EXTERNAL_RELEASE
+#if 1//Minkata//ndef PLASMA_EXTERNAL_RELEASE
                // internal builds can use the local init directory
                wchar localFileAndPath[MAX_PATH];
                StrCopy(localFileAndPath, L"init\\login.dat", arrsize(localFileAndPath));
@@ -1169,7 +1169,7 @@
                                wchar fileAndPath[MAX_PATH];
                                PathGetInitDirectory(fileAndPath, arrsize(fileAndPath));
                                PathAddFilename(fileAndPath, fileAndPath, L"login.dat", arrsize(fileAndPath));
-#ifndef PLASMA_EXTERNAL_RELEASE
+#if 1//Minkata//ndef PLASMA_EXTERNAL_RELEASE
                                // internal builds can use the local init directory
                                wchar localFileAndPath[MAX_PATH];
                                StrCopy(localFileAndPath, L"init\\login.dat", arrsize(localFileAndPath));
@@ -1587,7 +1587,7 @@
        cmdParser.Parse();

        bool doIntroDialogs = true;
-#ifndef PLASMA_EXTERNAL_RELEASE
+#if 1//Minkata//ndef PLASMA_EXTERNAL_RELEASE
        if(cmdParser.IsSpecified(kArgSkipLoginDialog))
                doIntroDialogs = false;
        if(cmdParser.IsSpecified(kArgLocalData))
@@ -1627,7 +1627,7 @@

        TGDoCiderDetection ();

-#ifdef PLASMA_EXTERNAL_RELEASE
+#if 1//Minkata//def PLASMA_EXTERNAL_RELEASE
        // if the client was started directly, run the patcher, and shutdown
        STARTUPINFOW si;
        PROCESS_INFORMATION pi;
@@ -1956,7 +1956,7 @@
 {
        bool expired = false;

-#ifndef PLASMA_EXTERNAL_RELEASE
+#if 1//Minkata//ndef PLASMA_EXTERNAL_RELEASE
        char ourPath[MAX_PATH];
        GetModuleFileName(NULL, ourPath, sizeof(ourPath));
        DWORD ok = 0;

The other two patches were additional configuration steps that should not have occurred; I'm going to remove them (they changed the built executable into an INTERNAL client).

We can make the patch file available (but I'm going to hold back the keys) as a link on the website, and/or I can make the modified files available as downloadable artifacts from Jenkins.

_R
One of the OpenUru toolsmiths... a bookbinder.
User avatar
Hoikas
Member
Posts: 344
Joined: Fri Jun 03, 2011 8:38 pm

Re: Minkata source code

Post by Hoikas »

The keys are still part of the source code -- they must be released.
Image
Christian Walther
Member
Posts: 317
Joined: Sat Dec 13, 2008 10:54 am

Re: Minkata source code

Post by Christian Walther »

I have wondered about this too. What’s the reason for doing it this way rather than simply having everything in the repository?

Why the reluctance to publish the keys? Apart from the fact that they are published already as part of the client binary, there’s no security risk involved with publishing a public key. It’s called public for a reason.
Boq
Member
Posts: 3
Joined: Tue Feb 21, 2012 10:07 pm

Re: Minkata source code

Post by Boq »

rarified wrote:The other two patches were additional configuration steps that should not have occurred; I'm going to remove them (they changed the built executable into an INTERNAL client).
But they are part of current, already released build. So just to be on the safe side, can you make those other two patches available?
User avatar
Hoikas
Member
Posts: 344
Joined: Fri Jun 03, 2011 8:38 pm

Re: Minkata source code

Post by Hoikas »

There is still a patch being applied that we don't have the unabridged source of.

Has there been any progress on this issue? By my calculations, Minkata has been on the wrong side of the GPL for at least a year and a half.
Image
User avatar
JWPlatt
Member
Posts: 1137
Joined: Sun Dec 07, 2008 7:32 pm
Location: Everywhere, all at once

Re: Minkata source code

Post by JWPlatt »

Did you mean to use this link?
http://foundry.openuru.org/hudson/job/C ... uilder/77/

To which issue do you refer and what's missing? Rarified probably knows, but a little elaboration might help.
Perfect speed is being there.
User avatar
Hoikas
Member
Posts: 344
Joined: Fri Jun 03, 2011 8:38 pm

Re: Minkata source code

Post by Hoikas »

There is a patch file called "minkata-local-1.patch" (EDIT: there are a few more patches, now that I read the build log more closely) that is being applied to Minkata builds--the latest instance of which can be seen in the link I posted. Approximately 1.5 years ago, we received a truncated version of this patch. Specifically, the public keys have been omitted. This omission doesn't play well with the GPL, which requires all the source code to be available such that we can produce identical client builds.

I expect that the patch as been around for so long and is automated so well, this is just one of those details that slipped through the cracks. Especially since we established that sharing public keys isn't a security issue*. If we can get it into the Minkata repository or posted in its entirety, I'll be happy. :)

* The fact that the client uses a broken encryption algorithm that is also encumbered by patents (RC4) is really a bigger issue as far as security goes than publishing keys. But that's a discussion for another day.
Image
User avatar
rarified
Member
Posts: 1061
Joined: Tue Dec 16, 2008 10:48 pm
Location: Colorado, US

Re: Minkata source code

Post by rarified »

The patches in question are designed to configure changes for specific, orthogonal feature sets. For example one patch replaces the MOULa encryption keys with Minkata. Another changes the site-specific attributes such as IP addresses, domain names, etc. Another changes logging levels at various points in the client.

Each patch may or may not be selected depending on the characteristics selected for a particular build. There are patches that would not be likely to be seen in a public build, such as building an internal client or one with extremely verbose debug logging.

Rather than maintain a seperate CWE-Minkata repository with a mesh of patched versions based on each baseline version I went with an approach to patch the common and established public repositories in the build system.

However, you are correct that this does not meet the needs of the GPL. So for a while I have been including copies of the affected source files in the build artifacts that are available for each build. That way the exact source that matches the build is bundled with the distribution of the binary programs. For example the latest build results are available here. Drilling down the Build Artifacts link will bring you to the page where the Minkata installer for that build is present. But additionally there is a directory structure under the MOULOpenSourceClientPlugin link, which if followed will provide access to all the individual binary build artifacts such as the http://foundry.openuru.org/hudson/job/C ... t/Release/ and all the intermediate build artifacts (object files, etc).

I started archiving as well the source for the patched files containing the keys, such as http://foundry.openuru.org/hudson/job/C ... pnNetBase/. (Use the "view" link next to each file to view it rather than download it.)

In this way you are assured of finding the exact source used in the build, regardless of the edition or selection of the patches applied.

_R

[Edited: fixed bad URL hypertext]
One of the OpenUru toolsmiths... a bookbinder.
User avatar
Hoikas
Member
Posts: 344
Joined: Fri Jun 03, 2011 8:38 pm

Re: Minkata source code

Post by Hoikas »

Cool! I did not realize that the full source code was available in Jenkins. Jenkins buries stuff pretty deeply, and I didn't drill down far enough to find your solution. Thanks for taking the time to sort out my error :)
Image
Post Reply

Return to “OpenUru.org Minkata Test Shard”