windows\Makefile windows\lib\Makefile \
windows\cns\Makefile windows\gina\Makefile \
windows\ms2mit\Makefile \
- windows\wintel\Makefile windows\kfwlogon\Makefile windows\leashdll\Makefile
+ windows\wintel\Makefile windows\kfwlogon\Makefile \
+ windows\leashdll\Makefile windows\leash\Makefile
##DOS##Makefile-windows:: $(MKFDEP) $(WINMAKEFILES)
##DOS## $(WCONFIG) config < $@.in > $@
##DOS##windows\leashdll\Makefile: windows\leashdll\Makefile.in $(MKFDEP)
##DOS## $(WCONFIG) config < $@.in > $@
+##DOS##windows\leash\Makefile: windows\leash\Makefile.in $(MKFDEP)
+##DOS## $(WCONFIG) config < $@.in > $@
clean-windows:: Makefile-windows
ccapi/test/* \
util/windows/* windows/* windows/wshelper/* windows/lib/* windows/cns/* \
windows/wintel/* windows/gina/* windows/ms2mit/* \
- windows/kfwlogon/* windows/leashdll/*
+ windows/kfwlogon/* windows/leashdll/* windows/leash/*
WINBINARYFILES= windows/*/*.ico windows/*/*.doc windows/*/*.hlp \
windows/*/*.hpj
BUILDTOP=..
NO_OUTPRE=1
-SUBDIRS= lib leashdll cns gina ms2mit kfwlogon
+SUBDIRS= lib leashdll leash cns gina ms2mit kfwlogon
*findSpace = 0;
else
{
+////@#+This hack doesn't seem right
+#ifndef NO_KRB4
+
LeashErrorBox("This is a defective entry in file",
CKrb4ConfigFileLocation::m_newKrbrealmFile);
+#endif
ASSERT(0);
m_initDomainHost = m_newDomainHost = editItem;
m_initRealm = m_newRealm = _T("");
return buffer;
}
+#ifndef NO_KRB4
int krb_get_krbhst(char* h, char* r, int n)
{
char lbstorage[BUFSIZ];
(void) fclose(cnffile);
return(KSUCCESS);
}
+#endif
BOOL CKrbConfigOptions::OnInitDialog()
{
CPropertyPage::OnInitDialog();
+#ifndef NO_KRB4
if (CLeashApp::m_hKrb4DLL && !CLeashApp::m_hKrb5DLL)
{ // Krb4 NOT krb5
// Fill in all edit boxes
m_hostServer = krbhst;
- // New suff to put realms in Combo Box
+ // New stuff to put realms in Combo Box
CStdioFile krbCon;
if (!krbCon.Open(CKrbProperties::m_krbPath, CFile::modeRead))
{
} // end of 'Check for Host' else statement
} // end of 'place krbRealm in Edit box' else
}
- else if (CLeashApp::m_hKrb5DLL)
+ else
+#endif
+ if (CLeashApp::m_hKrb5DLL)
{ // Krb5 OR krb5 AND krb4
char *realm = NULL;
pkrb5_get_default_realm(CLeashApp::m_krbv5_context, &realm);
SetDlgItemText(IDC_EDIT_REALM_HOSTNAME, "No KDC information available");
}
}
+#ifndef NO_KRB4
else
{
CHAR krbhst[MAX_HSTNM + 1];
if (strlen(krbhst))
SetDlgItemText(IDC_EDIT_REALM_HOSTNAME, m_hostServer);
}
+#endif
}
}
return TRUE;
}
+#ifndef NO_KRB4
// Save to Kerberos Four config. file "Krb.con"
CStdioFile krbrealmCon;
if (!krbrealmCon.Open(CKrbProperties::m_krbrealmPath, CFile::modeCreate |
}
krbrealmCon.Close();
+#endif
+
return TRUE;
}
void CKrbDomainRealmMaintenance::OnButtonHostAdd()
{
+////I don't understand why this is doing K4 operations here
+#ifndef NO_KRB4
CKrb4AddToDomainRealmList addToDomainRealmList;
if (IDOK == addToDomainRealmList.DoModal())
{
GetDlgItem(IDC_BUTTON_HOST_EDIT)->EnableWindow();
}
}
-
+#endif
}
void CKrbDomainRealmMaintenance::OnButtonHostEdit()
GetDlgItem(IDC_EDIT_RENEW_MAX_M)->EnableWindow(FALSE);
}
-
+#ifndef NO_KRB4
m_initUseKrb4 = m_newUseKrb4 = (CLeashApp::m_hKrb4DLL ? pLeash_get_default_use_krb4() : 0);
- CheckDlgButton(IDC_CHECK_REQUEST_KRB4, m_initUseKrb4);
+ CheckDlgButton(IDC_CHECK_REQUEST_KRB4, m_initUseKrb4);
if ( !CLeashApp::m_hKrb4DLL )
GetDlgItem(IDC_CHECK_REQUEST_KRB4)->EnableWindow(FALSE);
+#else
+////Or remove these completely?
+ m_initUseKrb4 = m_newUseKrb4 = 0;
+ CheckDlgButton(IDC_CHECK_REQUEST_KRB4, 0);
+ GetDlgItem(IDC_CHECK_REQUEST_KRB4)->EnableWindow(FALSE);
+#endif
m_initKinitPreserve = m_newKinitPreserve = pLeash_get_default_preserve_kinit_settings();
- CheckDlgButton(IDC_CHECK_PRESERVE_KINIT_OPTIONS, m_initKinitPreserve);
+ CheckDlgButton(IDC_CHECK_PRESERVE_KINIT_OPTIONS, m_initKinitPreserve);
return(TRUE);
}
"Leash", MB_OK);
}
+#ifndef NO_KRB4
if ( m_initUseKrb4 != m_newUseKrb4 ) {
pLeash_set_default_use_krb4(m_newUseKrb4);
}
+#endif
if ( m_initKinitPreserve != m_newKinitPreserve ) {
pLeash_set_default_preserve_kinit_settings(m_newKinitPreserve);
}
#endif /* COMMENT */
+#ifndef NO_KRB4
CLeashApp::GetKrb4ConFile(m_krbPath,sizeof(m_krbPath));
CLeashApp::GetKrb4RealmFile(m_krbrealmPath,sizeof(m_krbrealmPath));
-
+#endif
AddPage(&m_configOptions);
AddPage(&m_miscConfigOpt);
+#ifndef NO_KRB4
if (CLeashApp::m_hKrb4DLL && !CLeashApp::m_hKrb5DLL)
{
AddPage(&m_krb4RealmHostMaintenance);
AddPage(&m_krb4DomainRealmMaintenance);
}
- else if (CLeashApp::m_hKrb5DLL)
+ else
+#endif
+ if (CLeashApp::m_hKrb5DLL)
{
AddPage(&m_realmHostMaintenance);
AddPage(&m_domainRealmMaintenance);
#include "KrbConfigOptions.h"
#include "KrbRealmHostMaintenance.h"
#include "KrbDomainRealmMaintenance.h"
+#ifndef NO_KRB4
#include "Krb4DomainRealmMaintenance.h"
#include "Krb4RealmHostMaintenance.h"
+#endif
#include "KrbMiscConfigOpt.h"
//////////////////////////////////////////////////////////////////////
public:
//CKrbConfigFileLocation m_fileLocation;
CKrbConfigOptions m_configOptions;
+#ifndef NO_KRB4
CKrb4RealmHostMaintenance m_krb4RealmHostMaintenance;
+#endif
CKrbRealmHostMaintenance m_realmHostMaintenance;
+#ifndef NO_KRB4
CKrb4DomainRealmMaintenance m_krb4DomainRealmMaintenance;
+#endif
CKrbDomainRealmMaintenance m_domainRealmMaintenance;
CKrbMiscConfigOpt m_miscConfigOpt;
HWND CLeashApp::m_hProgram = 0;
HINSTANCE CLeashApp::m_hLeashDLL = 0;
+////@#+Remove
+#ifndef NO_KRB4
HINSTANCE CLeashApp::m_hKrb4DLL = 0;
+#endif
HINSTANCE CLeashApp::m_hKrb5DLL = 0;
HINSTANCE CLeashApp::m_hKrb5ProfileDLL= 0;
HINSTANCE CLeashApp::m_hAfsDLL = 0;
#endif
#endif
AfxFreeLibrary(m_hLeashDLL);
+#ifndef NO_KRB4
AfxFreeLibrary(m_hKrb4DLL);
+#endif
AfxFreeLibrary(m_hKrb5DLL);
AfxFreeLibrary(m_hKrb5ProfileDLL);
AfxFreeLibrary(m_hAfsDLL);
END_FUNC_INFO
};
+////
+#ifndef NO_KRB4
// krb4 functions
DECL_FUNC_PTR(set_krb_debug);
DECL_FUNC_PTR(set_krb_ap_req_debug);
MAKE_FUNC_INFO(krb_get_tf_realm),
END_FUNC_INFO
};
+#endif
// psapi functions
BOOL CLeashApp::InitDLLs()
{
m_hLeashDLL = AfxLoadLibrary(LEASHDLL);
+#ifndef NO_KRB4
m_hKrb4DLL = AfxLoadLibrary(KERB4DLL);
+#endif
m_hKrb5DLL = AfxLoadLibrary(KERB5DLL);
m_hKrb5ProfileDLL = AfxLoadLibrary(KERB5_PPROFILE_DLL);
return FALSE;
}
+////
+#ifndef NO_KRB4
if (m_hKrb4DLL)
{
if (!LoadFuncs(KERB4DLL, krb4_fi, 0, 0, 1, 0, 0))
"Error", MB_OK);
}
}
+#endif
if (m_hKrb5DLL)
{
}
}
+////
+#ifndef NO_KRB4
} else if ( m_hKrb4DLL ) {
if ( !realm[0] ) {
/* Open ticket file */
} else
krbCon.Close();
}
+#endif
}
}
+////@#+Should this be just deleted or reworked?
BOOL
CLeashApp::GetKrb4ConFile(
LPSTR confname,
UINT szConfname
)
{
- if (m_hKrb5DLL && !m_hKrb4DLL)
+ if (m_hKrb5DLL
+////
+#ifndef NO_KRB4
+ && !m_hKrb4DLL
+#endif
+ )
{ // hold krb.con where krb5.ini is located
CHAR krbConFile[MAX_PATH]="";
//strcpy(krbConFile, CLeashApp::m_krbv5_profile->first_file->filename);
strncpy(confname, krbConFile, szConfname);
confname[szConfname-1] = '\0';
}
+////
+#ifndef NO_KRB4
else if (m_hKrb4DLL)
{
unsigned int size = szConfname;
confname[szConfname-1] = '\0';
}
}
+#endif
+
return FALSE;
}
UINT szConfname
)
{
- if (m_hKrb5DLL && !m_hKrb4DLL)
+ if (m_hKrb5DLL
+////
+#ifndef NO_KRB4
+ && !m_hKrb4DLL
+#endif
+ )
{ // hold krb.con where krb5.ini is located
CHAR krbRealmConFile[MAX_PATH];
//strcpy(krbRealmConFile, CLeashApp::m_krbv5_profile->first_file->filename);
strncpy(confname, krbRealmConFile, szConfname);
confname[szConfname-1] = '\0';
}
+////
+#ifndef NO_KRB4
else if (m_hKrb4DLL)
{
unsigned int size = szConfname;
return TRUE;
}
}
+#endif
+
return FALSE;
}
#define HID_KERBEROS_PROPERTIES_EDITHOST 131271
#define HID_KERBEROS_PROPERTIES_LISTDOM 131279
-#define USE_HTMLHELP
+////@#+This might be problematic with the latest Platform SDK...
+////#define USE_HTMLHELP
#ifdef USE_HTMLHELP
#if _MSC_VER >= 1300
#endif
#endif
+////Is this a good place for these defines?
+#if !defined(MAX_HSTNM)
+#define MAX_HSTNM 100
+#endif
+
+
#include "resource.h" // main symbols
#include "lglobals.h"
public:
static HWND m_hProgram;
static HINSTANCE m_hLeashDLL;
+////
+#ifndef NO_KRB4
static HINSTANCE m_hKrb4DLL;
+#endif
static HINSTANCE m_hKrb5DLL;
static HINSTANCE m_hKrb5ProfileDLL;
static HINSTANCE m_hAfsDLL;
{
m_LB_DLLsLoaded.ResetContent();
+#ifndef NO_KRB4
if (!CLeashApp::m_hKrb4DLL)
m_LB_DLLsLoaded.AddString(KERB4DLL);
+#endif
if (!CLeashApp::m_hKrb5DLL)
m_LB_DLLsLoaded.AddString(KERB5DLL);
pApp = AfxGetApp();
pApp->WriteProfileInt("Settings", "DebugWindow", FALSE_FLAG);
m_pView->PostMessage(WM_GOODBYE, IDCANCEL); // modeless case
- pset_krb_debug(OFF);
- pset_krb_ap_req_debug(OFF);
+//// pset_krb_debug(OFF);
+//// pset_krb_ap_req_debug(OFF);
}
else
{
CDialog::OnInitDialog();
// Set Debug flags
- pset_krb_debug(ON); //(int)m_debugListBox.GetSafeHwnd()
- pset_krb_ap_req_debug(ON);
+//// pset_krb_debug(ON); //(int)m_debugListBox.GetSafeHwnd()
+//// pset_krb_ap_req_debug(ON);
if (*m_debugFilePath != 0)
SetDlgItemText(IDC_LOG_FILE_LOCATION_TEXT, m_debugFilePath);
static char THIS_FILE[] = __FILE__;
#endif
+////Some unknown Platform SDK/VC uglines
+#if defined(__HTMLHELP_H__)
+#ifdef HtmlHelp
+#undef HtmlHelp
+#endif
+#endif
+
+
/////////////////////////////////////////////////////////////////////////////
// CLeashProperties dialog
CLeashView::CLeashView():
CFormView(CLeashView::IDD)
{
+////@#+Need removing as well!
+#ifndef NO_KRB4
m_listKrb4 = NULL;
+#endif
m_listKrb5 = NULL;
m_listAfs = NULL;
m_startup = TRUE;
SetTimer(1, ONE_SECOND, TimerProc);
- if (!CLeashApp::m_hKrb4DLL && !CLeashApp::m_hKrb5DLL && !CLeashApp::m_hAfsDLL)
+ if (
+////
+#ifndef NO_KRB4
+ !CLeashApp::m_hKrb4DLL &&
+#endif
+ !CLeashApp::m_hKrb5DLL && !CLeashApp::m_hAfsDLL)
{
+////Update not to mention K4
AfxMessageBox("Neither Kerberos Four, Kerberos Five nor AFS is loaded!!!"
"\r\nYou will not be able to retrieve tickets and/or "
"tokens.",
#ifndef KRB5_TC_NOTICKET
ReleaseMutex(m_tgsReqMutex);
#endif
- if (!CLeashApp::m_hAfsDLL || !CLeashApp::m_hKrb4DLL)
+ if (!CLeashApp::m_hAfsDLL
+////@#+Need to rework this logic. I am confused what !m_hKrb4DLL means in this case!
+#ifndef NO_KRB4
+ || !CLeashApp::m_hKrb4DLL
+#endif
+ )
whatToDo = AfxMessageBox("You are about to replace your existing ticket(s)\n"
"with a ticket imported from the Windows credential cache!",
MB_OKCANCEL, 0);
TV_INSERTSTRUCT m_tvinsert;
+#ifndef NO_KRB4
INT ticketIconStatusKrb4;
INT ticketIconStatus_SelectedKrb4;
INT iconStatusKrb4;
+#endif
INT ticketIconStatusKrb5;
INT ticketIconStatus_SelectedKrb5;
INT ticketIconStatus_SelectedAfs;
INT iconStatusAfs;
+#ifndef NO_KRB4
LONG krb4Error;
+#endif
LONG krb5Error;
LONG afsError;
if (WaitForSingleObject( ticketinfo.lockObj, 100 ) != WAIT_OBJECT_0)
throw("Unable to lock ticketinfo");
+#ifndef NO_KRB4
// Get Kerb 4 tickets in list
krb4Error = pLeashKRB4GetTickets(&ticketinfo.Krb4, &m_listKrb4);
+#endif
// Get Kerb 5 tickets in list
krb5Error = pLeashKRB5GetTickets(&ticketinfo.Krb5, &m_listKrb5,
* to select the appropriate Icon for the Parent Node
*/
+////Might need to delete dependent stuff as well!!!
+#ifndef NO_KRB4
/* Krb4 */
UpdateTicketTime(ticketinfo.Krb4);
m_ticketStatusKrb4 = GetLowTicketStatus(4);
ticketIconStatus_SelectedKrb4 = EXPIRED_CLOCK;
iconStatusKrb4 = TICKET_NOT_INSTALLED;
}
+#endif
+
/* Krb5 */
UpdateTicketTime(ticketinfo.Krb5);
m_tvinsert.item.iSelectedImage = EXPIRED_PARENT_NODE;
break;
}
+////
+#ifndef NO_KRB4
} else if (CLeashApp::m_hKrb4DLL && m_listKrb4) {
m_tvinsert.item.pszText = ticketinfo.Krb4.principal;
switch ( iconStatusKrb4 ) {
m_tvinsert.item.iSelectedImage = EXPIRED_PARENT_NODE;
break;
}
+#endif
} else {
m_tvinsert.item.iSelectedImage = NONE_PARENT_NODE;
}
// Krb4
m_tvinsert.hParent = m_hPrincipal;
+#ifndef NO_KRB4
if (CLeashApp::m_hKrb4DLL)
{
m_tvinsert.item.pszText = "Kerberos Four Tickets";
}
else
{
+#endif
+////Can this be removed altogether?
ticketinfo.Krb4.btickets = NO_TICKETS;
m_tvinsert.item.pszText = "Kerberos Four Tickets (Not Available)";
m_tvinsert.item.iImage = TICKET_NOT_INSTALLED;
m_tvinsert.item.iSelectedImage = TICKET_NOT_INSTALLED;
+#ifndef NO_KRB4
}
+#endif
+#ifndef NO_KRB4
m_hKerb4 = m_pTree ->InsertItem(&m_tvinsert);
if (m_hPrincipalState == NODE_IS_EXPANDED)
m_tvinsert.item.iImage = ticketIconStatusKrb4;
m_tvinsert.item.iSelectedImage = ticketIconStatus_SelectedKrb4;
+
+////What does the original do?
tempList = m_listKrb4, *killList;
while (tempList)
{
if (m_hKerb4State == NODE_IS_EXPANDED)
m_pTree->Expand(m_hKerb4, TVE_EXPAND);
-
+#endif
// AFS
m_tvinsert.hParent = m_hPrincipal;
CFormView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}
+////@#+Is this KRB4 only?
VOID CLeashView::OnDebugMode()
{
+#ifndef NO_KRB4
if (!pset_krb_debug)
return;
+#endif
if (!m_pDebugWindow)
{
m_pApp->WriteProfileInt("Settings", "DebugWindow", FALSE_FLAG);
m_pDebugWindow->DestroyWindow();
+////
+#ifndef NO_KRB4
pset_krb_debug(OFF);
pset_krb_ap_req_debug(OFF);
+#endif
return;
}
else
VOID CLeashView::ResetTreeNodes()
{
m_hPrincipalState = 0;
+#ifndef NO_KRB4
m_hKerb4State = 0;
+#endif
m_hKerb5State = 0;
m_hAFSState = 0;
}
else
pCmdUI->SetText("&Get Ticket(s)/Token(s)\tCtrl+T");
- if (!CLeashApp::m_hKrb4DLL && !CLeashApp::m_hKrb5DLL &&
+ if (
+////Is this logic correct?
+#ifndef NO_KRB4
+ !CLeashApp::m_hKrb4DLL &&
+#endif
+ !CLeashApp::m_hKrb5DLL &&
!CLeashApp::m_hAfsDLL)
pCmdUI->Enable(FALSE);
else
if (WaitForSingleObject( ticketinfo.lockObj, INFINITE ) != WAIT_OBJECT_0)
throw("Unable to lock ticketinfo");
- BOOL b_enable = !(ticketinfo.Krb4.btickets || ticketinfo.Krb5.btickets) ||
- !CLeashApp::m_hKrb4DLL && !CLeashApp::m_hKrb5DLL && !CLeashApp::m_hAfsDLL;
+ BOOL b_enable = !(
+#ifndef NO_KRB4
+ ticketinfo.Krb4.btickets ||
+#endif
+ ticketinfo.Krb5.btickets) ||
+////Not sure about the boolean logic here
+#ifndef NO_KRB4
+ !CLeashApp::m_hKrb4DLL &&
+#endif
+ !CLeashApp::m_hKrb5DLL && !CLeashApp::m_hAfsDLL;
ReleaseMutex(ticketinfo.lockObj);
if (b_enable)
#endif
if (WaitForSingleObject( ticketinfo.lockObj, INFINITE ) != WAIT_OBJECT_0)
throw("Unable to lock ticketinfo");
- if (!(ticketinfo.Krb4.btickets || ticketinfo.Krb5.btickets) ||
- !CLeashApp::m_hKrb4DLL && !CLeashApp::m_hKrb5DLL &&
+ if (!(
+#ifndef NO_KRB4
+ ticketinfo.Krb4.btickets ||
+#endif
+ ticketinfo.Krb5.btickets) ||
+////Not entirely sure about the logic
+#ifndef NO_KRB4
+ !CLeashApp::m_hKrb4DLL &&
+#endif
+ !CLeashApp::m_hKrb5DLL &&
!CLeashApp::m_hAfsDLL)
nFlags = MF_STRING | MF_GRAYED;
else
if (m_hPrincipal == pNMTreeView->itemNew.hItem)
m_hPrincipalState = pNMTreeView->action;
+#ifndef NO_KRB4
else if (m_hKerb4 == pNMTreeView->itemNew.hItem)
m_hKerb4State = pNMTreeView->action;
+#endif
else if (m_hKerb5 == pNMTreeView->itemNew.hItem)
m_hKerb5State = pNMTreeView->action;
else if (m_hAFS == pNMTreeView->itemNew.hItem)
VOID CLeashView::OnUpdateDebugMode(CCmdUI* pCmdUI)
{
+////
+#ifndef NO_KRB4
if (!pset_krb_debug)
+#endif
pCmdUI->Enable(FALSE);
+////
+#ifndef NO_KRB4
else
pCmdUI->Enable(TRUE);
+#endif
}
VOID CLeashView::OnUpdateCfgFiles(CCmdUI* pCmdUI)
{
+////
+#ifndef NO_KRB4
if (!pkrb_get_krbconf2)
+#endif
pCmdUI->Enable(FALSE);
+////
+#ifndef NO_KRB4
else
pCmdUI->Enable(TRUE);
+#endif
}
VOID CLeashView::OnLeashProperties()
VOID CLeashView::OnKrb4Properties()
{
+#ifndef NO_KRB4
CKrb4Properties krb4Properties("Kerberos Four Properties");
krb4Properties.DoModal();
+#endif
}
VOID CLeashView::OnKrb5Properties()
}
//KRB5
+#ifndef NO_KRB4
if (CLeashApp::m_hKrb4DLL)
{
// KRB4
}
else
{
+#endif
+////Should this be removed altogether?
// not installed
ticketStatusKrb4.Format("Kerb-4: Not Available");
CMainFrame::m_wndStatusBar.SetPaneInfo(2, 111111, SBPS_NORMAL, 130);
CMainFrame::m_wndStatusBar.SetPaneText(2, ticketStatusKrb4, SBT_POPOUT);
}
+#ifndef NO_KRB4
}
// KRB4
+#endif
if (CLeashApp::m_hAfsDLL)
{
VOID CLeashView::OnUpdateProperties(CCmdUI* pCmdUI)
{
- if (CLeashApp::m_hKrb5DLL || CLeashApp::m_hKrb4DLL)
+ if (CLeashApp::m_hKrb5DLL
+#ifndef NO_KRB4
+ || CLeashApp::m_hKrb4DLL
+#endif
+ )
pCmdUI->Enable();
else
pCmdUI->Enable(FALSE);
VOID CLeashView::OnUpdateKrb4Properties(CCmdUI* pCmdUI)
{
+#ifndef NO_KRB4
if (CLeashApp::m_hKrb4DLL)
pCmdUI->Enable();
else
+#endif
pCmdUI->Enable(FALSE);
}
VOID CLeashView::OnUpdateAfsControlPanel(CCmdUI* pCmdUI)
{
+////Is the comment even correct?
+#ifndef NO_KRB4
// need Krb 4 to get AFS tokens
if (CLeashApp::m_hAfsDLL && CLeashApp::m_hKrb4DLL)
pCmdUI->Enable();
else
+#endif
pCmdUI->m_pMenu->DeleteMenu(pCmdUI->m_nID, MF_BYCOMMAND);
}
class CLeashView : public CFormView
{
private:
+////@#+Remove
+#ifndef NO_KRB4
TicketList* m_listKrb4;
+#endif
TicketList* m_listKrb5;
TicketList* m_listAfs;
CLeashDebugWindow* m_pDebugWindow;
CTreeCtrl* m_pTree;
CWinApp* m_pApp;
HTREEITEM m_hPrincipal;
+////@#+Remove
+#ifndef NO_KRB4
HTREEITEM m_hKerb4;
+#endif
HTREEITEM m_hKerb5;
HTREEITEM m_hk5tkt;
HTREEITEM m_hAFS;
INT m_largeIcons;
INT m_lowTicketAlarm;
INT m_hPrincipalState;
+#ifndef NO_KRB4
INT m_hKerb4State;
+#endif
INT m_hKerb5State;
INT m_hAFSState;
BOOL m_bIconAdded;
static INT m_autoRenewTickets;
static INT m_ticketStatusAfs;
+////Remove as well?
static INT m_ticketStatusKrb4;
static INT m_ticketStatusKrb5;
static INT m_autoRenewalAttempted;
static INT m_warningOfTicketTimeLeftAfs;
+////Remove as well?
static INT m_warningOfTicketTimeLeftKrb4;
static INT m_warningOfTicketTimeLeftKrb5;
static INT m_warningOfTicketTimeLeftLockAfs;
+////Remove as well?
static INT m_warningOfTicketTimeLeftLockKrb4;
static INT m_warningOfTicketTimeLeftLockKrb5;
static INT m_updateDisplayCount;
#include <tlhelp32.h>
#include <loadfuncs-krb5.h>
-#include <loadfuncs-krb.h>
+////#include <loadfuncs-krb.h>
#include <loadfuncs-profile.h>
#include <loadfuncs-leash.h>
extern DECL_FUNC_PTR(Leash_renew);
extern DECL_FUNC_PTR(Leash_reset_defaults);
+////Do we still need this one?
#define pLeashKRB4GetTickets pnot_an_API_LeashKRB4GetTickets
#define pLeashKRB5GetTickets pnot_an_API_LeashKRB5GetTickets
#define pLeashAFSGetToken pnot_an_API_LeashAFSGetToken
#define pLeashFreeTicketList pnot_an_API_LeashFreeTicketList
#define pLeashGetTimeServerName pnot_an_API_LeashGetTimeServerName
-// krb4 functions
-extern DECL_FUNC_PTR(set_krb_debug);
-extern DECL_FUNC_PTR(set_krb_ap_req_debug);
-extern DECL_FUNC_PTR(krb_get_krbconf2);
-extern DECL_FUNC_PTR(krb_get_krbrealm2);
-extern DECL_FUNC_PTR(tkt_string);
-extern DECL_FUNC_PTR(krb_set_tkt_string);
-extern DECL_FUNC_PTR(krb_realmofhost);
-extern DECL_FUNC_PTR(krb_get_lrealm);
-extern DECL_FUNC_PTR(krb_get_krbhst);
-
// psapi functions
extern DECL_FUNC_PTR(GetModuleFileNameExA);
extern DECL_FUNC_PTR(EnumProcessModules);
#define KRB_FILE "KRB.CON"
#define KRBREALM_FILE "KRBREALM.CON"
#define TICKET_FILE "TICKET.KRB"
+////Wow. Why?
#define WIN95_AUTOEXEC "C:\\AUTOEXEC.BAT"
#define LEASH_HELP_FILE "leash32.chm"
class TicketInfoWrapper {
public:
HANDLE lockObj;
+////Can this be commented out?
TICKETINFO Krb4;
TICKETINFO Krb5;
TICKETINFO Afs;
--- /dev/null
+# makefile: Leash executable
+#
+
+#TODO Fix later:
+NO_AFS=1
+
+!ifndef NO_AFS
+###AFS_BASE=
+AFS_INCLUDES=-I$(AFS_BASE)\Include
+AFS_LIB=$(AFS_BASE)\lib
+AFS_LIBS=$(AFS_LIB)\afsauthent.lib
+!else
+AFS_INCLUDES=
+AFS_LIBS=
+!endif
+
+MFCLIB=MFC100D.LIB
+EXE_NAME=leash32
+WSHELPER=wshelp32
+
+!if ("$(CPU)" == "IA64") || ("$(CPU)" == "AMD64") || ("$(CPU)" == "ALPHA64")
+EXE_NAME=leash64
+WSHELPER=wshelp64
+!endif
+
+OBJS= \
+ $(OUTPRE)Krb4EditDomainRealmList.obj \
+ $(OUTPRE)CLeashDragListBox.obj \
+ $(OUTPRE)Krb5Properties.obj \
+ $(OUTPRE)KrbAddHostServer.obj \
+ $(OUTPRE)KrbAddRealm.obj \
+ $(OUTPRE)KrbConfigOptions.obj \
+ $(OUTPRE)KrbDomainRealmMaintenance.obj \
+ $(OUTPRE)KrbEditHostServer.obj \
+ $(OUTPRE)KrbEditRealm.obj \
+ $(OUTPRE)KrbProperties.obj \
+ $(OUTPRE)KrbRealmHostMaintenance.obj \
+ $(OUTPRE)Leash.obj \
+ $(OUTPRE)LeashAboutBox.obj \
+ $(OUTPRE)LeashDebugWindow.obj \
+ $(OUTPRE)LeashDoc.obj \
+ $(OUTPRE)LeashFileDialog.obj \
+ $(OUTPRE)LeashFrame.obj \
+ $(OUTPRE)LeashMessageBox.obj \
+ $(OUTPRE)LeashProperties.obj \
+ $(OUTPRE)LeashView.obj \
+ $(OUTPRE)lglobals.obj \
+ $(OUTPRE)MainFrm.obj \
+ $(OUTPRE)StdAfx.obj \
+ $(OUTPRE)AfsProperties.obj \
+ $(OUTPRE)VSroutines.obj \
+ $(OUTPRE)KrbMiscConfigOpt.obj
+
+RESFILE = $(OUTPRE)Leash.res
+XOBJS = $(RESFILE)
+
+##### Options
+# Set NODEBUG if building release instead of debug
+BUILDTOP=..\..
+
+LOCALINCLUDES= -I$(BUILDTOP) -I$(BUILDTOP)\include -I$(BUILDTOP)\windows\include
+
+##### RC Compiler
+RFLAGS = $(LOCALINCLUDES)
+RCFLAGS = $(RFLAGS) -D_WIN32 -DLEASH_APP
+
+DEFINES = -DWINSOCK -DWIN32 -DWINDOWS -D_AFXDLL -D_MBCS -DNO_KRB4
+!ifdef NODEBUG
+DEFINES = $(DEFINES)
+!else
+DEFINES = $(DEFINES) -DDBG
+!endif
+
+!ifdef NO_AFS
+DEFINES = $(DEFINES) -DNO_AFS
+!endif
+
+##### Linker
+LINK = link
+LIBS = $(GLIB) $(CLIB) $(WLIB)
+SYSLIBS = kernel32.lib Iphlpapi.lib ws2_32.lib user32.lib gdi32.lib comdlg32.lib comctl32.lib version.lib
+LFLAGS = /nologo $(LOPTS)
+
+all:: Makefile $(OUTPRE)$(EXE_NAME).exe
+
+$(OUTPRE)$(EXE_NAME).exe: $(OBJS) $(XOBJS) $(LIBS)
+ $(LINK) $(LFLAGS) /out:$@ /ENTRY:WinMainCRTStartup $(OBJS) $(XOBJS) \
+ $(LIBS) $(SYSLIBS) $(BUILDTOP)\util\wshelper\$(OUTPRE)$(WSHELPER).lib \
+ ../lib/$(OUTPRE)libwin.lib atl.lib $(MFCLIB) $(SCLIB)
+
+$(RESFILE): ..\version.rc Leash.rc
+
+clean::
+ if exist $(OUTPRE)*.exe del $(OUTPRE)*.exe
+ if exist $(OUTPRE)*.obj del $(OUTPRE)*.obj
+ if exist $(OUTPRE)*.res del $(OUTPRE)*.res
+ if exist $(OUTPRE)*.pdb del $(OUTPRE)*.pdb
+ if exist *.err del *.err
--- /dev/null
+#define VER_FILEDESCRIPTION_STR "Leash Application"
+
+#include <kerberos.ver>