瀏覽代碼

GSSAPIServerRealm is not used since 4.2 (Switched to PuTTY’s own implementation of Kerberos/GSSAPI. It brings following changes: Session option Service principal name is no longer supported.) + On the contrary GSSAPIFwdTGT is used, despite a comment

Source commit: 31364c0ae693e4885e21ce4646857cf67d9f9086
Martin Prikryl 9 年之前
父節點
當前提交
94341f7884
共有 3 個文件被更改,包括 3 次插入16 次删除
  1. 0 10
      source/core/SessionData.cpp
  2. 1 4
      source/core/SessionData.h
  3. 2 2
      source/core/SessionInfo.cpp

+ 0 - 10
source/core/SessionData.cpp

@@ -111,7 +111,6 @@ void __fastcall TSessionData::Default()
   AuthKIPassword = true;
   AuthGSSAPI = false;
   GSSAPIFwdTGT = false;
-  GSSAPIServerRealm = L"";
   ChangeUsername = false;
   Compression = false;
   SshProt = ssh2only;
@@ -320,7 +319,6 @@ void __fastcall TSessionData::NonPersistant()
   PROPERTY(AuthKIPassword); \
   PROPERTY(AuthGSSAPI); \
   PROPERTY(GSSAPIFwdTGT); \
-  PROPERTY(GSSAPIServerRealm); \
   PROPERTY(DeleteToRecycleBin); \
   PROPERTY(OverwrittenToRecycleBin); \
   PROPERTY(RecycleBinPath); \
@@ -535,7 +533,6 @@ void __fastcall TSessionData::DoLoad(THierarchicalStorage * Storage, bool & Rewr
   // Both vaclav tomec and official putty use AuthGSSAPI
   AuthGSSAPI = Storage->ReadBool(L"AuthGSSAPI", Storage->ReadBool(L"AuthSSPI", AuthGSSAPI));
   GSSAPIFwdTGT = Storage->ReadBool(L"GSSAPIFwdTGT", Storage->ReadBool(L"GssapiFwd", Storage->ReadBool(L"SSPIFwdTGT", GSSAPIFwdTGT)));
-  GSSAPIServerRealm = Storage->ReadString(L"GSSAPIServerRealm", Storage->ReadString(L"KerbPrincipal", GSSAPIServerRealm));
   ChangeUsername = Storage->ReadBool(L"ChangeUsername", ChangeUsername);
   Compression = Storage->ReadBool(L"Compression", Compression);
   TSshProt ASshProt = (TSshProt)Storage->ReadInteger(L"SshProt", SshProt);
@@ -834,7 +831,6 @@ void __fastcall TSessionData::DoSave(THierarchicalStorage * Storage,
 
   WRITE_DATA(Bool, AuthGSSAPI);
   WRITE_DATA(Bool, GSSAPIFwdTGT);
-  WRITE_DATA(String, GSSAPIServerRealm);
   Storage->DeleteValue(L"TryGSSKEX");
   Storage->DeleteValue(L"UserNameFromEnvironment");
   Storage->DeleteValue("GSSAPIServerChoosesUserName");
@@ -844,7 +840,6 @@ void __fastcall TSessionData::DoSave(THierarchicalStorage * Storage,
     // duplicate kerberos setting with keys of the vintela quest putty
     WRITE_DATA_EX(Bool, L"AuthSSPI", AuthGSSAPI, );
     WRITE_DATA_EX(Bool, L"SSPIFwdTGT", GSSAPIFwdTGT, );
-    WRITE_DATA_EX(String, L"KerbPrincipal", GSSAPIServerRealm, );
     // duplicate kerberos setting with keys of the official putty
     WRITE_DATA_EX(Bool, L"GssapiFwd", GSSAPIFwdTGT, );
   }
@@ -2046,11 +2041,6 @@ void __fastcall TSessionData::SetGSSAPIFwdTGT(bool value)
   SET_SESSION_PROPERTY(GSSAPIFwdTGT);
 }
 //---------------------------------------------------------------------
-void __fastcall TSessionData::SetGSSAPIServerRealm(UnicodeString value)
-{
-  SET_SESSION_PROPERTY(GSSAPIServerRealm);
-}
-//---------------------------------------------------------------------
 void __fastcall TSessionData::SetChangeUsername(bool value)
 {
   SET_SESSION_PROPERTY(ChangeUsername);

+ 1 - 4
source/core/SessionData.h

@@ -98,8 +98,7 @@ private:
   bool FAuthKI;
   bool FAuthKIPassword;
   bool FAuthGSSAPI;
-  bool FGSSAPIFwdTGT; // not supported anymore
-  UnicodeString FGSSAPIServerRealm; // not supported anymore
+  bool FGSSAPIFwdTGT;
   bool FChangeUsername;
   bool FCompression;
   TSshProt FSshProt;
@@ -222,7 +221,6 @@ private:
   void __fastcall SetAuthKIPassword(bool value);
   void __fastcall SetAuthGSSAPI(bool value);
   void __fastcall SetGSSAPIFwdTGT(bool value);
-  void __fastcall SetGSSAPIServerRealm(UnicodeString value);
   void __fastcall SetChangeUsername(bool value);
   void __fastcall SetCompression(bool value);
   void __fastcall SetSshProt(TSshProt value);
@@ -461,7 +459,6 @@ public:
   __property bool AuthKIPassword  = { read=FAuthKIPassword, write=SetAuthKIPassword };
   __property bool AuthGSSAPI  = { read=FAuthGSSAPI, write=SetAuthGSSAPI };
   __property bool GSSAPIFwdTGT = { read=FGSSAPIFwdTGT, write=SetGSSAPIFwdTGT };
-  __property UnicodeString GSSAPIServerRealm = { read=FGSSAPIServerRealm, write=SetGSSAPIServerRealm };
   __property bool ChangeUsername  = { read=FChangeUsername, write=SetChangeUsername };
   __property bool Compression  = { read=FCompression, write=SetCompression };
   __property TSshProt SshProt  = { read=FSshProt, write=SetSshProt };

+ 2 - 2
source/core/SessionInfo.cpp

@@ -1137,8 +1137,8 @@ void __fastcall TSessionLog::DoAddStartupInfo(TSessionData * Data)
            BooleanToEngStr(Data->AuthKI), BooleanToEngStr(Data->AuthGSSAPI)));
         if (Data->AuthGSSAPI)
         {
-          ADF(L"GSSAPI: Forwarding: %s; Server realm: %s",
-            (BooleanToEngStr(Data->GSSAPIFwdTGT), Data->GSSAPIServerRealm));
+          ADF(L"GSSAPI: Forwarding: %s",
+            (BooleanToEngStr(Data->GSSAPIFwdTGT)));
         }
         ADF(L"Ciphers: %s; Ssh2DES: %s",
           (Data->CipherList, BooleanToEngStr(Data->Ssh2DES)));