Separated the non-java project into client and server projects

in order to better support distributions that target desktops.
This commit completes the client project setup.
This commit is contained in:
Juan Carlos Luciani
2006-11-13 06:32:58 +00:00
parent 6ff1180a82
commit 55304c2836
93 changed files with 28 additions and 98 deletions

View File

@@ -0,0 +1,69 @@
#######################################################################
#
# Copyright (C) 2004 Novell, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Author: Greg Richardson <grichardson@novell.com>
#
#######################################################################
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = pwd.vcproj ../*.c *.c *.h *.conf *.def
if DEBUG
TARGET_CFG = Debug
else
TARGET_CFG = Release
endif
PACKAGE = pwd
TARGET_FILE = pwmech.dll
LOG_FILE = $(PACKAGE).log
all-am: $(TARGET_FILE)
.PHONY: $TARGET_FILE) devenv
devenv:
@if ! test -x "$(VSINSTALLDIR)/devenv.exe"; then echo "Error: Microsoft Visual Studio .NET is currently required to build MSI and MSM packages"; exit 1; fi
$(TARGET_FILE): devenv
@rm -f $(LOG_FILE) $@
@CMD='"$(VSINSTALLDIR)/devenv.exe" ../../../../auth.sln /build $(TARGET_CFG) /project $(PACKAGE) /out $(LOG_FILE)'; \
echo $$CMD; \
if eval $$CMD; then \
ls -l $(TARGET_CFG)/$(TARGET_FILE); \
else \
grep -a "ERROR:" $(LOG_FILE); \
fi
package-clean clean-local:
rm -rf Release/* Release Debug/* Debug*/Release */Debug *.log *.suo
clean:
rm -rf Release/* Release Debug/* Debug */Release */Debug *.log *.suo
distclean-local: package-clean
rm -f Makefile
maintainer-clean-local:
rm -f Makefile.in

View File

@@ -0,0 +1,12 @@
#######################################################
# #
# CASA Authentication Token System configuration file #
# for module: #
# #
# PwdAuthenticate #
# #
#######################################################
LibraryName \Program Files\novell\casa\lib\pwmech.dll

View File

@@ -0,0 +1,126 @@
/***********************************************************************
*
* Copyright (C) 2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
* Author: Juan Carlos Luciani <jluciani@novell.com>
*
***********************************************************************/
//===[ Include files ]=====================================================
#include "internal.h"
//===[ External data ]=====================================================
//===[ Manifest constants ]================================================
//===[ Type definitions ]==================================================
//===[ Function prototypes ]===============================================
//===[ Global variables ]==================================================
UINT32 g_ulCount = 0;
UINT32 g_ulLock = 0;
HANDLE g_hModule;
//++=======================================================================
BOOL APIENTRY DllMain(
HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
//=======================================================================--
{
BOOL retStatus = TRUE;
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
{
g_hModule = hModule;
// Nothing else to do at this time
break;
}
case DLL_THREAD_ATTACH:
{
g_hModule = hModule;
break;
}
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
{
/* Don't uninitialize on windows
tbd
*/
break;
}
}
return retStatus;
}
//++=======================================================================
//
// DllCanUnloadNow
//
// Synopsis
//
//
STDAPI
DllCanUnloadNow()
//
// Input Arguments
//
// Ouput Arguments
//
// Return Value
// S_OK The DLL can be unloaded.
// S_FALSE The DLL cannot be unloaded now.
//
// Description
// An Exported Function.
// DLLs that support the OLE Component Object Model (COM) should implement
// and export DllCanUnloadNow.
// A call to DllCanUnloadNow determines whether the DLL from which it is
// exported is still in use. A DLL is no longer in use when it is not
// managing any existing objects (the reference count on all of its objects
// is 0).
// DllCanUnloadNow returns S_FALSE if there are any existing references to
// objects that the DLL manages.
//
// Environment
//
// See Also
//
//=======================================================================--
{
// tbd
return ((g_ulCount == 0 && g_ulLock == 0) ? S_OK : S_FALSE);
}
//=========================================================================
//=========================================================================

View File

@@ -0,0 +1,35 @@
/***********************************************************************
*
* Copyright (C) 2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
* Author: Juan Carlos Luciani <jluciani@novell.com>
*
***********************************************************************/
//===[ Include files ]=====================================================
#include "internal.h"
//===[ Type definitions ]==================================================
//===[ Function prototypes ]===============================================
//===[ Global variables ]==================================================

View File

@@ -0,0 +1,81 @@
/***********************************************************************
*
* Copyright (C) 2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
* Author: Juan Carlos Luciani <jluciani@novell.com>
*
***********************************************************************/
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
//===[ Include files ]=====================================================
#include <windows.h>
#include <stdio.h>
#include <winerror.h>
//===[ Type definitions ]==================================================
#ifndef CONTAINING_RECORD
#define CONTAINING_RECORD(address, type, field) ((type *)( \
(char*)(address) - \
(char*)(&((type *)0)->field)))
#endif
//
// DbgTrace macro define
//
//#define DbgTrace(LEVEL, X, Y) { \
//char printBuff[256]; \
// if (LEVEL == 0 || DebugLevel >= LEVEL) \
// { \
// _snprintf(printBuff, sizeof(printBuff), X, Y); \
// printf("PwdMech %s", printBuff); \
// } \
//}
#define DbgTrace(LEVEL, X, Y) { \
char formatBuff[128]; \
char printBuff[256]; \
if (LEVEL == 0 || DebugLevel >= LEVEL) \
{ \
strcpy(formatBuff, "CASA_PwdMech "); \
strncat(formatBuff, X, sizeof(formatBuff) - 8); \
_snprintf(printBuff, sizeof(printBuff), formatBuff, Y); \
OutputDebugString(printBuff); \
} \
}
#define bool BOOLEAN
#define true TRUE
#define false FALSE
//===[ Inlines functions ]===============================================
//===[ Function prototypes ]===============================================
//===[ Global externals ]==================================================
//===[ External prototypes ]===============================================
//=========================================================================
#endif // _PLATFORM_H_

View File

@@ -0,0 +1,182 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="pwd"
ProjectGUID="{5499F624-F371-4559-B4C2-A484BCE892FD}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)client\mechanisms\pwd\windows\$(ConfigurationName)"
IntermediateDirectory="$(SolutionDir)client\mechanisms\pwd\windows\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".\;..\;..\..\..;..\..\..\..\include;&quot;..\..\..\..\..\..\..\Expat-2.0.0\source\lib&quot;;&quot;c:\Program Files\Novell\CASA\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/EXPORT:GetAuthTokenInterface"
AdditionalDependencies="micasa.lib"
OutputFile="$(OutDir)/pwmech.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\Program Files\novell\CASA\lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/pw.pdb"
SubSystem="0"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="mkdir \&quot;Program Files&quot;\novell\
mkdir \&quot;Program Files&quot;\novell\casa
mkdir \&quot;Program Files&quot;\novell\casa\lib\
mkdir \&quot;Program Files&quot;\novell\casa\etc\
mkdir \&quot;Program Files&quot;\novell\casa\etc\auth\
mkdir \&quot;Program Files&quot;\novell\casa\etc\auth\mechanisms\
copy PwdAuthenticate.conf \&quot;Program Files&quot;\novell\casa\etc\auth\mechanisms\PwdAuthenticate.conf
copy $(OutDir)\pwmech.dll \&quot;Program Files&quot;\novell\casa\lib\pwmech.dll
"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)client\mechanisms\pwd\windows\$(ConfigurationName)"
IntermediateDirectory="$(SolutionDir)client\mechanisms\pwd\windows\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".\;..\;..\..\..;..\..\..\..\include;&quot;..\..\..\..\..\..\..\Expat-2.0.0\source\lib&quot;;&quot;c:\Program Files\Novell\CASA\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
RuntimeLibrary="4"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/EXPORT:GetAuthTokenInterface"
AdditionalDependencies="micasa.lib"
OutputFile="$(OutDir)/pwmech.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\Program Files\novell\CASA\lib"
GenerateDebugInformation="TRUE"
SubSystem="0"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="mkdir \&quot;Program Files&quot;\novell\
mkdir \&quot;Program Files&quot;\novell\casa
mkdir \&quot;Program Files&quot;\novell\casa\lib\
mkdir \&quot;Program Files&quot;\novell\casa\etc\
mkdir \&quot;Program Files&quot;\novell\casa\etc\auth\
mkdir \&quot;Program Files&quot;\novell\casa\etc\auth\mechanisms\
copy PwdAuthenticate.conf \&quot;Program Files&quot;\novell\casa\etc\auth\mechanisms\PwdAuthenticate.conf
copy $(OutDir)\pwmech.dll \&quot;Program Files&quot;\novell\casa\lib\pwmech.dll
"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\dllsup.c">
</File>
<File
RelativePath="..\get.c">
</File>
<File
RelativePath="..\interface.c">
</File>
<File
RelativePath=".\platform.c">
</File>
<File
RelativePath=".\PwdAuthenticate.conf">
</File>
<File
RelativePath=".\pwmech.def">
</File>
<File
RelativePath="..\util.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath="..\internal.h">
</File>
<File
RelativePath=".\platform.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,10 @@
LIBRARY PWMECH
DESCRIPTION 'CASA PW Authentication Mechanism Library.'
EXPORTS
; DllRegisterServer PRIVATE
; DllUnregisterServer PRIVATE
; DllGetClassObject PRIVATE
GetAuthTokenInterface PRIVATE
; DllCanUnloadNow PRIVATE