Moving micasa 1.5 trunk to Novell forge.
This commit is contained in:
parent
082db33275
commit
efe0a5e13c
25
Changes.log
Normal file
25
Changes.log
Normal file
@ -0,0 +1,25 @@
|
||||
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
SecretStore Client Service Version 4.0
|
||||
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
|
||||
June 4th, 2004 - Cameron Mashayekhi
|
||||
New project for version 3.0 was created with no dependency on the
|
||||
older versions in CCM. All files started at version 1.0.
|
||||
|
||||
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
|
||||
February 14th, 2005 - Cameron Mashayekhi
|
||||
Windows build compiler was converted to MSC 7.0.
|
||||
|
||||
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
|
||||
March 9th, 2005 - Cameron Mashayekhi
|
||||
|
||||
MSC 7.0 IDE stopped working after we moved the Vc7 directory to the
|
||||
c:/tools instead of its defautl place in Visual C directory. We
|
||||
either have to have two copies of it or make a shortcult to the
|
||||
original dir from c:/tools.
|
||||
|
||||
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
0
ClientPasswordManager/AUTHORS
Normal file
0
ClientPasswordManager/AUTHORS
Normal file
0
ClientPasswordManager/ChangeLog
Normal file
0
ClientPasswordManager/ChangeLog
Normal file
73
ClientPasswordManager/ClientPasswordManager.csproj
Normal file
73
ClientPasswordManager/ClientPasswordManager.csproj
Normal file
@ -0,0 +1,73 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{A25ED38C-7EC6-4587-8F3F-0312CA3714FF}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "ClientPasswordManager"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Exe"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "ClientPasswordManager"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References/>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include/>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
48
ClientPasswordManager/ClientPasswordManager.csproj.user
Normal file
48
ClientPasswordManager/ClientPasswordManager.csproj.user
Normal file
@ -0,0 +1,48 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP LastOpenVersion = "7.10.3077" >
|
||||
<Build>
|
||||
<Settings ReferencePath = "" >
|
||||
<Config
|
||||
Name = "Debug"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
</Settings>
|
||||
</Build>
|
||||
<OtherProjectSettings
|
||||
CopyProjectDestinationFolder = ""
|
||||
CopyProjectUncPath = ""
|
||||
CopyProjectOption = "0"
|
||||
ProjectView = "ProjectFiles"
|
||||
ProjectTrust = "0"
|
||||
/>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
66
ClientPasswordManager/ClientPasswordManager.sln
Normal file
66
ClientPasswordManager/ClientPasswordManager.sln
Normal file
@ -0,0 +1,66 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c-sharp-net-credential", "c-sharp-net-credential\c-sharp-net-credential.csproj", "{D7D0F5D8-0F45-4DCA-818B-8E71168A2CA3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5A211C70-3AEB-4305-8CB6-42757D01DC22} = {5A211C70-3AEB-4305-8CB6-42757D01DC22}
|
||||
{AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C} = {AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C}
|
||||
{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5} = {BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c-sharp-password-dialog", "c-sharp-password-dialog\c-sharp-password-dialog.csproj", "{5A211C70-3AEB-4305-8CB6-42757D01DC22}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5} = {BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c-sharp-username-dialog", "c-sharp-username-dialog\c-sharp-username-dialog.csproj", "{AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5} = {BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c-sharp-utilities", "c-sharp-utilities\c-sharp-utilities.csproj", "{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "clientpasswordmanager-msm", "package\windows\clientpasswordmanager-msm\clientpasswordmanager-msm.vdproj", "{673D662C-A6F2-4D38-A001-90BD03963CEB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester", "Tester\Tester.csproj", "{45A551B6-8919-411F-8711-D34B267E08F4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{D7D0F5D8-0F45-4DCA-818B-8E71168A2CA3}.Debug.ActiveCfg = Debug|.NET
|
||||
{D7D0F5D8-0F45-4DCA-818B-8E71168A2CA3}.Debug.Build.0 = Debug|.NET
|
||||
{D7D0F5D8-0F45-4DCA-818B-8E71168A2CA3}.Release.ActiveCfg = Release|.NET
|
||||
{D7D0F5D8-0F45-4DCA-818B-8E71168A2CA3}.Release.Build.0 = Release|.NET
|
||||
{5A211C70-3AEB-4305-8CB6-42757D01DC22}.Debug.ActiveCfg = Debug|.NET
|
||||
{5A211C70-3AEB-4305-8CB6-42757D01DC22}.Debug.Build.0 = Debug|.NET
|
||||
{5A211C70-3AEB-4305-8CB6-42757D01DC22}.Release.ActiveCfg = Release|.NET
|
||||
{5A211C70-3AEB-4305-8CB6-42757D01DC22}.Release.Build.0 = Release|.NET
|
||||
{AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C}.Debug.ActiveCfg = Debug|.NET
|
||||
{AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C}.Debug.Build.0 = Debug|.NET
|
||||
{AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C}.Release.ActiveCfg = Release|.NET
|
||||
{AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C}.Release.Build.0 = Release|.NET
|
||||
{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}.Debug.ActiveCfg = Debug|.NET
|
||||
{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}.Debug.Build.0 = Debug|.NET
|
||||
{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}.Release.ActiveCfg = Release|.NET
|
||||
{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}.Release.Build.0 = Release|.NET
|
||||
{673D662C-A6F2-4D38-A001-90BD03963CEB}.Debug.ActiveCfg = Debug
|
||||
{673D662C-A6F2-4D38-A001-90BD03963CEB}.Debug.Build.0 = Debug
|
||||
{673D662C-A6F2-4D38-A001-90BD03963CEB}.Release.ActiveCfg = Release
|
||||
{673D662C-A6F2-4D38-A001-90BD03963CEB}.Release.Build.0 = Release
|
||||
{45A551B6-8919-411F-8711-D34B267E08F4}.Debug.ActiveCfg = Debug|.NET
|
||||
{45A551B6-8919-411F-8711-D34B267E08F4}.Debug.Build.0 = Debug|.NET
|
||||
{45A551B6-8919-411F-8711-D34B267E08F4}.Release.ActiveCfg = Release|.NET
|
||||
{45A551B6-8919-411F-8711-D34B267E08F4}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
ClientPasswordManager/ClientPasswordManager.suo
Normal file
BIN
ClientPasswordManager/ClientPasswordManager.suo
Normal file
Binary file not shown.
50
ClientPasswordManager/Makefile.am
Normal file
50
ClientPasswordManager/Makefile.am
Normal file
@ -0,0 +1,50 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
SUBDIRS = c-sharp-utilities c-sharp-password-dialog c-sharp-username-dialog c-sharp-net-credential package
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall
|
||||
package package-clean package-install package-uninstall:
|
||||
$(MAKE) -C package $@
|
||||
|
||||
installcheck-summary:
|
||||
$(MAKE) -C src $@
|
||||
|
||||
clean-local:
|
||||
rm -rf *.suo
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f configure Makefile.in clientpasswordmanager-*.tar.gz
|
||||
rm -f aclocal.m4 conf*.sh configure.lineno
|
||||
rm -f config.guess config.sub config.status
|
||||
rm -f ltmain.sh libtool
|
||||
rm -f install-sh install-sh.lnk INSTALL INSTALL.lnk
|
||||
rm -f missing missing.lnk mkinstalldirs mkinstalldir.lnk
|
||||
rm -rf autom4te.cache
|
0
ClientPasswordManager/NEWS
Normal file
0
ClientPasswordManager/NEWS
Normal file
193
ClientPasswordManager/README
Normal file
193
ClientPasswordManager/README
Normal file
@ -0,0 +1,193 @@
|
||||
/***********************************************************************
|
||||
* File: README
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
The ClientPasswordManager provides a set of libraries to allow applications
|
||||
to share user name and password credentials. The ClientPasswordManager also
|
||||
provides dialog components that can be leveraged by applications to prompt
|
||||
users for credentials.
|
||||
|
||||
The goal of the ClientPasswordManager is to minimize the number of prompts
|
||||
that users experience when accessing applications that require the user's
|
||||
name and password to authenticate to backend systems.
|
||||
|
||||
A secondary goal of the ClientPasswordManager is to normalize the prompts
|
||||
for credentials that are seen by the user.
|
||||
|
||||
FEATURES
|
||||
|
||||
The ClientPasswordManager consists of APIs for obtaining/setting user password
|
||||
credentials as well as a set of dialogs that can be used to prompt the user
|
||||
for its credentials.
|
||||
|
||||
The ClientPasswordManager leverages the services of the SecretStore Client Wallet
|
||||
Service for the secure storage of user credentials and for controlling access to
|
||||
the credentials. Usage of the ClientPasswordManager instead of writting to the
|
||||
SecretStore Wallet API directly free applications from having to agree on a
|
||||
standard on how credentials need to be stored in the wallet.
|
||||
|
||||
The ClientPasswordManager will try to make its services available to native, .NET,
|
||||
and Java applications.
|
||||
|
||||
CONTENTS
|
||||
|
||||
c-sharp-net-credential - This folder contains an implemtation of the .NET ICredentials
|
||||
interface called the NetCredential class. NetCredential objects leverage the contents
|
||||
of the wallet when queried for user credentials.
|
||||
|
||||
c-sharp-password-dialog - This folder contains a dialog class that can be used by .NET
|
||||
applications to query the user for its password.
|
||||
|
||||
c-sharp-username-dialog - This folder contains a dialog class that can be used by .NET
|
||||
applications to query the user for its user name.
|
||||
|
||||
c-sharp-utilities - This folder contains .NET utilities leveraged by ClientPAsswordManager
|
||||
.NET components.
|
||||
|
||||
package - This folder contains the files necessary to build the software packages
|
||||
under windows and under linux.
|
||||
|
||||
REQUIREMENTS FOR BUILDING THE SOFTWARE PACKAGE ON WINDOWS
|
||||
|
||||
- Install Visual Studio .NET 2003
|
||||
- Install Cygwin - See instructions below.
|
||||
|
||||
Download and start cygwin install:
|
||||
Browse to http://sources.redhat.com/cygwin/
|
||||
|
||||
Click on "Install or update now!" or "Install Cygwin now"
|
||||
|
||||
Cygwin Setup:
|
||||
Next
|
||||
|
||||
Cygwin Setup - Choose Installation Type:
|
||||
Install from Internet
|
||||
Next
|
||||
|
||||
Cygwin Setup - Choose Installation Directory:
|
||||
Root Directory: C:\cygwin
|
||||
Install For: "All Users"
|
||||
|
||||
Default Text File Type: DOS
|
||||
|
||||
Cygwin Setup - Select Local Package Directory:
|
||||
Local Package Directory: C:\cygwin-packages
|
||||
|
||||
Cygwin Setup - Select Connection Type:
|
||||
Direct Connection
|
||||
|
||||
Choose A Download Site:
|
||||
ftp://ftp.nas.nasa.gov
|
||||
|
||||
Cywin Setup - Select Packages:
|
||||
Base:
|
||||
defaults
|
||||
|
||||
Devel:
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
make
|
||||
pkgconfig
|
||||
cvs
|
||||
gcc
|
||||
gcc-g++
|
||||
|
||||
Editors:
|
||||
vim (optional)
|
||||
|
||||
Net:
|
||||
openssh
|
||||
openssl
|
||||
|
||||
Text:
|
||||
more
|
||||
|
||||
Utils:
|
||||
clear (optional)
|
||||
|
||||
Cygwin Setup - Create Icons:
|
||||
Finish
|
||||
|
||||
Edit cygwin.bat (c:\cygwin\cygwin.bat) to add a call to
|
||||
%VS71COMNTOOLS%\vsvars32.bat (see example below). This sets up the
|
||||
Visual Studio tools in Cygwin.
|
||||
|
||||
Sample cygwin.bat:
|
||||
|
||||
@echo off
|
||||
|
||||
call "%VS71COMNTOOLS%\vsvars32.bat" > NUL
|
||||
|
||||
C:
|
||||
chdir C:\cygwin\bin
|
||||
|
||||
bash --login -i
|
||||
|
||||
|
||||
REQUIREMENTS FOR BUILDING THE SOFTWARE PACKAGE ON LINUX
|
||||
|
||||
Install latest mono and mono-devel RPM - Obtain RPMs from
|
||||
www.go-mono.org.
|
||||
|
||||
|
||||
BUILDING THE SOFTWARE PACKAGE
|
||||
|
||||
Windows: Start at Step 1.
|
||||
Linux: Skip to Step 2.
|
||||
|
||||
1. Run cygwin.bat to start up Cygwin.
|
||||
|
||||
2. Generate autotools files:
|
||||
./autogen.sh --prefix=/<install_dir> [--enable-debug]
|
||||
(<install_dir> is some writable directory where 'make install' will
|
||||
install files for testing.
|
||||
|
||||
3. To reconfigure later, or to configure software that came from a source
|
||||
distribution (.tar.gz) file, use configure.
|
||||
./configure --prefix/<install_dir> [--enable-debug]
|
||||
(run ./configure --help for more options)
|
||||
|
||||
4. Select your make target, here are a few interesting ones:
|
||||
|
||||
make [all] - build product files (package files not included)
|
||||
|
||||
make clean - clean up files built by 'make all'
|
||||
|
||||
make package - build product and package files
|
||||
|
||||
make package-clean - clean up package files
|
||||
|
||||
make install - install product files to <install_dir> specified by
|
||||
--prefix during configure
|
||||
|
||||
make uninstall - undo 'make install'
|
||||
|
||||
make dist - build a source distribution tarball.
|
||||
|
||||
make distclean - removes files to return state back to same as the
|
||||
source distribution (configure, Makefile.in files, and other distributed
|
||||
autotools files are not removed)
|
||||
|
||||
make maintainer-clean - removes files to return state back to same as
|
||||
the CVS checkout (you will need to run ./autogen.sh again before running
|
||||
make again)
|
||||
|
BIN
ClientPasswordManager/Tester/App.ico
Normal file
BIN
ClientPasswordManager/Tester/App.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
58
ClientPasswordManager/Tester/AssemblyInfo.cs
Normal file
58
ClientPasswordManager/Tester/AssemblyInfo.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
85
ClientPasswordManager/Tester/Class1.cs
Normal file
85
ClientPasswordManager/Tester/Class1.cs
Normal file
@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Reflection ;
|
||||
using Novell.Security.ClientPasswordManager;
|
||||
|
||||
|
||||
namespace Tester
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Class1.
|
||||
/// </summary>
|
||||
class Class1
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// call NetCredential code
|
||||
NetCredential nc = new NetCredential("Ifolder", "Network", true, "jnorman", "novell");
|
||||
NetCredential nc2 = new NetCredential("Ifolder", null, false, "ifolderusername", "novell");
|
||||
|
||||
NetworkCredential nwc = nc2.GetCredential(new System.Uri("http://IFolder"), "Basic");
|
||||
|
||||
if (nwc != null)
|
||||
{
|
||||
Console.WriteLine("Username: "+ nwc.UserName);
|
||||
Console.WriteLine("Password: "+ nwc.Password);
|
||||
}
|
||||
|
||||
/*
|
||||
// call SetCredential
|
||||
Type type = assembly.GetType("Novell.CASA.miCASA");
|
||||
MemberInfo[] members = type.GetMembers();
|
||||
|
||||
object Instance = Activator.CreateInstance (type);
|
||||
|
||||
object[] cargs = new object[4];
|
||||
//cargs[0] = 0;
|
||||
cargs[0] = "AppSecretIDTest";
|
||||
cargs[1] = null; //"SharedSecretIDTEST";
|
||||
//cargs[3] = 0;
|
||||
cargs[2] = "Username";
|
||||
cargs[3] = "password";
|
||||
|
||||
object result; // = type.InvokeMember ("SetCredential" ,BindingFlags.InvokeMethod ,null,Instance,cargs);
|
||||
// call SetBasicCredential
|
||||
try
|
||||
{
|
||||
type.InvokeMember("SetBasicCredential", BindingFlags.InvokeMethod, null, Instance, cargs);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
}
|
||||
|
||||
|
||||
// now get the basicCred back
|
||||
try
|
||||
{
|
||||
object[] getArgs = new object[2];
|
||||
getArgs[0] = "AppSecretIDTest";
|
||||
getArgs[1] = null;
|
||||
|
||||
|
||||
result = type.InvokeMember("GetCredentialUsername", BindingFlags.InvokeMethod, null, Instance, getArgs);
|
||||
Console.WriteLine("Username: "+result.ToString());
|
||||
|
||||
result = type.InvokeMember("GetCredentialPassword", BindingFlags.InvokeMethod, null, Instance, getArgs);
|
||||
Console.WriteLine("Password: "+result.ToString());
|
||||
// invoke the GetUsername and GetPassword methods
|
||||
//Type basicCred = assembly.GetType("Novell.CASA.miCASA.BasicCredential");
|
||||
//object username = basicCred.InvokeMember("GetUsername", BindingFlags.InvokeMethod, null, result, null);
|
||||
//object password = basicCred.InvokeMember("GetPassword", BindingFlags.InvokeMethod, null, result, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
109
ClientPasswordManager/Tester/Tester.csproj
Normal file
109
ClientPasswordManager/Tester/Tester.csproj
Normal file
@ -0,0 +1,109 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{45A551B6-8919-411F-8711-D34B267E08F4}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = "App.ico"
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "Tester"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Exe"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "Tester"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Novell.Security.ClientPasswordManager.NetCredential"
|
||||
AssemblyName = "Novell.Security.ClientPasswordManager.NetCredential"
|
||||
HintPath = "..\c-sharp-net-credential\bin\Debug\Novell.Security.ClientPasswordManager.NetCredential.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "App.ico"
|
||||
BuildAction = "Content"
|
||||
/>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Class1.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
48
ClientPasswordManager/Tester/Tester.csproj.user
Normal file
48
ClientPasswordManager/Tester/Tester.csproj.user
Normal file
@ -0,0 +1,48 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP LastOpenVersion = "7.10.3077" >
|
||||
<Build>
|
||||
<Settings ReferencePath = "D:\ccm\SSClient\ClientPasswordManager\c-sharp-net-credential\bin\Debug\;D:\ccm\SSClient\SecretStoreClient_src\ClientPasswordManager\c-sharp-net-credential\bin\Debug\" >
|
||||
<Config
|
||||
Name = "Debug"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
</Settings>
|
||||
</Build>
|
||||
<OtherProjectSettings
|
||||
CopyProjectDestinationFolder = ""
|
||||
CopyProjectUncPath = ""
|
||||
CopyProjectOption = "0"
|
||||
ProjectView = "ProjectFiles"
|
||||
ProjectTrust = "0"
|
||||
/>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
130
ClientPasswordManager/autogen.sh
Normal file
130
ClientPasswordManager/autogen.sh
Normal file
@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=ClientPasswordManager
|
||||
TEST_TYPE=-f
|
||||
FILE=c-sharp-net-credential/NetCredential.cs
|
||||
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
|
||||
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
|
||||
AUTOMAKE=automake
|
||||
ACLOCAL=aclocal
|
||||
}
|
||||
|
||||
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile $PROJECT."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
for coin in `find $srcdir -name configure.in -print`
|
||||
do
|
||||
dr=`dirname $coin`
|
||||
if test -f $dr/NO-AUTO-GEN; then
|
||||
echo skipping $dr -- flagged as no auto-gen
|
||||
else
|
||||
echo processing $dr
|
||||
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
|
||||
( cd $dr
|
||||
aclocalinclude="$ACLOCAL_FLAGS"
|
||||
for k in $macrodirs; do
|
||||
if test -d $k; then
|
||||
aclocalinclude="$aclocalinclude -I $k"
|
||||
##else
|
||||
## echo "**Warning**: No such directory \`$k'. Ignored."
|
||||
fi
|
||||
done
|
||||
if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
if grep "sed.*POTFILES" configure.in >/dev/null; then
|
||||
: do nothing -- we still have an old unmodified configure.in
|
||||
else
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
fi
|
||||
if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | glib-gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy
|
||||
fi
|
||||
echo "Running $ACLOCAL $aclocalinclude ..."
|
||||
$ACLOCAL $aclocalinclude
|
||||
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader
|
||||
fi
|
||||
echo "Running $AUTOMAKE --gnu $am_opt ..."
|
||||
$AUTOMAKE --add-missing --gnu $am_opt
|
||||
echo "Running autoconf ..."
|
||||
autoconf
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
||||
conf_flags="--config-cache --enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
cd "$ORIGDIR"
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PROJECT || exit 1
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
58
ClientPasswordManager/c-sharp-net-credential/AssemblyInfo.cs
Normal file
58
ClientPasswordManager/c-sharp-net-credential/AssemblyInfo.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("Novell.Security.ClientPasswordManager NetCredential")]
|
||||
[assembly: AssemblyDescription("Implements the NetCredential class for Novell.Security.ClientPasswordManager")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Novell, Inc.")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright (C) 2004 Novell, Inc.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("..\\..\\c-sharp-net-credential.snk")]
|
||||
[assembly: AssemblyKeyName("")]
|
77
ClientPasswordManager/c-sharp-net-credential/Makefile.am
Normal file
77
ClientPasswordManager/c-sharp-net-credential/Makefile.am
Normal file
@ -0,0 +1,77 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
Module_CSFILES = $(srcdir)/NetCredential.cs
|
||||
Module_CSFILES_CSC := $(subst /,$(SEP),$(Module_CSFILES))
|
||||
Module_KEYFILE = $(srcdir)/c-sharp-net-credential.snk
|
||||
Module_INCLUDES =
|
||||
Module_RESOURCES =
|
||||
Module_FLAGS = $(CSC_LIBFLAG)
|
||||
Module_LIBS = System.dll System.Data.dll $(SYSTEM_XML) Novell.Security.ClientPasswordManager.PasswordDialog.dll Novell.Security.ClientPasswordManager.UsernameDialog.dll Novell.Security.Utilities.dll
|
||||
Module_LIBPATH = ../c-sharp-password-dialog/bin/$(TARGET_CFG) ../c-sharp-username-dialog/bin/$(TARGET_CFG) ../c-sharp-utilities/bin/$(TARGET_CFG)
|
||||
|
||||
EXTRA_DIST = $(Module_CSFILES) $(Module_KEYFILE)
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: Novell.Security.ClientPasswordManager.NetCredential.dll
|
||||
|
||||
Novell.Security.ClientPasswordManager.NetCredential.dll: $(Module_CSFILES) $(Module_RESOURCES)
|
||||
$(mkinstalldirs) bin/$(TARGET_CFG)
|
||||
if WINDOWS
|
||||
$(CSC) /nowarn:1591,1573,1572 /out:bin/$(TARGET_CFG)/$@ $(CSCFLAGS) $(Module_FLAGS) $(Module_LIBS:%=/r:%) $(Module_LIBPATH:%=/lib:%) $(Module_CSFILES_CSC) /doc:Novell.Security.ClientPasswordManager.NetCredential.doc.xml
|
||||
else
|
||||
$(CSC) /nowarn:1591,1573,1572 /out:bin/$(TARGET_CFG)/$@ $(CSCFLAGS) $(Module_FLAGS) /keyfile:$(Module_KEYFILE) $(Module_LIBS:%=/r:%) $(Module_LIBPATH:%=/lib:%) $(Module_CSFILES_CSC) /doc:Novell.Security.ClientPasswordManager.NetCredential.doc.xml
|
||||
endif
|
||||
|
||||
install-exec-local: Novell.Security.ClientPasswordManager.NetCredential.dll
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) bin/$(TARGET_CFG)/Novell.Security.ClientPasswordManager.NetCredential.dll $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f Novell.Security.ClientPasswordManager.NetCredential.dll
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
CLEAN_FILES = bin/$(TARGET_CFG)/Novell.Security.ClientPasswordManager.NetCredential.dll /doc:Novell.Security.ClientPasswordManager.NetCredential.doc.xml
|
||||
|
||||
clean-local:
|
||||
rm -rf *.dbg *.exe *.dll $(CLEAN_FILES)
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
471
ClientPasswordManager/c-sharp-net-credential/NetCredential.cs
Normal file
471
ClientPasswordManager/c-sharp-net-credential/NetCredential.cs
Normal file
@ -0,0 +1,471 @@
|
||||
/***********************************************************************
|
||||
* File: NetCredential.cs
|
||||
* Author: Juan Carlos Luciani (jluciani@novell.com)
|
||||
*
|
||||
* Namespace: Novell.Security.ClientPasswordManager
|
||||
*
|
||||
* Classes implemented: NetCredential.
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using Novell.Security;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Novell.Security.ClientPasswordManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides an implementation of ICredentials that leverages the
|
||||
/// services of the SecretStore Client Service Wallet.
|
||||
/// </summary>
|
||||
public class NetCredential: ICredentials
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
// This is temporary until we add code to interact with the SecretStore
|
||||
private class UserCache
|
||||
{
|
||||
public string m_userName;
|
||||
public CredentialCache m_credentialCache;
|
||||
|
||||
public UserCache()
|
||||
{
|
||||
m_userName = null;
|
||||
m_credentialCache = null;
|
||||
}
|
||||
}
|
||||
|
||||
// This is temporary until we add code to interact with the SecretStore
|
||||
private static UserCache[] m_userCaches = new UserCache[10];
|
||||
|
||||
private string m_svcName = null;
|
||||
private string m_svcGroupName = null;
|
||||
private string m_userName = null;
|
||||
private string m_password = null;
|
||||
private string m_credScope = null;
|
||||
|
||||
private bool m_haveCredentials;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
private static bool bMiCasaIsAvailable = false;
|
||||
private static Assembly assembly = null; //
|
||||
private static string MI_CASA_CLASS_NAME = "Novell.CASA.miCASA";
|
||||
|
||||
|
||||
static NetCredential()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
assembly = Assembly.LoadWithPartialName("Novell.CASA.miCASAWrapper");
|
||||
if (assembly != null)
|
||||
bMiCasaIsAvailable = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Dbg.trcError(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a NetCredential object for Windows Applications.
|
||||
///
|
||||
/// There is a high probability that services under the same group share the
|
||||
/// same user name and passwords. By specifying a service group name, the caller wants to
|
||||
/// take advantage of this to try to improve the user experience. If the service group
|
||||
/// name is not specified then no effort is made to share usernames and passwords with
|
||||
/// other services.
|
||||
///
|
||||
/// If the svcGroupNameIsRealmName parameter is set to true then it is assumed that
|
||||
/// the services in the group validate username and passwords against the same
|
||||
/// database or against synchronized databases.
|
||||
///
|
||||
/// If the svcGroupNameIsRealmName parameter is set to false then an attempt will be
|
||||
/// made to share passwords between the services in the group but services will be
|
||||
/// allowed to use different passwords. Specifying a service group does not mean
|
||||
/// that the system will not be able to obtain a username and password that is
|
||||
/// unique to a particular service.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service requesting credentials.</param>
|
||||
/// <param name="svcGroupName">Name of group to which the service belongs, can be null or zero length.</param>
|
||||
/// <param name="svcGroupNameIsRealmName">The group name is the name of the backend authentication realm.</param>
|
||||
/// <param name="userName">Name of the user.</param>
|
||||
/// <param name="password">User password if known, otherwise null or empty string.</param>
|
||||
public NetCredential(string svcName,
|
||||
string svcGroupName,
|
||||
bool svcGroupNameIsRealmName,
|
||||
string userName,
|
||||
string password)
|
||||
{
|
||||
// Check input parameters
|
||||
if (svcName == null
|
||||
|| svcName.Length == 0
|
||||
|| (svcGroupNameIsRealmName
|
||||
&& (svcGroupName == null
|
||||
|| svcGroupName.Length == 0))
|
||||
|| userName == null
|
||||
|| userName.Length == 0)
|
||||
{
|
||||
Dbg.trcError("NetCredential constructor- Invalid input parameter");
|
||||
throw new Exception("NetCredential constructor- Invalid input parameter");
|
||||
}
|
||||
|
||||
m_svcName = svcName;
|
||||
m_svcGroupName = svcGroupName;
|
||||
m_userName = userName;
|
||||
m_password = password;
|
||||
|
||||
// Determine the name under which the credentials are scoped
|
||||
if (svcGroupNameIsRealmName)
|
||||
m_credScope = m_svcGroupName;
|
||||
else
|
||||
m_credScope = m_svcName;
|
||||
|
||||
// Check if we need to update the credential cache
|
||||
if (password != null
|
||||
&& password.Length != 0)
|
||||
{
|
||||
if (bMiCasaIsAvailable)
|
||||
{
|
||||
UpdateMiCasaCredential(userName, password, m_svcName, svcGroupName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateCredentialCache(userName, password, m_credScope);
|
||||
}
|
||||
|
||||
// Remember that there object has credentials associated with it to avoid
|
||||
// looking them up in the cache at a later time.
|
||||
m_haveCredentials = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Indicate that we need to look up the credentials in the cache
|
||||
m_haveCredentials = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a NetCredential object.
|
||||
///
|
||||
/// No effort is made to share usernames and passwords with other services.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service requesting credentials.</param>
|
||||
/// <param name="userName">Name of the user.</param>
|
||||
/// <param name="password">User password if known, otherwise null or empty string. Not meaningfull if username is not specified.</param>
|
||||
public NetCredential(string svcName,
|
||||
string userName,
|
||||
string password)
|
||||
{
|
||||
// Check input parameters
|
||||
if (svcName == null
|
||||
|| svcName.Length == 0
|
||||
|| userName == null
|
||||
|| userName.Length == 0)
|
||||
{
|
||||
Dbg.trcError("NetCredential constructor- Invalid input parameter");
|
||||
throw new Exception("NetCredential constructor- Invalid input parameter");
|
||||
}
|
||||
|
||||
m_svcName = svcName;
|
||||
m_userName = userName;
|
||||
m_password = password;
|
||||
|
||||
// The credentials are scoped to the service name
|
||||
m_credScope = m_svcName;
|
||||
|
||||
// Check if we need to update the credential cache
|
||||
if (password != null
|
||||
&& password.Length != 0)
|
||||
{
|
||||
|
||||
if (bMiCasaIsAvailable)
|
||||
{
|
||||
UpdateMiCasaCredential(userName, password, m_svcName, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateCredentialCache(userName, password, m_credScope);
|
||||
}
|
||||
|
||||
// Remember that there object has credentials associated with it to avoid
|
||||
// looking them up in the cache at a later time.
|
||||
m_haveCredentials = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Indicate that we need to look up the credentials in the cache
|
||||
m_haveCredentials = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a NetworkCredential instance from the cache.
|
||||
/// </summary>
|
||||
/// <param name="uriPrefix">A Uri that specifies the URI prefix of the resources that the credential is used for.</param>
|
||||
/// <param name="authType">The authentication scheme used by the host named in <i>uriPrefix</i>. </param>
|
||||
public void Remove(Uri uriPrefix,
|
||||
String authType)
|
||||
{
|
||||
// Only process requests for the "Basic" authentication scheme
|
||||
if (authType.ToUpper() == "BASIC")
|
||||
{
|
||||
|
||||
if (bMiCasaIsAvailable)
|
||||
{
|
||||
RemoveMiCasaCredential(uriPrefix.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if we already have credentials
|
||||
if (m_haveCredentials)
|
||||
{
|
||||
// Clear the credentials.
|
||||
m_password = null;
|
||||
m_haveCredentials = false;
|
||||
}
|
||||
|
||||
//
|
||||
// Lookup the credentials in the cache
|
||||
//
|
||||
// Synchronize access into the cache
|
||||
lock (m_userCaches)
|
||||
{
|
||||
// Look for the user's cache
|
||||
int i;
|
||||
for (i = 0; i < m_userCaches.Length; i++)
|
||||
{
|
||||
// Check if the user cache has been instantiated
|
||||
if (m_userCaches[i] != null)
|
||||
{
|
||||
if (m_userCaches[i].m_userName == m_userName)
|
||||
{
|
||||
// We found a cache for this user, remove the credentials.
|
||||
m_userCaches[i].m_credentialCache.Remove(new Uri("http://" + m_credScope, true), "Basic");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Dbg.trcError("NetCredential.GetCredential- Unsupported authentication scheme");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Obtains the network credentials necessary to gain access to the resources associated
|
||||
/// with the specified uri prefix.
|
||||
/// </summary>
|
||||
/// <param name="uriPrefix">Uri that specifies the URI prefix of resources that the credential grant access to</param>
|
||||
/// <param name="authType">The authentication scheme used by the resource</param>
|
||||
/// <returns>NetworkCredential object or null if not successful</returns>
|
||||
public NetworkCredential GetCredential(Uri uriPrefix,
|
||||
String authType)
|
||||
{
|
||||
NetworkCredential cred = null;
|
||||
|
||||
// Only process requests for the "Basic" authentication scheme
|
||||
if (authType.ToUpper() == "BASIC")
|
||||
{
|
||||
|
||||
if (bMiCasaIsAvailable)
|
||||
{
|
||||
return GetMiCasaCredential(m_svcName, m_svcGroupName);
|
||||
}
|
||||
|
||||
// Check if we already have credentials
|
||||
if (m_haveCredentials)
|
||||
{
|
||||
// Create NetworkCredential object with the credentials that we have.
|
||||
cred = new NetworkCredential(m_userName, m_password);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Lookup the credentials in the cache
|
||||
//
|
||||
// Synchronize access into the cache
|
||||
lock (m_userCaches)
|
||||
{
|
||||
// Look for the user's cache
|
||||
int i;
|
||||
for (i = 0; i < m_userCaches.Length; i++)
|
||||
{
|
||||
// Check if the user cache has been instantiated
|
||||
if (m_userCaches[i] != null)
|
||||
{
|
||||
if (m_userCaches[i].m_userName == m_userName)
|
||||
{
|
||||
// We found a cache for this user, check if we already have the
|
||||
// necessary credentials.
|
||||
cred = m_userCaches[i].m_credentialCache.GetCredential(new Uri("http://" + m_credScope, true), "Basic");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Dbg.trcError("NetCredential.GetCredential- Unsuported authentication scheme");
|
||||
}
|
||||
|
||||
return cred;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the credential cache with the supplied credentials.
|
||||
/// </summary>
|
||||
/// <param name="userName">Name of the user.</param>
|
||||
/// <param name="password">User password.</param>
|
||||
/// <param name="credScope">Credential scope.</param>
|
||||
private void UpdateCredentialCache(string userName, string password, string credScope)
|
||||
{
|
||||
// Check if we already have a cache for the user
|
||||
lock (m_userCaches)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < m_userCaches.Length; i++)
|
||||
{
|
||||
// Check if the user cache has been instantiated
|
||||
if (m_userCaches[i] != null)
|
||||
{
|
||||
if (m_userCaches[i].m_userName == userName)
|
||||
{
|
||||
// A user cache has already been instantiated, check if
|
||||
// we already have a cache entry.
|
||||
if (m_userCaches[i].m_credentialCache.GetCredential(new Uri("http://" + credScope, true), "Basic") != null)
|
||||
{
|
||||
// We have a cache entry, remove it.
|
||||
m_userCaches[i].m_credentialCache.Remove(new Uri("http://" + credScope, true), "Basic");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Instantiate user cache and use it
|
||||
m_userCaches[i] = new UserCache();
|
||||
|
||||
// Setup user cache
|
||||
m_userCaches[i].m_userName = userName;
|
||||
m_userCaches[i].m_credentialCache = new CredentialCache();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Exit if we failed to obtain a user cache
|
||||
if (i == m_userCaches.Length)
|
||||
return;
|
||||
|
||||
// Create NetworkCredential object and add it to the credential cache
|
||||
NetworkCredential cred = new NetworkCredential(userName, password);
|
||||
m_userCaches[i].m_credentialCache.Add(new Uri("http://" + credScope, true), "Basic", cred);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// the following is micasa/secretstore code.
|
||||
private void UpdateMiCasaCredential(string sUsername, string sPassword, string sSecretID, string sSharedID)
|
||||
{
|
||||
|
||||
// call SetCredential through reflection
|
||||
Type type = assembly.GetType(MI_CASA_CLASS_NAME);
|
||||
object Instance = Activator.CreateInstance (type);
|
||||
|
||||
object[] arguments = new object[4];
|
||||
arguments[0] = sSecretID;
|
||||
arguments[1] = sSharedID;
|
||||
arguments[2] = sUsername;
|
||||
arguments[3] = sPassword;
|
||||
|
||||
object result;
|
||||
try
|
||||
{
|
||||
result = type.InvokeMember("SetBasicCredential", BindingFlags.InvokeMethod, null, Instance, arguments);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Dbg.trcError(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private NetworkCredential GetMiCasaCredential(string sSecretID, string sSharedID)
|
||||
{
|
||||
object oUsername;
|
||||
object oPassword;
|
||||
|
||||
Type type = assembly.GetType(MI_CASA_CLASS_NAME);
|
||||
object Instance = Activator.CreateInstance (type);
|
||||
|
||||
try
|
||||
{
|
||||
object[] arguments = new object[2];
|
||||
arguments[0] = sSecretID;
|
||||
arguments[1] = sSharedID;
|
||||
|
||||
// reflection call
|
||||
oUsername = type.InvokeMember("GetCredentialUsername", BindingFlags.InvokeMethod, null, Instance, arguments);
|
||||
oPassword = type.InvokeMember("GetCredentialPassword", BindingFlags.InvokeMethod, null, Instance, arguments);
|
||||
|
||||
if ((oUsername != null) & (oPassword != null))
|
||||
return new NetworkCredential(oUsername.ToString().Trim(), oPassword.ToString().Trim());
|
||||
|
||||
// invoke the GetUsername and GetPassword methods
|
||||
//object username = basicCred.InvokeMember("GetUsername", BindingFlags.InvokeMethod, null, result, null);
|
||||
//object password = basicCred.InvokeMember("GetPassword", BindingFlags.InvokeMethod, null, result, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Dbg.trcError(e.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void RemoveMiCasaCredential(string sSecretID)
|
||||
{
|
||||
Type type = assembly.GetType(MI_CASA_CLASS_NAME);
|
||||
object Instance = Activator.CreateInstance (type);
|
||||
|
||||
try
|
||||
{
|
||||
object[] arguments = new object[2];
|
||||
arguments[0] = sSecretID;
|
||||
arguments[1] = null;
|
||||
|
||||
// reflection call
|
||||
type.InvokeMember("RemoveBasicCredential", BindingFlags.InvokeMethod, null, Instance, arguments);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Dbg.trcError(e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
34
ClientPasswordManager/c-sharp-net-credential/README
Normal file
34
ClientPasswordManager/c-sharp-net-credential/README
Normal file
@ -0,0 +1,34 @@
|
||||
/***********************************************************************
|
||||
* File: README
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
The c-sharp-net-credential component provides the class NetCredential
|
||||
which is an implementation of the ICredentials interface. Applications
|
||||
can use objects of this class to satisfy credential queries from classes
|
||||
such as the WebRequest class..
|
||||
|
||||
FEATURES
|
||||
|
||||
The c-sharp-net-credential class allows the user to set or retrieve
|
||||
password credentials from the credential cache provided by the SecretStore
|
||||
Client Service Wallet. The application can control how credentials are scoped
|
||||
in the credential store through the parameters utilized to instantiate
|
||||
NetCredential objects.
|
@ -0,0 +1,114 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{D7D0F5D8-0F45-4DCA-818B-8E71168A2CA3}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "Novell.Security.ClientPasswordManager.NetCredential"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Library"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "Novell.Security.ClientPasswordManager"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Windows.Forms"
|
||||
AssemblyName = "System.Windows.Forms"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Novell.Security.Utilities"
|
||||
AssemblyName = "Novell.Security.Utilities"
|
||||
HintPath = "..\c-sharp-utilities\bin\Debug\Novell.Security.Utilities.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "c-sharp-net-credential.snk"
|
||||
BuildAction = "None"
|
||||
/>
|
||||
<File
|
||||
RelPath = "NetCredential.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
@ -0,0 +1,48 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP LastOpenVersion = "7.10.3077" >
|
||||
<Build>
|
||||
<Settings ReferencePath = "C:\Documents and Settings\jluciani\My Documents\Visual Studio Projects\ClientPasswordManager\c-sharp-utilities\bin\Debug\;C:\Documents and Settings\jluciani\My Documents\Visual Studio Projects\ClientPasswordManager\c-sharp-username-dialog\bin\Debug\;C:\Documents and Settings\jluciani\My Documents\Visual Studio Projects\ClientPasswordManager\c-sharp-password-dialog\bin\Debug\;C:\Documents and Settings\jluciani\My Documents\Visual Studio Projects\ClientPasswordManager\c-sharp-utilities\bin\Release\;D:\ccm\SSClient\ClientPasswordManager\c-sharp-utilities\bin\Debug\;D:\ccm\SSClient\SecretStoreClient_src\ClientPasswordManager\c-sharp-utilities\bin\Debug\;D:\ccm\SSClient\SecretStoreClient_src\ClientPasswordManager\c-sharp-utilities\obj\Release\" >
|
||||
<Config
|
||||
Name = "Debug"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "true"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
</Settings>
|
||||
</Build>
|
||||
<OtherProjectSettings
|
||||
CopyProjectDestinationFolder = ""
|
||||
CopyProjectUncPath = ""
|
||||
CopyProjectOption = "0"
|
||||
ProjectView = "ProjectFiles"
|
||||
ProjectTrust = "0"
|
||||
/>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
Binary file not shown.
85
ClientPasswordManager/c-sharp-password-dialog/Makefile.am
Normal file
85
ClientPasswordManager/c-sharp-password-dialog/Makefile.am
Normal file
@ -0,0 +1,85 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
if WINDOWS
|
||||
Module_CSFILES = $(srcdir)/passwordDialog.cs
|
||||
Module_LIBS = System.dll System.Data.dll $(SYSTEM_XML) Novell.Security.Utilities.dll
|
||||
Module_PKGS =
|
||||
else
|
||||
Module_CSFILES = $(srcdir)/passwordDialog-gtk.cs
|
||||
Module_LIBS = System.dll System.Data.dll System.Drawing $(SYSTEM_XML) Novell.Security.Utilities.dll
|
||||
Module_PKGS = -pkg:gtk-sharp
|
||||
endif
|
||||
|
||||
Module_KEYFILE = $(srcdir)/c-sharp-password-dialog.snk
|
||||
Module_CSFILES_CSC := $(subst /,$(SEP),$(Module_CSFILES))
|
||||
Module_INCLUDES =
|
||||
Module_RESOURCES =
|
||||
Module_FLAGS = $(CSC_LIBFLAG)
|
||||
Module_LIBPATH = ../c-sharp-utilities/bin/$(TARGET_CFG)
|
||||
|
||||
EXTRA_DIST = $(Module_CSFILES) $(Module_KEYFILE)
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: Novell.Security.ClientPasswordManager.PasswordDialog.dll
|
||||
|
||||
Novell.Security.ClientPasswordManager.PasswordDialog.dll: $(Module_CSFILES) $(Module_RESOURCES)
|
||||
$(mkinstalldirs) bin/$(TARGET_CFG)
|
||||
if WINDOWS
|
||||
$(CSC) /nowarn:1591,1573,1572 /out:bin/$(TARGET_CFG)/$@ $(CSCFLAGS) $(Module_FLAGS) $(Module_PKGS) $(Module_LIBS:%=/r:%) $(Module_LIBPATH:%=/lib:%) $(Module_CSFILES_CSC) /doc:Novell.Security.ClientPasswordManager.PasswordDialog.doc.xml
|
||||
else
|
||||
$(CSC) /nowarn:1591,1573,1572 /out:bin/$(TARGET_CFG)/$@ $(CSCFLAGS) $(Module_FLAGS) /keyfile:$(Module_KEYFILE) $(Module_PKGS) $(Module_LIBS:%=/r:%) $(Module_LIBPATH:%=/lib:%) $(Module_CSFILES_CSC) /doc:Novell.Security.ClientPasswordManager.PasswordDialog.doc.xml
|
||||
endif
|
||||
|
||||
install-exec-local: Novell.Security.ClientPasswordManager.PasswordDialog.dll
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) bin/$(TARGET_CFG)/Novell.Security.ClientPasswordManager.PasswordDialog.dll $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f Novell.Security.ClientPasswordManager.PasswordDialog.dll
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
CLEAN_FILES = bin/$(TARGET_CFG)/Novell.Security.ClientPasswordManager.PasswordDialog.dll /doc:Novell.Security.ClientPasswordManager.PasswordDialog.doc.xml
|
||||
|
||||
clean-local:
|
||||
rm -rf *.dbg *.exe *.dll $(CLEAN_FILES)
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
28
ClientPasswordManager/c-sharp-password-dialog/README
Normal file
28
ClientPasswordManager/c-sharp-password-dialog/README
Normal file
@ -0,0 +1,28 @@
|
||||
/***********************************************************************
|
||||
* File: README
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
The c-sharp-password-dialog provides a class (PasswordDialog) that can be used
|
||||
by .NET applications to query users for their password.
|
||||
|
||||
FEATURES
|
||||
|
||||
The PasswordDialog Class utilizes Windows Forms under Win32 and GTK# under Linux.
|
@ -0,0 +1,119 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{5A211C70-3AEB-4305-8CB6-42757D01DC22}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "Novell.Security.ClientPasswordManager.PasswordDialog"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Library"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "Novell.Security.ClientPasswordManager"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Drawing"
|
||||
AssemblyName = "System.Drawing"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Windows.Forms"
|
||||
AssemblyName = "System.Windows.Forms"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "c-sharp-password-dialog.snk"
|
||||
BuildAction = "None"
|
||||
/>
|
||||
<File
|
||||
RelPath = "passwordDialog.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "passwordDialog.resx"
|
||||
DependentUpon = "passwordDialog.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
@ -0,0 +1,48 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP LastOpenVersion = "7.10.3077" >
|
||||
<Build>
|
||||
<Settings ReferencePath = "" >
|
||||
<Config
|
||||
Name = "Debug"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
</Settings>
|
||||
</Build>
|
||||
<OtherProjectSettings
|
||||
CopyProjectDestinationFolder = ""
|
||||
CopyProjectUncPath = ""
|
||||
CopyProjectOption = "0"
|
||||
ProjectView = "ProjectFiles"
|
||||
ProjectTrust = "0"
|
||||
/>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
Binary file not shown.
@ -0,0 +1,183 @@
|
||||
/***********************************************************************
|
||||
* File: passwordDialog-gtk.cs
|
||||
* Author: Juan Carlos Luciani (jluciani@novell.com)
|
||||
*
|
||||
* Namespace: Novell.Security.ClientPasswordManager
|
||||
*
|
||||
* Classes implemented: PasswordDialog.
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using Gtk;
|
||||
|
||||
namespace Novell.Security.ClientPasswordManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Class implements user name dialog leveraging Gtk#.
|
||||
/// </summary>
|
||||
sealed public class passwordDialog : Dialog
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
private Entry m_passwordEntry;
|
||||
private Button m_okButton;
|
||||
private Button m_cancelButton;
|
||||
|
||||
// The following strings need to be localized
|
||||
private static string m_passwordLabelText = "Password:";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="title">Title to use for the dialog.</param>
|
||||
public passwordDialog(string title) : base()
|
||||
{
|
||||
this.Title = title;
|
||||
this.HasSeparator = false;
|
||||
this.Resizable = false;
|
||||
this.Modal = true;
|
||||
|
||||
HBox h = new HBox();
|
||||
h.BorderWidth = 12;
|
||||
h.Spacing = 6;
|
||||
|
||||
Label l = new Label(m_passwordLabelText);
|
||||
l.Xalign = 0;
|
||||
h.PackStart(l, false, false, 0);
|
||||
|
||||
m_passwordEntry = new Entry();
|
||||
m_passwordEntry.ActivatesDefault = true;
|
||||
m_passwordEntry.Visibility = false;
|
||||
h.PackStart(m_passwordEntry, true, true, 0);
|
||||
|
||||
h.ShowAll();
|
||||
this.VBox.Add(h);
|
||||
|
||||
m_okButton = new Button(Stock.Ok);
|
||||
m_okButton.CanDefault = true;
|
||||
this.AddActionWidget(m_okButton, ResponseType.Ok);
|
||||
|
||||
m_cancelButton = new Button(Stock.Cancel);
|
||||
this.AddActionWidget(m_cancelButton, ResponseType.Cancel);
|
||||
|
||||
this.DefaultResponse = ResponseType.Ok;
|
||||
this.ShowAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the dialog and gathers the user input.
|
||||
/// </summary>
|
||||
/// <param name="parent">Window owner.</param>
|
||||
/// <returns>True if the user input was gathered, else false.</returns>
|
||||
public bool Invoke(Window parent)
|
||||
{
|
||||
// Set focus on the entry widget, display the dialog, and
|
||||
// hide it once it is answered.
|
||||
this.Focus = m_passwordEntry;
|
||||
this.TransientFor = parent;
|
||||
ResponseType resp = (ResponseType) this.Run();
|
||||
this.Hide();
|
||||
|
||||
// Proceed based on the dialog response value
|
||||
if (resp == ResponseType.Ok)
|
||||
{
|
||||
// The user provided the necessary input
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The user either hit the cancel button or closed
|
||||
// the window.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the password entered by the user.
|
||||
/// </summary>
|
||||
/// <returns>NetworkCredential object or null if not successful</returns>
|
||||
public System.String password { get {return m_passwordEntry.Text;}}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class wrapper around the passwordDialog class. This wrapper is utilized
|
||||
/// to hide the use of Gtk# from its users.
|
||||
/// </summary>
|
||||
public class PasswordDialog
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
passwordDialog m_dialog;
|
||||
|
||||
// The following strings need to be localized
|
||||
private static string m_titleStartText = "Login to ";
|
||||
private static string m_titleRealmText = ", Realm: ";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service on whose behalf we are acquiring password.</param>
|
||||
public PasswordDialog(string svcName)
|
||||
{
|
||||
// Instantiate the dialog with the appropriate title
|
||||
m_dialog = new passwordDialog(m_titleStartText + svcName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service on whose behalf we are acquiring password.</param>
|
||||
/// <param name="realm">Name of realm to which the service belongs, can be empty string or null.</param>
|
||||
public PasswordDialog(string svcName, string realm)
|
||||
{
|
||||
// Instantiate the dialog with the appropriate title
|
||||
if (realm != null && realm.Length != 0)
|
||||
{
|
||||
m_dialog = new passwordDialog(m_titleStartText + svcName + m_titleRealmText + realm);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialog = new passwordDialog(m_titleStartText + svcName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the dialog and gathers the user input.
|
||||
/// </summary>
|
||||
/// <param name="o">Window owner.</param>
|
||||
/// <returns>True if the user input was gathered, else false.</returns>
|
||||
public bool Invoke(System.Object o)
|
||||
{
|
||||
return m_dialog.Invoke((Window) o);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the password entered by the user.
|
||||
/// </summary>
|
||||
public System.String password { get {return m_dialog.password;}}
|
||||
}
|
||||
}
|
266
ClientPasswordManager/c-sharp-password-dialog/passwordDialog.cs
Normal file
266
ClientPasswordManager/c-sharp-password-dialog/passwordDialog.cs
Normal file
@ -0,0 +1,266 @@
|
||||
/***********************************************************************
|
||||
* File: passwordDialog.cs
|
||||
* Author: Juan Carlos Luciani (jluciani@novell.com)
|
||||
*
|
||||
* Namespace: Novell.Security.ClientPasswordManager
|
||||
*
|
||||
* Classes implemented: PasswordDialog.
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Novell.Security.ClientPasswordManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a dialog for the acquisition of passwords.
|
||||
/// </summary>
|
||||
public class passwordDialog : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox passwordField;
|
||||
private System.Windows.Forms.Button okBtn;
|
||||
private System.Windows.Forms.Button cancelBtn;
|
||||
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="title">Title to used with dialog.</param>
|
||||
public passwordDialog(string title)
|
||||
{
|
||||
// Required for Windows Form Designer support
|
||||
InitializeComponent();
|
||||
|
||||
// Update the form title
|
||||
Text = title;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.passwordField = new System.Windows.Forms.TextBox();
|
||||
this.okBtn = new System.Windows.Forms.Button();
|
||||
this.cancelBtn = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.label1.Location = new System.Drawing.Point(16, 24);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(56, 16);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Password:";
|
||||
//
|
||||
// passwordField
|
||||
//
|
||||
this.passwordField.AcceptsReturn = true;
|
||||
this.passwordField.Location = new System.Drawing.Point(96, 24);
|
||||
this.passwordField.MaxLength = 64;
|
||||
this.passwordField.Name = "passwordField";
|
||||
this.passwordField.PasswordChar = '*';
|
||||
this.passwordField.Size = new System.Drawing.Size(224, 20);
|
||||
this.passwordField.TabIndex = 5;
|
||||
this.passwordField.Text = "";
|
||||
//
|
||||
// okBtn
|
||||
//
|
||||
this.okBtn.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.okBtn.Location = new System.Drawing.Point(152, 64);
|
||||
this.okBtn.Name = "okBtn";
|
||||
this.okBtn.TabIndex = 7;
|
||||
this.okBtn.Text = "Ok";
|
||||
this.okBtn.Click += new System.EventHandler(this.okBtn_Click);
|
||||
//
|
||||
// cancelBtn
|
||||
//
|
||||
this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.cancelBtn.Location = new System.Drawing.Point(240, 64);
|
||||
this.cancelBtn.Name = "cancelBtn";
|
||||
this.cancelBtn.TabIndex = 8;
|
||||
this.cancelBtn.Text = "Cancel";
|
||||
//
|
||||
// passwordDialog
|
||||
//
|
||||
this.AcceptButton = this.okBtn;
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.CancelButton = this.cancelBtn;
|
||||
this.ClientSize = new System.Drawing.Size(338, 96);
|
||||
this.Controls.Add(this.cancelBtn);
|
||||
this.Controls.Add(this.okBtn);
|
||||
this.Controls.Add(this.passwordField);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "passwordDialog";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Load += new System.EventHandler(this.passwordDialog_Load);
|
||||
this.Activated += new System.EventHandler(this.passwordDialog_Activated);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Handler for form activation event.
|
||||
/// </summary>
|
||||
private void passwordDialog_Activated(object sender, System.EventArgs e)
|
||||
{
|
||||
passwordField.Focus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handler for Ok button click event.
|
||||
/// </summary>
|
||||
private void okBtn_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
// Dispose of the dialog and set DialogResult to OK
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void passwordDialog_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the password entered by the user.
|
||||
/// </summary>
|
||||
public System.String password { get {return passwordField.Text;}}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class wrapper around the passwordDialog class. This wrapper is utilized
|
||||
/// to hide the use of Gtk# from its users.
|
||||
/// </summary>
|
||||
public class PasswordDialog
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
// The following strings need to be localized
|
||||
private static string m_titleStartText = "Login to ";
|
||||
private static string m_titleRealmText = ", Realm: ";
|
||||
|
||||
// Title that will be used with the dialog
|
||||
private string m_dialogTitle;
|
||||
|
||||
// Input gathered from the user
|
||||
private string m_password;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service on whose behalf we are acquiring password.</param>
|
||||
public PasswordDialog(string svcName)
|
||||
{
|
||||
// Setup the title that will be used with the dialog
|
||||
m_dialogTitle = m_titleStartText + svcName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service on whose behalf we are acquiring password.</param>
|
||||
/// <param name="realm">Name of realm to which the service belongs, can be empty string or null.</param>
|
||||
public PasswordDialog(string svcName, string realm)
|
||||
{
|
||||
// Setup the appropriate title that will be used with the dialog
|
||||
if (realm != null && realm.Length != 0)
|
||||
{
|
||||
m_dialogTitle = m_titleStartText + svcName + m_titleRealmText + realm;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialogTitle = m_titleStartText + svcName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the dialog and gathers the user input.
|
||||
/// </summary>
|
||||
/// <param name="o">Window owner.</param>
|
||||
/// <returns>True if the user input was gathered, else false.</returns>
|
||||
public bool Invoke(System.Object o)
|
||||
{
|
||||
bool retVal;
|
||||
|
||||
// Instantiate and show passwordDialog
|
||||
passwordDialog dialog = new passwordDialog(m_dialogTitle);
|
||||
if (dialog.ShowDialog((IWin32Window) o) == DialogResult.OK)
|
||||
{
|
||||
// Save the password entered
|
||||
m_password = dialog.password;
|
||||
|
||||
// Indicate success
|
||||
retVal = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The user either hit the cancel button or closed
|
||||
// the window.
|
||||
retVal = false;
|
||||
}
|
||||
|
||||
// Dispose of the dialog
|
||||
dialog.Dispose();
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the password entered by the user.
|
||||
/// </summary>
|
||||
public System.String password { get {return m_password;}}
|
||||
}
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="passwordField.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="passwordField.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="passwordField.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="okBtn.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="okBtn.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="okBtn.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cancelBtn.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cancelBtn.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cancelBtn.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>passwordDialog</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
</root>
|
@ -0,0 +1,58 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("Novell.Security.ClientPasswordManager ")]
|
||||
[assembly: AssemblyDescription("Implements the usernameDialog class for Novell.Security.ClientPasswordManager")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Novell, Inc.")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright (C) 2004 Novell, Inc.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("..\\..\\c-sharp-username-dialog.snk")]
|
||||
[assembly: AssemblyKeyName("")]
|
85
ClientPasswordManager/c-sharp-username-dialog/Makefile.am
Normal file
85
ClientPasswordManager/c-sharp-username-dialog/Makefile.am
Normal file
@ -0,0 +1,85 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
if WINDOWS
|
||||
Module_CSFILES = $(srcdir)/usernameDialog.cs
|
||||
Module_LIBS = System.dll System.Data.dll $(SYSTEM_XML) Novell.Security.Utilities.dll
|
||||
Module_PKGS =
|
||||
else
|
||||
Module_CSFILES = $(srcdir)/usernameDialog-gtk.cs
|
||||
Module_LIBS = System.dll System.Data.dll System.Drawing $(SYSTEM_XML) Novell.Security.Utilities.dll
|
||||
Module_PKGS = -pkg:gtk-sharp
|
||||
endif
|
||||
|
||||
Module_KEYFILE = $(srcdir)/c-sharp-username-dialog.snk
|
||||
Module_CSFILES_CSC := $(subst /,$(SEP),$(Module_CSFILES))
|
||||
Module_INCLUDES =
|
||||
Module_RESOURCES =
|
||||
Module_FLAGS = $(CSC_LIBFLAG)
|
||||
Module_LIBPATH = ../c-sharp-utilities/bin/$(TARGET_CFG)
|
||||
|
||||
EXTRA_DIST = $(Module_CSFILES) $(Module_KEYFILE)
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: Novell.Security.ClientPasswordManager.UsernameDialog.dll
|
||||
|
||||
Novell.Security.ClientPasswordManager.UsernameDialog.dll: $(Module_CSFILES) $(Module_RESOURCES)
|
||||
$(mkinstalldirs) bin/$(TARGET_CFG)
|
||||
if WINDOWS
|
||||
$(CSC) /nowarn:1591,1573,1572 /out:bin/$(TARGET_CFG)/$@ $(CSCFLAGS) $(Module_FLAGS) $(Module_PKGS) $(Module_LIBS:%=/r:%) $(Module_LIBPATH:%=/lib:%) $(Module_CSFILES_CSC) /doc:Novell.Security.ClientPasswordManager.UsernameDialog.doc.xml
|
||||
else
|
||||
$(CSC) /nowarn:1591,1573,1572 /out:bin/$(TARGET_CFG)/$@ $(CSCFLAGS) $(Module_FLAGS) /keyfile:$(Module_KEYFILE) $(Module_PKGS) $(Module_LIBS:%=/r:%) $(Module_LIBPATH:%=/lib:%) $(Module_CSFILES_CSC) /doc:Novell.Security.ClientPasswordManager.UsernameDialog.doc.xml
|
||||
endif
|
||||
|
||||
install-exec-local: Novell.Security.ClientPasswordManager.UsernameDialog.dll
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) bin/$(TARGET_CFG)/Novell.Security.ClientPasswordManager.UsernameDialog.dll $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f Novell.Security.ClientPasswordManager.UsernameDialog.dll
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
CLEAN_FILES = bin/$(TARGET_CFG)/Novell.Security.ClientPasswordManager.UsernameDialog.dll /doc:Novell.Security.ClientPasswordManager.UsernameDialog.doc.xml
|
||||
|
||||
clean-local:
|
||||
rm -rf *.dbg *.exe *.dll $(CLEAN_FILES)
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
28
ClientPasswordManager/c-sharp-username-dialog/README
Normal file
28
ClientPasswordManager/c-sharp-username-dialog/README
Normal file
@ -0,0 +1,28 @@
|
||||
/***********************************************************************
|
||||
* File: README
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
The c-sharp-username-dialog provides a class (UsernameDialog) that can be used
|
||||
by .NET applications to query users for their user name.
|
||||
|
||||
FEATURES
|
||||
|
||||
The UsernameDialog Class utilizes Windows Forms under Win32 and GTK# under Linux.
|
@ -0,0 +1,119 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "Novell.Security.ClientPasswordManager.UsernameDialog"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Library"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "Novell.Security.ClientPasswordManager"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Drawing"
|
||||
AssemblyName = "System.Drawing"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Windows.Forms"
|
||||
AssemblyName = "System.Windows.Forms"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "c-sharp-username-dialog.snk"
|
||||
BuildAction = "None"
|
||||
/>
|
||||
<File
|
||||
RelPath = "usernameDialog.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "usernameDialog.resx"
|
||||
DependentUpon = "usernameDialog.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
@ -0,0 +1,48 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP LastOpenVersion = "7.10.3077" >
|
||||
<Build>
|
||||
<Settings ReferencePath = "" >
|
||||
<Config
|
||||
Name = "Debug"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
</Settings>
|
||||
</Build>
|
||||
<OtherProjectSettings
|
||||
CopyProjectDestinationFolder = ""
|
||||
CopyProjectUncPath = ""
|
||||
CopyProjectOption = "0"
|
||||
ProjectView = "ProjectFiles"
|
||||
ProjectTrust = "0"
|
||||
/>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
Binary file not shown.
@ -0,0 +1,257 @@
|
||||
/***********************************************************************
|
||||
* File: usernameDialog-gtk.cs
|
||||
* Author: Juan Carlos Luciani (jluciani@novell.com)
|
||||
*
|
||||
* Namespace: Novell.Security.ClientPasswordManager
|
||||
*
|
||||
* Classes implemented: UsernameDialog.
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using Gtk;
|
||||
|
||||
namespace Novell.Security.ClientPasswordManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Class implements user name dialog leveraging Gtk#.
|
||||
/// </summary>
|
||||
sealed public class usernameDialog : Dialog
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
private Entry m_userNameEntry;
|
||||
private Button m_okButton;
|
||||
private Button m_cancelButton;
|
||||
|
||||
// The following strings need to be localized
|
||||
private static string m_userNameLabelText = "User name:";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Class implements dialog to notify user that it needs to
|
||||
/// input the user name.
|
||||
/// </summary>
|
||||
private class inputRequiredDialog: Dialog
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
// The following strings need to be localized
|
||||
private static string m_inputRequiredLabelText = "User name required";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="title">Title to be used with the dialog.</param>
|
||||
public inputRequiredDialog(string title) : base()
|
||||
{
|
||||
this.Title = title;
|
||||
this.HasSeparator = false;
|
||||
this.Resizable = false;
|
||||
this.Modal = true;
|
||||
this.DefaultResponse = ResponseType.Ok;
|
||||
|
||||
HBox h = new HBox();
|
||||
h.BorderWidth = 12;
|
||||
h.Spacing = 6;
|
||||
|
||||
Gtk.Image i = new Gtk.Image();
|
||||
i.SetFromStock(Stock.DialogError, IconSize.Dialog);
|
||||
i.SetAlignment(0.5F, 0);
|
||||
h.PackStart(i, false, false, 0);
|
||||
|
||||
Label l = new Label("<span weight=\"bold\" size=\"larger\">"
|
||||
+ m_inputRequiredLabelText
|
||||
+ "</span>");
|
||||
l.LineWrap = true;
|
||||
l.UseMarkup = true;
|
||||
l.Selectable = false;
|
||||
l.Xalign = 0;
|
||||
l.Yalign = 0;
|
||||
h.PackStart(l, false, false, 0);
|
||||
|
||||
h.ShowAll();
|
||||
this.VBox.Add(h);
|
||||
|
||||
this.AddButton(Stock.Ok, ResponseType.Ok);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="title">Title to use for the dialog.</param>
|
||||
public usernameDialog(string title) : base()
|
||||
{
|
||||
this.Title = title;
|
||||
this.HasSeparator = false;
|
||||
this.Resizable = false;
|
||||
this.Modal = true;
|
||||
|
||||
HBox h = new HBox();
|
||||
h.BorderWidth = 12;
|
||||
h.Spacing = 6;
|
||||
|
||||
Label l = new Label(m_userNameLabelText);
|
||||
l.Xalign = 0;
|
||||
h.PackStart(l, false, false, 0);
|
||||
|
||||
m_userNameEntry = new Entry();
|
||||
m_userNameEntry.ActivatesDefault = true;
|
||||
h.PackStart(m_userNameEntry, true, true, 0);
|
||||
|
||||
h.ShowAll();
|
||||
this.VBox.Add(h);
|
||||
|
||||
m_okButton = new Button(Stock.Ok);
|
||||
m_okButton.CanDefault = true;
|
||||
this.AddActionWidget(m_okButton, ResponseType.Ok);
|
||||
|
||||
m_cancelButton = new Button(Stock.Cancel);
|
||||
this.AddActionWidget(m_cancelButton, ResponseType.Cancel);
|
||||
|
||||
this.DefaultResponse = ResponseType.Ok;
|
||||
this.ShowAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the dialog and gathers the user input.
|
||||
/// </summary>
|
||||
/// <param name="parent">Window owner.</param>
|
||||
/// <returns>True if the user input was gathered, else false.</returns>
|
||||
public bool Invoke(Window parent)
|
||||
{
|
||||
bool retVal;
|
||||
|
||||
while (true)
|
||||
{
|
||||
// Set focus on the entry widget, display the dialog, and
|
||||
// hide it once it is answered.
|
||||
this.Focus = m_userNameEntry;
|
||||
this.TransientFor = parent;
|
||||
ResponseType resp = (ResponseType) this.Run();
|
||||
this.Hide();
|
||||
|
||||
// Proceed based on the dialog response value
|
||||
if (resp == ResponseType.Ok)
|
||||
{
|
||||
// Verify that the user entered the desired information
|
||||
if (m_userNameEntry.Text.Length != 0)
|
||||
{
|
||||
// The user name was entered, indicate success and
|
||||
// get ready to exit.
|
||||
retVal = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inform the user that it must enter a name
|
||||
inputRequiredDialog errorDialog = new inputRequiredDialog(Title);
|
||||
errorDialog.Run();
|
||||
errorDialog.Hide();
|
||||
|
||||
// Show the user name dialog again
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// The user either hit the cancel button or closed
|
||||
// the window.
|
||||
retVal = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name entered by the user.
|
||||
/// </summary>
|
||||
/// <returns>NetworkCredential object or null if not successful</returns>
|
||||
public System.String userName { get {return m_userNameEntry.Text;}}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class wrapper around the usernameDialog class. This wrapper is utilized
|
||||
/// to hide the use of Gtk# from its users.
|
||||
/// </summary>
|
||||
public class UsernameDialog
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
usernameDialog m_dialog;
|
||||
|
||||
// The following strings need to be localized
|
||||
private static string m_titleStartText = "Login to ";
|
||||
private static string m_titleRealmText = ", Realm: ";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service on whose behalf we are acquiring user name.</param>
|
||||
public UsernameDialog(string svcName)
|
||||
{
|
||||
// Instantiate the dialog with the appropriate title
|
||||
m_dialog = new usernameDialog(m_titleStartText + svcName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service on whose behalf we are acquiring user name.</param>
|
||||
/// <param name="realm">Name of realm to which the service belongs, can be empty string or null.</param>
|
||||
public UsernameDialog(string svcName, string realm)
|
||||
{
|
||||
// Instantiate the dialog with the appropriate title
|
||||
if (realm != null && realm.Length != 0)
|
||||
{
|
||||
m_dialog = new usernameDialog(m_titleStartText + svcName + m_titleRealmText + realm);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialog = new usernameDialog(m_titleStartText + svcName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the dialog and gathers the user input.
|
||||
/// </summary>
|
||||
/// <param name="o">Window owner.</param>
|
||||
/// <returns>True if the user input was gathered, else false.</returns>
|
||||
public bool Invoke(System.Object o)
|
||||
{
|
||||
return m_dialog.Invoke((Window) o);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name entered by the user.
|
||||
/// </summary>
|
||||
public System.String userName { get {return m_dialog.userName;}}
|
||||
}
|
||||
}
|
291
ClientPasswordManager/c-sharp-username-dialog/usernameDialog.cs
Normal file
291
ClientPasswordManager/c-sharp-username-dialog/usernameDialog.cs
Normal file
@ -0,0 +1,291 @@
|
||||
/***********************************************************************
|
||||
* File: usernameDialog.cs
|
||||
* Author: Juan Carlos Luciani (jluciani@novell.com)
|
||||
*
|
||||
* Namespace: Novell.Security.ClientPasswordManager
|
||||
*
|
||||
* Classes implemented: UsernameDialog.
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Novell.Security.ClientPasswordManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a dialog for the acquisition of user names.
|
||||
/// </summary>
|
||||
sealed public class usernameDialog : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.TextBox usernameField;
|
||||
private System.Windows.Forms.Button okBtn;
|
||||
private System.Windows.Forms.Button cancelBtn;
|
||||
private System.Windows.Forms.Label label1;
|
||||
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="title">Title to use with dialog.</param>
|
||||
public usernameDialog(string title)
|
||||
{
|
||||
// Required for Windows Form Designer support
|
||||
InitializeComponent();
|
||||
|
||||
// Update the form title
|
||||
Text = title;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.usernameField = new System.Windows.Forms.TextBox();
|
||||
this.okBtn = new System.Windows.Forms.Button();
|
||||
this.cancelBtn = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// usernameField
|
||||
//
|
||||
this.usernameField.AcceptsReturn = true;
|
||||
this.usernameField.Location = new System.Drawing.Point(96, 24);
|
||||
this.usernameField.MaxLength = 64;
|
||||
this.usernameField.Name = "usernameField";
|
||||
this.usernameField.Size = new System.Drawing.Size(224, 20);
|
||||
this.usernameField.TabIndex = 5;
|
||||
this.usernameField.Text = "";
|
||||
//
|
||||
// okBtn
|
||||
//
|
||||
this.okBtn.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.okBtn.Location = new System.Drawing.Point(152, 64);
|
||||
this.okBtn.Name = "okBtn";
|
||||
this.okBtn.TabIndex = 7;
|
||||
this.okBtn.Text = "Ok";
|
||||
this.okBtn.Click += new System.EventHandler(this.okBtn_Click);
|
||||
//
|
||||
// cancelBtn
|
||||
//
|
||||
this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.cancelBtn.Location = new System.Drawing.Point(240, 64);
|
||||
this.cancelBtn.Name = "cancelBtn";
|
||||
this.cancelBtn.TabIndex = 8;
|
||||
this.cancelBtn.Text = "Cancel";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(8, 24);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(72, 16);
|
||||
this.label1.TabIndex = 9;
|
||||
this.label1.Text = "User name:";
|
||||
//
|
||||
// usernameDialog
|
||||
//
|
||||
this.AcceptButton = this.okBtn;
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.CancelButton = this.cancelBtn;
|
||||
this.ClientSize = new System.Drawing.Size(338, 96);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.cancelBtn);
|
||||
this.Controls.Add(this.okBtn);
|
||||
this.Controls.Add(this.usernameField);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "usernameDialog";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Load += new System.EventHandler(this.usernameDialog_Load);
|
||||
this.Activated += new System.EventHandler(this.usernameDialog_Activated);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Handler for form activation event.
|
||||
/// </summary>
|
||||
private void usernameDialog_Activated(object sender, System.EventArgs e)
|
||||
{
|
||||
usernameField.Focus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handler for Ok button click event.
|
||||
/// </summary>
|
||||
private void okBtn_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
// Dispose of the dialog and set DialogResult to OK
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void usernameDialog_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the username entered by the user.
|
||||
/// </summary>
|
||||
public System.String userName { get {return usernameField.Text;}}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class wrapper around the usernameDialog class. This wrapper is utilized
|
||||
/// to hide the use of Gtk# from its users.
|
||||
/// </summary>
|
||||
public class UsernameDialog
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
// The following strings need to be localized
|
||||
private static string m_titleStartText = "Login to ";
|
||||
private static string m_titleRealmText = ", Realm: ";
|
||||
private static string m_inputRequiredLabelText = "User name required";
|
||||
|
||||
// Title that will be used with the dialog
|
||||
private string m_dialogTitle;
|
||||
|
||||
// Input gathered from the user
|
||||
private string m_userName;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service on whose behalf we are acquiring user name.</param>
|
||||
public UsernameDialog(string svcName)
|
||||
{
|
||||
// Setup the title that will be used with the dialog
|
||||
m_dialogTitle = m_titleStartText + svcName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="svcName">Name of service on whose behalf we are acquiring user name.</param>
|
||||
/// <param name="realm">Name of realm to which the service belongs, can be empty string or null.</param>
|
||||
public UsernameDialog(string svcName, string realm)
|
||||
{
|
||||
// Setup the appropriate title that will be used with the dialog
|
||||
if (realm != null && realm.Length != 0)
|
||||
{
|
||||
m_dialogTitle = m_titleStartText + svcName + m_titleRealmText + realm;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialogTitle = m_titleStartText + svcName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the dialog and gathers the user input.
|
||||
/// </summary>
|
||||
/// <param name="o">Window owner.</param>
|
||||
/// <returns>True if the user input was gathered, else false.</returns>
|
||||
public bool Invoke(System.Object o)
|
||||
{
|
||||
bool retVal;
|
||||
|
||||
while (true)
|
||||
{
|
||||
// Instantiate and show usernameDialog
|
||||
usernameDialog dialog = new usernameDialog(m_dialogTitle);
|
||||
if (dialog.ShowDialog((IWin32Window) o) == DialogResult.OK)
|
||||
{
|
||||
// Save the user name entered
|
||||
m_userName = dialog.userName;
|
||||
|
||||
// Verify that the user entered the desired information
|
||||
if (m_userName.Length != 0)
|
||||
{
|
||||
// The user name was entered, indicate success and
|
||||
// get ready to exit.
|
||||
retVal = true;
|
||||
|
||||
// Dispose of the dialog and exit the loop
|
||||
dialog.Dispose();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inform the user that it must enter a name
|
||||
MessageBox.Show((IWin32Window) o,
|
||||
m_inputRequiredLabelText,
|
||||
"",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
|
||||
// Dispose of the dialog and continue to prompt the user
|
||||
dialog.Dispose();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// The user either hit the cancel button or closed
|
||||
// the window.
|
||||
retVal = false;
|
||||
|
||||
// Dispose of the dialog and exit the loop
|
||||
dialog.Dispose();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name entered by the user.
|
||||
/// </summary>
|
||||
public System.String userName { get {return m_userName;}}
|
||||
}
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="usernameField.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="usernameField.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="usernameField.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="okBtn.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="okBtn.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="okBtn.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cancelBtn.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cancelBtn.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cancelBtn.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>usernameDialog</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
</root>
|
58
ClientPasswordManager/c-sharp-utilities/AssemblyInfo.cs
Normal file
58
ClientPasswordManager/c-sharp-utilities/AssemblyInfo.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("Novell.Security Utilities")]
|
||||
[assembly: AssemblyDescription("Implements the Dbg class for Novell.Security")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Novell, Inc.")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright (C) 2004 Novell, Inc.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("..\\..\\c-sharp-utilities.snk")]
|
||||
[assembly: AssemblyKeyName("")]
|
81
ClientPasswordManager/c-sharp-utilities/Debug.cs
Normal file
81
ClientPasswordManager/c-sharp-utilities/Debug.cs
Normal file
@ -0,0 +1,81 @@
|
||||
/***********************************************************************
|
||||
* File: Debug.cs
|
||||
* Author: Juan Carlos Luciani (jluciani@novell.com)
|
||||
* Date of Creation: February 2004.
|
||||
*
|
||||
* Namespace: Novell.Security.Utilities
|
||||
*
|
||||
* Classes implemented: Dbg.
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Novell.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements methods for sending data to the debugger.
|
||||
/// </summary>
|
||||
public class Dbg
|
||||
{
|
||||
#region Class Members and Defines
|
||||
|
||||
private static TraceSwitch m_switch = new TraceSwitch("Novell.Security", "Novell Security Components");
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Send data to the debugger if the trace level is set to error or above.
|
||||
/// </summary>
|
||||
/// <param name="line">Line to send to the debugger</param>
|
||||
static public void trcError(string line)
|
||||
{
|
||||
if (m_switch.TraceError)
|
||||
{
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
//Console.WriteLine(line);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send data to the debugger if the trace level is set to informational or above.
|
||||
/// </summary>
|
||||
/// <param name="line">Line to send to the debugger</param>
|
||||
static public void trcInfo(string line)
|
||||
{
|
||||
if (m_switch.TraceInfo)
|
||||
{
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
//Console.WriteLine(line);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send data to the debugger if the trace level is set to verbose.
|
||||
/// </summary>
|
||||
/// <param name="line">Line to send to the debugger</param>
|
||||
static public void trcVerbose(string line)
|
||||
{
|
||||
if (m_switch.TraceVerbose)
|
||||
{
|
||||
Trace.WriteLine(line);
|
||||
}
|
||||
//Console.WriteLine(line);
|
||||
}
|
||||
}
|
||||
}
|
77
ClientPasswordManager/c-sharp-utilities/Makefile.am
Normal file
77
ClientPasswordManager/c-sharp-utilities/Makefile.am
Normal file
@ -0,0 +1,77 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
Module_CSFILES = $(srcdir)/Debug.cs
|
||||
Module_KEYFILE = $(srcdir)/c-sharp-utilities.snk
|
||||
Module_CSFILES_CSC := $(subst /,$(SEP),$(Module_CSFILES))
|
||||
Module_INCLUDES =
|
||||
Module_RESOURCES =
|
||||
Module_FLAGS = $(CSC_LIBFLAG)
|
||||
Module_LIBS = System.dll System.Data.dll System.Security.dll $(SYSTEM_XML)
|
||||
Module_LIBPATH =
|
||||
|
||||
EXTRA_DIST = $(Module_CSFILES) $(Module_KEYFILE)
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: Novell.Security.Utilities.dll
|
||||
|
||||
Novell.Security.Utilities.dll: $(Module_CSFILES) $(Module_RESOURCES)
|
||||
$(mkinstalldirs) bin/$(TARGET_CFG)
|
||||
if WINDOWS
|
||||
$(CSC) /nowarn:1591,1573,1572 /out:bin/$(TARGET_CFG)/$@ $(CSCFLAGS) $(Module_FLAGS) $(Module_LIBS:%=/r:%) $(Module_LIBPATH:%=/lib:%) $(Module_CSFILES_CSC) /doc:Novell.Security.Utilities.doc.xml
|
||||
else
|
||||
$(CSC) /nowarn:1591,1573,1572 /out:bin/$(TARGET_CFG)/$@ $(CSCFLAGS) $(Module_FLAGS) /keyfile:$(Module_KEYFILE) $(Module_LIBS:%=/r:%) $(Module_LIBPATH:%=/lib:%) $(Module_CSFILES_CSC) /doc:Novell.Security.Utilities.doc.xml
|
||||
endif
|
||||
|
||||
install-exec-local: Novell.Security.Utilities.dll
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) bin/$(TARGET_CFG)/Novell.Security.Utilities.dll $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f Novell.Security.Utilities.dll
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
CLEAN_FILES = bin/$(TARGET_CFG)/Novell.Security.Utilities.dll /doc:Novell.Security.Utilities.doc.xml
|
||||
|
||||
clean-local:
|
||||
rm -rf *.dbg *.exe *.dll $(CLEAN_FILES)
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
30
ClientPasswordManager/c-sharp-utilities/README
Normal file
30
ClientPasswordManager/c-sharp-utilities/README
Normal file
@ -0,0 +1,30 @@
|
||||
/***********************************************************************
|
||||
* File: README
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
The c-sharp-utilities component provides .NET facilities that are common to
|
||||
the ClientPasswordManager .NET components.
|
||||
|
||||
FEATURES
|
||||
|
||||
Provides the following utilities:
|
||||
|
||||
Dbg class that can be used for tracing debugging information.
|
104
ClientPasswordManager/c-sharp-utilities/c-sharp-utilities.csproj
Normal file
104
ClientPasswordManager/c-sharp-utilities/c-sharp-utilities.csproj
Normal file
@ -0,0 +1,104 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "Novell.Security.Utilities"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Library"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "Novell.Security.Utilities"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "c-sharp-utilities.snk"
|
||||
BuildAction = "None"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Debug.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
@ -0,0 +1,48 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP LastOpenVersion = "7.10.3077" >
|
||||
<Build>
|
||||
<Settings ReferencePath = "" >
|
||||
<Config
|
||||
Name = "Debug"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
EnableASPDebugging = "false"
|
||||
EnableASPXDebugging = "false"
|
||||
EnableUnmanagedDebugging = "false"
|
||||
EnableSQLServerDebugging = "false"
|
||||
RemoteDebugEnabled = "false"
|
||||
RemoteDebugMachine = ""
|
||||
StartAction = "Project"
|
||||
StartArguments = ""
|
||||
StartPage = ""
|
||||
StartProgram = ""
|
||||
StartURL = ""
|
||||
StartWorkingDirectory = ""
|
||||
StartWithIE = "false"
|
||||
/>
|
||||
</Settings>
|
||||
</Build>
|
||||
<OtherProjectSettings
|
||||
CopyProjectDestinationFolder = ""
|
||||
CopyProjectUncPath = ""
|
||||
CopyProjectOption = "0"
|
||||
ProjectView = "ProjectFiles"
|
||||
ProjectTrust = "0"
|
||||
/>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
BIN
ClientPasswordManager/c-sharp-utilities/c-sharp-utilities.snk
Normal file
BIN
ClientPasswordManager/c-sharp-utilities/c-sharp-utilities.snk
Normal file
Binary file not shown.
204
ClientPasswordManager/configure.in
Normal file
204
ClientPasswordManager/configure.in
Normal file
@ -0,0 +1,204 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
AC_INIT(c-sharp-net-credential/NetCredential.cs)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE(clientpasswordmanager, 0.1.1)
|
||||
RELEASE=`date +%Y%m%d_%H%M`
|
||||
AC_SUBST(RELEASE)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
#
|
||||
# Check for a valid C# compiler
|
||||
#
|
||||
AC_CHECK_PROG(CSC, csc, csc)
|
||||
test -z "$CSC" && AC_CHECK_PROG(CSC, mcs, mcs)
|
||||
test -z "$CSC" && AC_MSG_ERROR([no acceptable C Sharp compiler found in \$PATH])
|
||||
|
||||
case $CSC in
|
||||
#
|
||||
# Mono-specific configuration
|
||||
#
|
||||
mcs)
|
||||
CSC_EXEFLAG=/target:exe
|
||||
CSC_LIBFLAG=/target:library
|
||||
CSC_EXEFLAG=/target:exe
|
||||
CSC_WINEXEFLAG=/target:winexe
|
||||
CSCFLAGS='/d:MONO /warn:4 /d:TRACE'
|
||||
CSCFLAGS_DEBUG="/debug+ /d:DEBUG"
|
||||
CSCFLAGS_OPTIMIZE="/optimize+"
|
||||
MONO=mono
|
||||
MONO_DEBUG='mono --debug'
|
||||
MONO_PATH=
|
||||
SYSTEM_XML='System.Xml.dll'
|
||||
;;
|
||||
#
|
||||
# .NET-specific configuration
|
||||
#
|
||||
csc)
|
||||
CSC_EXEFLAG=/target:exe
|
||||
CSC_LIBFLAG=/target:library
|
||||
CSC_EXEFLAG=/target:exe
|
||||
CSC_WINEXEFLAG=/target:winexe
|
||||
CSCFLAGS='/d:DOTNET /warn:4 /d:TRACE /nologo'
|
||||
CSCFLAGS_DEBUG="/debug+ /d:DEBUG"
|
||||
CSCFLAGS_OPTIMIZE="/optimize+"
|
||||
MONO=
|
||||
MONO_DEBUG=
|
||||
MONO_PATH=
|
||||
SYSTEM_XML='System.XML.dll'
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(CSC)
|
||||
AC_SUBST(CSC_EXEFLAG)
|
||||
AC_SUBST(CSC_LIBFLAG)
|
||||
AC_SUBST(CSC_WINEXEFLAG)
|
||||
AC_SUBST(CSCFLAGS)
|
||||
AC_SUBST(MONO)
|
||||
AC_SUBST(MONO_PATH)
|
||||
AC_SUBST(SYSTEM_XML)
|
||||
|
||||
SRCDIR='$(top_srcdir)'
|
||||
DOCDIR="$SRCDIR/doc"
|
||||
|
||||
AC_SUBST(SRCDIR)
|
||||
AC_SUBST(DOCDIR)
|
||||
|
||||
EMPTY=
|
||||
SPACE='$(EMPTY) $(EMPTY)'
|
||||
|
||||
AC_SUBST(EMPTY)
|
||||
AC_SUBST(SPACE)
|
||||
|
||||
#
|
||||
# Check for a valid operating system
|
||||
#
|
||||
case $host_os in
|
||||
linux*)
|
||||
TARGET_OS='linux'
|
||||
;;
|
||||
cygwin*)
|
||||
TARGET_OS='windows'
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown host_os: $host_os])
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(TARGET_OS)
|
||||
AM_CONDITIONAL(LINUX, test "$TARGET_OS" = "linux")
|
||||
AM_CONDITIONAL(WINDOWS, test "$TARGET_OS" = "windows")
|
||||
|
||||
#
|
||||
# Set platform-specific variables
|
||||
#
|
||||
case $TARGET_OS in
|
||||
#
|
||||
# Linux-specific configuration
|
||||
#
|
||||
linux)
|
||||
#
|
||||
# Set variables
|
||||
#
|
||||
COMMON_CLEAN_FILES=''
|
||||
ICON_EXT='.ico'
|
||||
ICON_FLAG='/resource:'
|
||||
PLATFORM_SUBDIRS=$LINUX_SUBDIRS
|
||||
SEP='/'
|
||||
;;
|
||||
#
|
||||
# Windows-specific configuration
|
||||
#
|
||||
windows)
|
||||
COMMON_CLEAN_FILES='*.suo */*.suo *.csproj.user */*.csproj.user bin obj */bin */obj *.xml */*.xml *.pdb */*.pdb'
|
||||
ICON_EXT='.ico'
|
||||
ICON_FLAG='/win32icon:'
|
||||
PLATFORM_SUBDIRS=$WINDOWS_SUBDIRS
|
||||
SEP='$(EMPTY)\\$(EMPTY)'
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(COMMON_CLEAN_FILES)
|
||||
AC_SUBST(ICON_EXT)
|
||||
AC_SUBST(ICON_FLAG)
|
||||
AC_SUBST(PLATFORM_SUBDIRS)
|
||||
AC_SUBST(SEP)
|
||||
|
||||
#
|
||||
# Run standard macros
|
||||
#
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_HEADER_STDC
|
||||
|
||||
#
|
||||
# Handle --enable-debug
|
||||
#
|
||||
AC_ARG_ENABLE(debug, [
|
||||
--enable-debug configure the Makefiles to build in DEBUG mode],
|
||||
[case "${enableval}" in
|
||||
yes) enable_debug=true ;;
|
||||
no) enable_debug=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||||
esac],[enable_debug=false])
|
||||
AM_CONDITIONAL(DEBUG, test x$enable_debug = xtrue)
|
||||
if test "$enable_debug" = "true"
|
||||
then
|
||||
# Build debug version.
|
||||
CFLAGS="$CFLAGS_DEBUG $CFLAGS"
|
||||
CSCFLAGS="$CSCFLAGS_DEBUG $CSCFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS_DEBUG $CXXFLAGS"
|
||||
DEVENV_CONFIGURATION=Debug
|
||||
MONO=$MONO_DEBUG
|
||||
else
|
||||
# Build optimized version.
|
||||
CFLAGS="$CFLAGS_OPTIMIZE $CFLAGS"
|
||||
CSCFLAGS="$CSCFLAGS_OPTIMIZE $CSCFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS_OPTIMIZE $CXXFLAGS"
|
||||
DEVENV_CONFIGURATION=Release
|
||||
fi
|
||||
AC_SUBST(CSCFLAGS)
|
||||
AC_SUBST(DEVENV_CONFIGURATION)
|
||||
|
||||
#
|
||||
# Configure PKG_CONFIG
|
||||
#
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
if test "x$PKG_CONFIG" = "xno"; then
|
||||
AC_MSG_ERROR([You need to install pkg-config])
|
||||
fi
|
||||
|
||||
#
|
||||
# Configure files
|
||||
#
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
c-sharp-net-credential/Makefile
|
||||
c-sharp-password-dialog/Makefile
|
||||
c-sharp-username-dialog/Makefile
|
||||
c-sharp-utilities/Makefile
|
||||
package/Makefile
|
||||
package/windows/Makefile
|
||||
package/windows/clientpasswordmanager-msm/Makefile
|
||||
package/linux/Makefile
|
||||
package/linux/clientpasswordmanager.spec
|
||||
])
|
||||
|
||||
|
33
ClientPasswordManager/package/Makefile.am
Normal file
33
ClientPasswordManager/package/Makefile.am
Normal file
@ -0,0 +1,33 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
SUBDIRS = $(TARGET_OS)
|
||||
|
||||
DIST_SUBDIRS = linux windows
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall
|
||||
package package-clean package-install package-uninstall:
|
||||
$(MAKE) -C $(TARGET_OS) $@
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
65
ClientPasswordManager/package/linux/Makefile.am
Normal file
65
ClientPasswordManager/package/linux/Makefile.am
Normal file
@ -0,0 +1,65 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
RPM_FILE = $(PACKAGE)-$(VERSION)-$(RELEASE).$(target_cpu).rpm
|
||||
SRPM_FILE = $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall
|
||||
|
||||
#all: $(RPM_FILE)
|
||||
|
||||
package: $(RPM_FILE)
|
||||
|
||||
all clean:
|
||||
|
||||
$(RPM_FILE):
|
||||
cd $(top_srcdir); make dist
|
||||
rm -rf RPM
|
||||
mkdir RPM
|
||||
echo %_topdir `pwd`/RPM > $(HOME)/.rpmmacros
|
||||
mkdir -p RPM/BUILD
|
||||
mkdir -p RPM/RPMS
|
||||
mkdir -p RPM/SOURCES
|
||||
mkdir -p RPM/SPECS
|
||||
mkdir -p RPM/SRPMS
|
||||
cp clientpasswordmanager.spec RPM/SPECS
|
||||
cp $(top_srcdir)/$(PACKAGE)-$(VERSION).tar.gz RPM/SOURCES
|
||||
mv $(top_srcdir)/$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)-$(RELEASE).tar.gz
|
||||
rpmbuild -ba -v -vv --target=$(target_triplet) RPM/SPECS/clientpasswordmanager.spec
|
||||
cp RPM/RPMS/*/$(RPM_FILE) .
|
||||
cp RPM/SRPMS/$(SRPM_FILE) .
|
||||
|
||||
package-install: package
|
||||
su -c "rpm -Uvh $(RPM_FILE)"
|
||||
|
||||
package-uninstall:
|
||||
su -c "rpm -e $(PACKAGE)"
|
||||
|
||||
package-clean clean-local:
|
||||
rm -rf *.rpm RPM *.gz
|
||||
|
||||
distclean-local: package-clean
|
||||
rm -f Makefile clientpasswordmanager.spec
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
@ -0,0 +1,95 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
# SuSE Specific autobuild tags
|
||||
# neededforbuild mono mono-devel pkgconfig glib2 glib2-devel libicu26
|
||||
|
||||
%define prefix /opt/novell/clientpasswordmanager
|
||||
|
||||
Summary: ClientPasswordManager
|
||||
Name: @PACKAGE@
|
||||
Version: @VERSION@
|
||||
Release: @RELEASE@
|
||||
Copyright: GPL
|
||||
Group: Applications/Productivity
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
URL: http://forge.novell.com/modules/xfmod/project/?isecure
|
||||
#Distribution :
|
||||
Vendor: <unknown>
|
||||
Packager: <unknown>
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}
|
||||
|
||||
Requires: mono >= 0.31
|
||||
Obsoletes: %{name} <= %{version}
|
||||
#=============================================================================
|
||||
%Description
|
||||
ClientPasswordManager provides an infrastructure that allows trusted
|
||||
applications to share passwords to help provide a Single Sign-On experience
|
||||
to the user.
|
||||
|
||||
#=============================================================================
|
||||
%ChangeLog
|
||||
|
||||
|
||||
#=============================================================================
|
||||
%Prep
|
||||
%setup -n %{name}-%{version}
|
||||
|
||||
|
||||
#=============================================================================
|
||||
%Build
|
||||
./configure --prefix=%{prefix}
|
||||
make
|
||||
|
||||
#=============================================================================
|
||||
%Install
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
#=============================================================================
|
||||
%Clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
#=============================================================================
|
||||
%Post
|
||||
cd /opt/novell/clientpasswordmanager/lib
|
||||
gacutil -i Novell.Security.ClientPasswordManager.NetCredential.dll
|
||||
gacutil -i Novell.Security.ClientPasswordManager.UsernameDialog.dll
|
||||
gacutil -i Novell.Security.ClientPasswordManager.PasswordDialog.dll
|
||||
gacutil -i Novell.Security.Utilities.dll
|
||||
exit 0
|
||||
|
||||
#=============================================================================
|
||||
%Preun
|
||||
gacutil -u Novell.Security.ClientPasswordManager.NetCredential
|
||||
gacutil -u Novell.Security.ClientPasswordManager.UsernameDialog
|
||||
gacutil -u Novell.Security.ClientPasswordManager.PasswordDialog
|
||||
gacutil -u Novell.Security.Utilities
|
||||
exit 0
|
||||
|
||||
#=============================================================================
|
||||
%Files
|
||||
%defattr(-,root,root)
|
||||
%{prefix}/*
|
||||
#%{prefix}/lib/*
|
||||
#%{prefix}/share/*
|
||||
|
32
ClientPasswordManager/package/windows/Makefile.am
Normal file
32
ClientPasswordManager/package/windows/Makefile.am
Normal file
@ -0,0 +1,32 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
SUBDIRS = clientpasswordmanager-msm
|
||||
|
||||
.PHONY: package-clean package-install package-uninstall
|
||||
|
||||
package package-clean package-install package-uninstall:
|
||||
$(MAKE) -C clientpasswordmanager-msm $@
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
@ -0,0 +1,61 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
MSM_FILE = $(PACKAGE)-$(VERSION)-$(RELEASE).msm
|
||||
MSM_LOG_FILE = devenv-clientpasswordmanager-msm.log
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall c-sharp-net-credential c-sharp-password-dialog c-sharp-username-dialog c-sharp-utilities devenv
|
||||
|
||||
#all clean:
|
||||
|
||||
package: $(MSM_FILE)
|
||||
|
||||
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
|
||||
|
||||
$(MSM_FILE): devenv
|
||||
@rm -f $(MSM_LOG_FILE) $@
|
||||
@CMD='"$(VSINSTALLDIR)/devenv.exe" ../../../ClientPasswordManager.sln /build $(DEVENV_CONFIGURATION) /project clientpasswordmanager-msm /out $(MSM_LOG_FILE)'; \
|
||||
echo $$CMD; \
|
||||
if eval $$CMD; then \
|
||||
ls -l $(DEVENV_CONFIGURATION)/clientpasswordmanager-msm.msm; \
|
||||
else \
|
||||
grep -a "ERROR:" $(MSM_LOG_FILE); \
|
||||
fi
|
||||
|
||||
securesink:
|
||||
make -C ../.. all
|
||||
|
||||
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 clientpasswordmanager.msm
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
||||
|
||||
|
@ -0,0 +1,326 @@
|
||||
"DeployProject"
|
||||
{
|
||||
"VSVersion" = "3:701"
|
||||
"ProjectType" = "8:{DD7A5B58-C2F9-40FF-B2EF-0773356FB978}"
|
||||
"IsWebType" = "8:FALSE"
|
||||
"ProjectName" = "8:clientpasswordmanager-msm"
|
||||
"LanguageId" = "3:1033"
|
||||
"CodePage" = "3:1252"
|
||||
"UILanguageId" = "3:1033"
|
||||
"SccProjectName" = "8:"
|
||||
"SccLocalPath" = "8:"
|
||||
"SccAuxPath" = "8:"
|
||||
"SccProvider" = "8:"
|
||||
"Hierarchy"
|
||||
{
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_3AD7204448FD4A0FB065CE3B19B85187"
|
||||
"OwnerKey" = "8:_UNDEFINED"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_3CA7DFE20AFF49E1A5059CAA12A6F262"
|
||||
"OwnerKey" = "8:_UNDEFINED"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_763071E9529E47298E0D483C70C9DD2C"
|
||||
"OwnerKey" = "8:_UNDEFINED"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_C87D109CB52E451B8D4C9C425B9F408F"
|
||||
"OwnerKey" = "8:_763071E9529E47298E0D483C70C9DD2C"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_C87D109CB52E451B8D4C9C425B9F408F"
|
||||
"OwnerKey" = "8:_D54A8D63A6224AABA81E04F4DB6AD917"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_C87D109CB52E451B8D4C9C425B9F408F"
|
||||
"OwnerKey" = "8:_3CA7DFE20AFF49E1A5059CAA12A6F262"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_C87D109CB52E451B8D4C9C425B9F408F"
|
||||
"OwnerKey" = "8:_3AD7204448FD4A0FB065CE3B19B85187"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_D54A8D63A6224AABA81E04F4DB6AD917"
|
||||
"OwnerKey" = "8:_UNDEFINED"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
}
|
||||
"Configurations"
|
||||
{
|
||||
"Debug"
|
||||
{
|
||||
"DisplayName" = "8:Debug"
|
||||
"IsDebugOnly" = "11:TRUE"
|
||||
"IsReleaseOnly" = "11:FALSE"
|
||||
"OutputFilename" = "8:Debug\\clientpasswordmanager-msm.msm"
|
||||
"PackageFilesAs" = "3:2"
|
||||
"PackageFileSize" = "3:-2147483648"
|
||||
"CabType" = "3:1"
|
||||
"Compression" = "3:2"
|
||||
"SignOutput" = "11:FALSE"
|
||||
"CertificateFile" = "8:"
|
||||
"PrivateKeyFile" = "8:"
|
||||
"TimeStampServer" = "8:"
|
||||
"InstallerBootstrapper" = "3:1"
|
||||
}
|
||||
"Release"
|
||||
{
|
||||
"DisplayName" = "8:Release"
|
||||
"IsDebugOnly" = "11:FALSE"
|
||||
"IsReleaseOnly" = "11:TRUE"
|
||||
"OutputFilename" = "8:Release\\clientpasswordmanager-msm.msm"
|
||||
"PackageFilesAs" = "3:2"
|
||||
"PackageFileSize" = "3:-2147483648"
|
||||
"CabType" = "3:1"
|
||||
"Compression" = "3:2"
|
||||
"SignOutput" = "11:FALSE"
|
||||
"CertificateFile" = "8:"
|
||||
"PrivateKeyFile" = "8:"
|
||||
"TimeStampServer" = "8:"
|
||||
"InstallerBootstrapper" = "3:1"
|
||||
}
|
||||
}
|
||||
"Deployable"
|
||||
{
|
||||
"CustomAction"
|
||||
{
|
||||
}
|
||||
"DefaultFeature"
|
||||
{
|
||||
"Name" = "8:DefaultFeature"
|
||||
"Title" = "8:"
|
||||
"Description" = "8:"
|
||||
}
|
||||
"File"
|
||||
{
|
||||
}
|
||||
"FileType"
|
||||
{
|
||||
}
|
||||
"Folder"
|
||||
{
|
||||
"{78BAF5CE-F2E5-45BE-83BC-DB6AF387E941}:_6E6B01F2741A44CEAD98C1596C6D5ECF"
|
||||
{
|
||||
"Name" = "8:#1910"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:CommonFilesFolder"
|
||||
"Folders"
|
||||
{
|
||||
}
|
||||
}
|
||||
"{29CD8198-A6F0-4B93-8B90-AC03CFEAD328}:_99CD6F04CF034FEC8E2E893187E81441"
|
||||
{
|
||||
"DefaultLocation" = "8:[TARGETDIR]"
|
||||
"DisplayName" = "8:Module Retargetable Folder"
|
||||
"Description" = "8:"
|
||||
"Name" = "8:Module Retargetable Folder"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:TRUE"
|
||||
"Property" = "8:NEWRETARGETABLEPROPERTY1"
|
||||
"Folders"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"Sequences"
|
||||
{
|
||||
}
|
||||
"MergeModule"
|
||||
{
|
||||
"{35A69C6E-5BA4-440D-803D-762B59A45393}:_C87D109CB52E451B8D4C9C425B9F408F"
|
||||
{
|
||||
"UseDynamicProperties" = "11:FALSE"
|
||||
"IsDependency" = "11:TRUE"
|
||||
"SourcePath" = "8:dotnetfxredist_x86.msm"
|
||||
"LanguageId" = "3:1033"
|
||||
"Exclude" = "11:FALSE"
|
||||
"Folder" = "8:"
|
||||
"Feature" = "8:"
|
||||
"IsolateTo" = "8:"
|
||||
}
|
||||
}
|
||||
"Module"
|
||||
{
|
||||
"ModuleSignature" = "8:MergeModule.6E7C68BEF7C242F99CC96098C0C93419"
|
||||
"Version" = "8:1.0.0.0"
|
||||
"Title" = "8:clientpasswordmanager-msm"
|
||||
"Subject" = "8:"
|
||||
"Author" = "8:Novell, Inc."
|
||||
"Keywords" = "8:"
|
||||
"Comments" = "8:"
|
||||
"SearchPath" = "8:"
|
||||
"UseSystemSearchPath" = "11:TRUE"
|
||||
}
|
||||
"ProjectOutput"
|
||||
{
|
||||
"{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_3AD7204448FD4A0FB065CE3B19B85187"
|
||||
{
|
||||
"SourcePath" = "8:..\\..\\..\\c-sharp-net-credential\\obj\\Debug\\Novell.Security.ClientPasswordManager.NetCredential.dll"
|
||||
"TargetName" = "8:"
|
||||
"Tag" = "8:"
|
||||
"Folder" = "8:_99CD6F04CF034FEC8E2E893187E81441"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Vital" = "11:TRUE"
|
||||
"ReadOnly" = "11:FALSE"
|
||||
"Hidden" = "11:FALSE"
|
||||
"System" = "11:FALSE"
|
||||
"Permanent" = "11:FALSE"
|
||||
"SharedLegacy" = "11:FALSE"
|
||||
"PackageAs" = "3:1"
|
||||
"Register" = "3:1"
|
||||
"Exclude" = "11:FALSE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"IsolateTo" = "8:"
|
||||
"ProjectOutputGroupRegister" = "3:1"
|
||||
"OutputConfiguration" = "8:"
|
||||
"OutputGroupCanonicalName" = "8:Built"
|
||||
"OutputProjectGuid" = "8:{D7D0F5D8-0F45-4DCA-818B-8E71168A2CA3}"
|
||||
"ShowKeyOutput" = "11:FALSE"
|
||||
"ExcludeFilters"
|
||||
{
|
||||
}
|
||||
}
|
||||
"{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_3CA7DFE20AFF49E1A5059CAA12A6F262"
|
||||
{
|
||||
"SourcePath" = "8:..\\..\\..\\c-sharp-username-dialog\\obj\\Debug\\Novell.Security.ClientPasswordManager.UsernameDialog.dll"
|
||||
"TargetName" = "8:"
|
||||
"Tag" = "8:"
|
||||
"Folder" = "8:_99CD6F04CF034FEC8E2E893187E81441"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Vital" = "11:TRUE"
|
||||
"ReadOnly" = "11:FALSE"
|
||||
"Hidden" = "11:FALSE"
|
||||
"System" = "11:FALSE"
|
||||
"Permanent" = "11:FALSE"
|
||||
"SharedLegacy" = "11:FALSE"
|
||||
"PackageAs" = "3:1"
|
||||
"Register" = "3:1"
|
||||
"Exclude" = "11:FALSE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"IsolateTo" = "8:"
|
||||
"ProjectOutputGroupRegister" = "3:1"
|
||||
"OutputConfiguration" = "8:"
|
||||
"OutputGroupCanonicalName" = "8:Built"
|
||||
"OutputProjectGuid" = "8:{AFE3BA84-436C-4DD1-BA01-3B8C6B9D125C}"
|
||||
"ShowKeyOutput" = "11:FALSE"
|
||||
"ExcludeFilters"
|
||||
{
|
||||
}
|
||||
}
|
||||
"{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_763071E9529E47298E0D483C70C9DD2C"
|
||||
{
|
||||
"SourcePath" = "8:..\\..\\..\\c-sharp-password-dialog\\obj\\Debug\\Novell.Security.ClientPasswordManager.PasswordDialog.dll"
|
||||
"TargetName" = "8:"
|
||||
"Tag" = "8:"
|
||||
"Folder" = "8:_99CD6F04CF034FEC8E2E893187E81441"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Vital" = "11:TRUE"
|
||||
"ReadOnly" = "11:FALSE"
|
||||
"Hidden" = "11:FALSE"
|
||||
"System" = "11:FALSE"
|
||||
"Permanent" = "11:FALSE"
|
||||
"SharedLegacy" = "11:FALSE"
|
||||
"PackageAs" = "3:1"
|
||||
"Register" = "3:1"
|
||||
"Exclude" = "11:FALSE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"IsolateTo" = "8:"
|
||||
"ProjectOutputGroupRegister" = "3:1"
|
||||
"OutputConfiguration" = "8:"
|
||||
"OutputGroupCanonicalName" = "8:Built"
|
||||
"OutputProjectGuid" = "8:{5A211C70-3AEB-4305-8CB6-42757D01DC22}"
|
||||
"ShowKeyOutput" = "11:FALSE"
|
||||
"ExcludeFilters"
|
||||
{
|
||||
}
|
||||
}
|
||||
"{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_D54A8D63A6224AABA81E04F4DB6AD917"
|
||||
{
|
||||
"SourcePath" = "8:..\\..\\..\\c-sharp-utilities\\obj\\Debug\\Novell.Security.Utilities.dll"
|
||||
"TargetName" = "8:"
|
||||
"Tag" = "8:"
|
||||
"Folder" = "8:_99CD6F04CF034FEC8E2E893187E81441"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Vital" = "11:TRUE"
|
||||
"ReadOnly" = "11:FALSE"
|
||||
"Hidden" = "11:FALSE"
|
||||
"System" = "11:FALSE"
|
||||
"Permanent" = "11:FALSE"
|
||||
"SharedLegacy" = "11:FALSE"
|
||||
"PackageAs" = "3:1"
|
||||
"Register" = "3:1"
|
||||
"Exclude" = "11:FALSE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"IsolateTo" = "8:"
|
||||
"ProjectOutputGroupRegister" = "3:1"
|
||||
"OutputConfiguration" = "8:"
|
||||
"OutputGroupCanonicalName" = "8:Built"
|
||||
"OutputProjectGuid" = "8:{BBAD68F3-93C6-448F-8F79-F8CAEA3200C5}"
|
||||
"ShowKeyOutput" = "11:FALSE"
|
||||
"ExcludeFilters"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"Registry"
|
||||
{
|
||||
"HKLM"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKCU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKCR"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKPU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"Shortcut"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
42
LinkedKeyInfo.cs
Normal file
42
LinkedKeyInfo.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Novell.CASA.MiCasa.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for LinkInfo.
|
||||
/// </summary>
|
||||
///
|
||||
[Serializable]
|
||||
public class LinkedKeyInfo
|
||||
{
|
||||
private string m_sDestStoreID = null;
|
||||
private string m_sDestKeychainID = null;
|
||||
private string m_sDestSecretID = null;
|
||||
private string m_sDestKeyID = null;
|
||||
|
||||
public LinkedKeyInfo(string sDestSecretID, string sDestKey)
|
||||
{
|
||||
if (sDestSecretID.StartsWith("SS_CredSet"))
|
||||
m_sDestSecretID = sDestSecretID;
|
||||
else
|
||||
m_sDestSecretID = "SS_CredSet:" + sDestSecretID + '\0';
|
||||
|
||||
m_sDestKeyID = sDestKey;
|
||||
}
|
||||
|
||||
public string GetLinkID()
|
||||
{
|
||||
return m_sDestSecretID + ":" + m_sDestKeyID;
|
||||
}
|
||||
|
||||
public string GetLinkedSecretID()
|
||||
{
|
||||
return m_sDestSecretID;
|
||||
}
|
||||
|
||||
public string GetLinkedKeyID()
|
||||
{
|
||||
return m_sDestKeyID;
|
||||
}
|
||||
}
|
||||
}
|
0
LoginCapture/AUTHORS
Normal file
0
LoginCapture/AUTHORS
Normal file
0
LoginCapture/ChangeLog
Normal file
0
LoginCapture/ChangeLog
Normal file
BIN
LoginCapture/LoginCapture.ncb
Normal file
BIN
LoginCapture/LoginCapture.ncb
Normal file
Binary file not shown.
37
LoginCapture/LoginCapture.sln
Normal file
37
LoginCapture/LoginCapture.sln
Normal file
@ -0,0 +1,37 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lcredmgr", "windows\windows.vcproj", "{55E85618-3643-4213-A15F-08DA1F02D9BB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "logincapture-msm", "package\windows\logincapture-msm\logincapture-msm.vdproj", "{4D800AB9-920A-44D6-B996-C986C8121A9D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "TestInstall", "package\windows\TestInstall\TestInstall.vdproj", "{3521E46A-2DED-4DAC-AE38-A95A3FD45E60}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{55E85618-3643-4213-A15F-08DA1F02D9BB}.Debug.ActiveCfg = Debug|Win32
|
||||
{55E85618-3643-4213-A15F-08DA1F02D9BB}.Debug.Build.0 = Debug|Win32
|
||||
{55E85618-3643-4213-A15F-08DA1F02D9BB}.Release.ActiveCfg = Release|Win32
|
||||
{55E85618-3643-4213-A15F-08DA1F02D9BB}.Release.Build.0 = Release|Win32
|
||||
{4D800AB9-920A-44D6-B996-C986C8121A9D}.Debug.ActiveCfg = Debug
|
||||
{4D800AB9-920A-44D6-B996-C986C8121A9D}.Debug.Build.0 = Debug
|
||||
{4D800AB9-920A-44D6-B996-C986C8121A9D}.Release.ActiveCfg = Release
|
||||
{4D800AB9-920A-44D6-B996-C986C8121A9D}.Release.Build.0 = Release
|
||||
{3521E46A-2DED-4DAC-AE38-A95A3FD45E60}.Debug.ActiveCfg = Debug
|
||||
{3521E46A-2DED-4DAC-AE38-A95A3FD45E60}.Debug.Build.0 = Debug
|
||||
{3521E46A-2DED-4DAC-AE38-A95A3FD45E60}.Release.ActiveCfg = Release
|
||||
{3521E46A-2DED-4DAC-AE38-A95A3FD45E60}.Release.Build.0 = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
LoginCapture/LoginCapture.suo
Normal file
BIN
LoginCapture/LoginCapture.suo
Normal file
Binary file not shown.
46
LoginCapture/Makefile.am
Normal file
46
LoginCapture/Makefile.am
Normal file
@ -0,0 +1,46 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
SUBDIRS = $(TARGET_OS) package
|
||||
|
||||
DIST_SUBDIRS = linux windows package
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall
|
||||
package package-clean package-install package-uninstall:
|
||||
$(MAKE) -C package $@
|
||||
|
||||
installcheck-summary:
|
||||
$(MAKE) -C src $@
|
||||
|
||||
clean-local:
|
||||
rm -rf *.suo
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f configure Makefile.in logincapture-*.tar.gz
|
||||
rm -f aclocal.m4 conf*.sh configure.lineno
|
||||
rm -f config.guess config.sub config.status
|
||||
rm -f ltmain.sh libtool
|
||||
rm -f install-sh install-sh.lnk INSTALL INSTALL.lnk
|
||||
rm -f missing missing.lnk mkinstalldirs mkinstalldir.lnk
|
||||
rm -rf autom4te.cache
|
0
LoginCapture/NEWS
Normal file
0
LoginCapture/NEWS
Normal file
176
LoginCapture/README
Normal file
176
LoginCapture/README
Normal file
@ -0,0 +1,176 @@
|
||||
/***********************************************************************
|
||||
* File: README
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
The LoginCapture provides a service that exports the credentials used
|
||||
by the user to login to the desktop to the SecretStore wallet. Once in the
|
||||
SecretStore wallet, the credentials can be leveraged by desktop applications
|
||||
to provide a better single sign-on experience to the user.
|
||||
|
||||
Please note that the better single sign-on experience will only be realized if
|
||||
the credentials used to log to the back-end systems match the credentials
|
||||
used to login to the desktop.
|
||||
|
||||
FEATURES
|
||||
|
||||
The LoginCapture services are provided by components that are platform dependent.
|
||||
|
||||
On Linux, LoginCapture provides its services through the use of a PAM module which
|
||||
is inserted into the PAM configuration chain of the default Windows Manager during
|
||||
the installation of the LoginCapture rpm.
|
||||
|
||||
On Windows2000 and above, LoginCapture provides its services through a Credential Manager.
|
||||
|
||||
CONTENTS
|
||||
|
||||
linux - This folder contains the Linux PAM module implementation.
|
||||
|
||||
windows - This folder contanins the Windows Credential Manager implementation.
|
||||
|
||||
package - This folder contains the files necessary to build the software packages
|
||||
under windows and under linux.
|
||||
|
||||
REQUIREMENTS FOR BUILDING THE SOFTWARE PACKAGE ON WINDOWS
|
||||
|
||||
- Install Visual Studio .NET 2003
|
||||
- Install Cygwin - See instructions below.
|
||||
|
||||
Download and start cygwin install:
|
||||
Browse to http://sources.redhat.com/cygwin/
|
||||
|
||||
Click on "Install or update now!" or "Install Cygwin now"
|
||||
|
||||
Cygwin Setup:
|
||||
Next
|
||||
|
||||
Cygwin Setup - Choose Installation Type:
|
||||
Install from Internet
|
||||
Next
|
||||
|
||||
Cygwin Setup - Choose Installation Directory:
|
||||
Root Directory: C:\cygwin
|
||||
Install For: "All Users"
|
||||
|
||||
Default Text File Type: DOS
|
||||
|
||||
Cygwin Setup - Select Local Package Directory:
|
||||
Local Package Directory: C:\cygwin-packages
|
||||
|
||||
Cygwin Setup - Select Connection Type:
|
||||
Direct Connection
|
||||
|
||||
Choose A Download Site:
|
||||
ftp://ftp.nas.nasa.gov
|
||||
|
||||
Cywin Setup - Select Packages:
|
||||
Base:
|
||||
defaults
|
||||
|
||||
Devel:
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
make
|
||||
pkgconfig
|
||||
cvs
|
||||
gcc
|
||||
gcc-g++
|
||||
|
||||
Editors:
|
||||
vim (optional)
|
||||
|
||||
Net:
|
||||
openssh
|
||||
openssl
|
||||
|
||||
Text:
|
||||
more
|
||||
|
||||
Utils:
|
||||
clear (optional)
|
||||
|
||||
Cygwin Setup - Create Icons:
|
||||
Finish
|
||||
|
||||
Edit cygwin.bat (c:\cygwin\cygwin.bat) to add a call to
|
||||
%VS71COMNTOOLS%\vsvars32.bat (see example below). This sets up the
|
||||
Visual Studio tools in Cygwin.
|
||||
|
||||
Sample cygwin.bat:
|
||||
|
||||
@echo off
|
||||
|
||||
call "%VS71COMNTOOLS%\vsvars32.bat" > NUL
|
||||
|
||||
C:
|
||||
chdir C:\cygwin\bin
|
||||
|
||||
bash --login -i
|
||||
|
||||
|
||||
REQUIREMENTS FOR BUILDING THE SOFTWARE PACKAGE ON LINUX
|
||||
|
||||
Install latest mono and mono-devel RPM - Obtain RPMs from
|
||||
www.go-mono.org.
|
||||
|
||||
|
||||
BUILDING THE SOFTWARE PACKAGE
|
||||
|
||||
Windows: Start at Step 1.
|
||||
Linux: Skip to Step 2.
|
||||
|
||||
1. Run cygwin.bat to start up Cygwin.
|
||||
|
||||
2. Generate autotools files:
|
||||
./autogen.sh --prefix=/<install_dir> [--enable-debug]
|
||||
(<install_dir> is some writable directory where 'make install' will
|
||||
install files for testing.
|
||||
|
||||
3. To reconfigure later, or to configure software that came from a source
|
||||
distribution (.tar.gz) file, use configure.
|
||||
./configure --prefix/<install_dir> [--enable-debug]
|
||||
(run ./configure --help for more options)
|
||||
|
||||
4. Select your make target, here are a few interesting ones:
|
||||
|
||||
make [all] - build product files (package files not included)
|
||||
|
||||
make clean - clean up files built by 'make all'
|
||||
|
||||
make package - build product and package files
|
||||
|
||||
make package-clean - clean up package files
|
||||
|
||||
make install - install product files to <install_dir> specified by
|
||||
--prefix during configure
|
||||
|
||||
make uninstall - undo 'make install'
|
||||
|
||||
make dist - build a source distribution tarball.
|
||||
|
||||
make distclean - removes files to return state back to same as the
|
||||
source distribution (configure, Makefile.in files, and other distributed
|
||||
autotools files are not removed)
|
||||
|
||||
make maintainer-clean - removes files to return state back to same as
|
||||
the CVS checkout (you will need to run ./autogen.sh again before running
|
||||
make again)
|
||||
|
130
LoginCapture/autogen.sh
Normal file
130
LoginCapture/autogen.sh
Normal file
@ -0,0 +1,130 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=LoginCapture
|
||||
TEST_TYPE=-f
|
||||
FILE=linux/pam_pwcapture.c
|
||||
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
|
||||
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
|
||||
AUTOMAKE=automake
|
||||
ACLOCAL=aclocal
|
||||
}
|
||||
|
||||
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile $PROJECT."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
for coin in `find $srcdir -name configure.in -print`
|
||||
do
|
||||
dr=`dirname $coin`
|
||||
if test -f $dr/NO-AUTO-GEN; then
|
||||
echo skipping $dr -- flagged as no auto-gen
|
||||
else
|
||||
echo processing $dr
|
||||
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
|
||||
( cd $dr
|
||||
aclocalinclude="$ACLOCAL_FLAGS"
|
||||
for k in $macrodirs; do
|
||||
if test -d $k; then
|
||||
aclocalinclude="$aclocalinclude -I $k"
|
||||
##else
|
||||
## echo "**Warning**: No such directory \`$k'. Ignored."
|
||||
fi
|
||||
done
|
||||
if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
if grep "sed.*POTFILES" configure.in >/dev/null; then
|
||||
: do nothing -- we still have an old unmodified configure.in
|
||||
else
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
fi
|
||||
if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
echo "no" | glib-gettextize --force --copy
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy
|
||||
fi
|
||||
echo "Running $ACLOCAL $aclocalinclude ..."
|
||||
$ACLOCAL $aclocalinclude
|
||||
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader
|
||||
fi
|
||||
echo "Running $AUTOMAKE --gnu $am_opt ..."
|
||||
$AUTOMAKE --add-missing --gnu $am_opt
|
||||
echo "Running autoconf ..."
|
||||
autoconf
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
||||
conf_flags="--config-cache --enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
cd "$ORIGDIR"
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PROJECT || exit 1
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
203
LoginCapture/configure.in
Normal file
203
LoginCapture/configure.in
Normal file
@ -0,0 +1,203 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
AC_INIT(linux/pam_pwcapture.c)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE(logincapture, 0.1.1)
|
||||
RELEASE=`date +%Y%m%d_%H%M`
|
||||
AC_SUBST(RELEASE)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
#
|
||||
# Check for a valid C# compiler
|
||||
#
|
||||
AC_CHECK_PROG(CSC, csc, csc)
|
||||
test -z "$CSC" && AC_CHECK_PROG(CSC, mcs, mcs)
|
||||
test -z "$CSC" && AC_MSG_ERROR([no acceptable C Sharp compiler found in \$PATH])
|
||||
|
||||
case $CSC in
|
||||
#
|
||||
# Mono-specific configuration
|
||||
#
|
||||
mcs)
|
||||
CSC_EXEFLAG=/target:exe
|
||||
CSC_LIBFLAG=/target:library
|
||||
CSC_EXEFLAG=/target:exe
|
||||
CSC_WINEXEFLAG=/target:winexe
|
||||
CSCFLAGS='/d:MONO /warn:4 /d:TRACE'
|
||||
CSCFLAGS_DEBUG="/debug+ /d:DEBUG"
|
||||
CSCFLAGS_OPTIMIZE="/optimize+"
|
||||
MONO=mono
|
||||
MONO_DEBUG='mono --debug'
|
||||
MONO_PATH=
|
||||
SYSTEM_XML='System.Xml.dll'
|
||||
;;
|
||||
#
|
||||
# .NET-specific configuration
|
||||
#
|
||||
csc)
|
||||
CSC_EXEFLAG=/target:exe
|
||||
CSC_LIBFLAG=/target:library
|
||||
CSC_EXEFLAG=/target:exe
|
||||
CSC_WINEXEFLAG=/target:winexe
|
||||
CSCFLAGS='/d:DOTNET /warn:4 /d:TRACE /nologo'
|
||||
CSCFLAGS_DEBUG="/debug+ /d:DEBUG"
|
||||
CSCFLAGS_OPTIMIZE="/optimize+"
|
||||
MONO=
|
||||
MONO_DEBUG=
|
||||
MONO_PATH=
|
||||
SYSTEM_XML='System.XML.dll'
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(CSC)
|
||||
AC_SUBST(CSC_EXEFLAG)
|
||||
AC_SUBST(CSC_LIBFLAG)
|
||||
AC_SUBST(CSC_WINEXEFLAG)
|
||||
AC_SUBST(CSCFLAGS)
|
||||
AC_SUBST(MONO)
|
||||
AC_SUBST(MONO_PATH)
|
||||
AC_SUBST(SYSTEM_XML)
|
||||
|
||||
SRCDIR='$(top_srcdir)'
|
||||
DOCDIR="$SRCDIR/doc"
|
||||
|
||||
AC_SUBST(SRCDIR)
|
||||
AC_SUBST(DOCDIR)
|
||||
|
||||
EMPTY=
|
||||
SPACE='$(EMPTY) $(EMPTY)'
|
||||
|
||||
AC_SUBST(EMPTY)
|
||||
AC_SUBST(SPACE)
|
||||
|
||||
#
|
||||
# Check for a valid operating system
|
||||
#
|
||||
case $host_os in
|
||||
linux*)
|
||||
TARGET_OS='linux'
|
||||
;;
|
||||
cygwin*)
|
||||
TARGET_OS='windows'
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown host_os: $host_os])
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(TARGET_OS)
|
||||
AM_CONDITIONAL(LINUX, test "$TARGET_OS" = "linux")
|
||||
AM_CONDITIONAL(WINDOWS, test "$TARGET_OS" = "windows")
|
||||
|
||||
#
|
||||
# Set platform-specific variables
|
||||
#
|
||||
case $TARGET_OS in
|
||||
#
|
||||
# Linux-specific configuration
|
||||
#
|
||||
linux)
|
||||
#
|
||||
# Set variables
|
||||
#
|
||||
COMMON_CLEAN_FILES=''
|
||||
ICON_EXT='.ico'
|
||||
ICON_FLAG='/resource:'
|
||||
PLATFORM_SUBDIRS=$LINUX_SUBDIRS
|
||||
SEP='/'
|
||||
;;
|
||||
#
|
||||
# Windows-specific configuration
|
||||
#
|
||||
windows)
|
||||
COMMON_CLEAN_FILES='*.suo */*.suo *.csproj.user */*.csproj.user bin obj */bin */obj *.xml */*.xml *.pdb */*.pdb'
|
||||
ICON_EXT='.ico'
|
||||
ICON_FLAG='/win32icon:'
|
||||
PLATFORM_SUBDIRS=$WINDOWS_SUBDIRS
|
||||
SEP='$(EMPTY)\\$(EMPTY)'
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(COMMON_CLEAN_FILES)
|
||||
AC_SUBST(ICON_EXT)
|
||||
AC_SUBST(ICON_FLAG)
|
||||
AC_SUBST(PLATFORM_SUBDIRS)
|
||||
AC_SUBST(SEP)
|
||||
|
||||
#
|
||||
# Run standard macros
|
||||
#
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_HEADER_STDC
|
||||
|
||||
#
|
||||
# Handle --enable-debug
|
||||
#
|
||||
AC_ARG_ENABLE(debug, [
|
||||
--enable-debug configure the Makefiles to build in DEBUG mode],
|
||||
[case "${enableval}" in
|
||||
yes) enable_debug=true ;;
|
||||
no) enable_debug=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||||
esac],[enable_debug=false])
|
||||
AM_CONDITIONAL(DEBUG, test x$enable_debug = xtrue)
|
||||
if test "$enable_debug" = "true"
|
||||
then
|
||||
# Build debug version.
|
||||
CFLAGS="$CFLAGS_DEBUG $CFLAGS"
|
||||
CSCFLAGS="$CSCFLAGS_DEBUG $CSCFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS_DEBUG $CXXFLAGS"
|
||||
DEVENV_CONFIGURATION=Debug
|
||||
MONO=$MONO_DEBUG
|
||||
else
|
||||
# Build optimized version.
|
||||
CFLAGS="$CFLAGS_OPTIMIZE $CFLAGS"
|
||||
CSCFLAGS="$CSCFLAGS_OPTIMIZE $CSCFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS_OPTIMIZE $CXXFLAGS"
|
||||
DEVENV_CONFIGURATION=Release
|
||||
fi
|
||||
AC_SUBST(CSCFLAGS)
|
||||
AC_SUBST(DEVENV_CONFIGURATION)
|
||||
|
||||
#
|
||||
# Configure PKG_CONFIG
|
||||
#
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
if test "x$PKG_CONFIG" = "xno"; then
|
||||
AC_MSG_ERROR([You need to install pkg-config])
|
||||
fi
|
||||
|
||||
#
|
||||
# Configure files
|
||||
#
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
linux/Makefile
|
||||
linux/install/Makefile
|
||||
windows/Makefile
|
||||
package/windows/Makefile
|
||||
package/windows/logincapture-msm/Makefile
|
||||
package/Makefile
|
||||
package/linux/Makefile
|
||||
package/linux/logincapture.spec
|
||||
])
|
||||
|
||||
|
69
LoginCapture/linux/Makefile.am
Normal file
69
LoginCapture/linux/Makefile.am
Normal 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
SUBDIRS = install
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
PamMod_CFILES = $(srcdir)/pam_pwcapture.c
|
||||
PamMod_OBJ = pam_pwcapture.o
|
||||
PamMod_CSFILES_CSC :=
|
||||
PamMod_INCLUDES =
|
||||
PamMod_RESOURCES =
|
||||
PamMod_CFLAGS = $(CFLAGS)
|
||||
PamMod_LIBS =
|
||||
PamMod_LIBPATH =
|
||||
|
||||
EXTRA_DIST = $(PamMod_CFILES)
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: pam_pwcapture.so
|
||||
|
||||
pam_pwcapture.so: $(PamMod_CFILES)
|
||||
$(mkinstalldirs) bin/$(DEVENV_CONFIGURATION)
|
||||
$(CC) -shared -lpam -lpam_misc -o bin/$(DEVENV_CONFIGURATION)/$@ $(PamMod_CFILES)
|
||||
|
||||
install-exec-local: pam_pwcapture.so
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) bin/$(DEVENV_CONFIGURATION)/pam_pwcapture.so $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f pam_pwcapture.so
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
CLEAN_FILES = bin/$(DEVENV_CONFIGURATION)/pam_pwcapture.so
|
||||
|
||||
clean-local:
|
||||
rm -rf *.dbg *.exe *.so *.o *.dll $(CLEAN_FILES) $(COMMON_CLEAN_FILES)
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
73
LoginCapture/linux/install/Makefile.am
Normal file
73
LoginCapture/linux/install/Makefile.am
Normal file
@ -0,0 +1,73 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
ModInstall_CFILES = $(srcdir)/modinstall.c
|
||||
ModInstall_OBJ = modinstall.o
|
||||
ModInstall_CSFILES_CSC :=
|
||||
ModInstall_INCLUDES =
|
||||
ModInstall_RESOURCES =
|
||||
ModInstall_CFLAGS = $(CFLAGS)
|
||||
ModInstall_LIBS =
|
||||
ModInstall_LIBPATH =
|
||||
|
||||
EXTRA_DIST = $(ModInstall_CFILES)
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: modinstall
|
||||
|
||||
modinstall: $(ModInstall_CFILES)
|
||||
$(mkinstalldirs) bin/$(TARGET_CFG)
|
||||
$(CC) -g -o bin/$(TARGET_CFG)/$@ $(ModInstall_CFILES)
|
||||
|
||||
install-exec-local: modinstall
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) bin/$(TARGET_CFG)/modinstall $(DESTDIR)$(bindir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(bindir); rm -f modinstall
|
||||
rmdir $(DESTDIR)$(bindir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(bindir)
|
||||
# cd $(DESTDIR)$(bindir); $(MONO)
|
||||
|
||||
CLEAN_FILES = bin/$(TARGET_CFG)/modinstall
|
||||
|
||||
clean-local:
|
||||
rm -rf *.dbg *.exe *.so *.o *.dll $(CLEAN_FILES) $(COMMON_CLEAN_FILES)
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
75
LoginCapture/linux/install/README
Normal file
75
LoginCapture/linux/install/README
Normal file
@ -0,0 +1,75 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
endif
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
PamMod_CFILES = $(srcdir)/pam_pwcapture.c
|
||||
PamMod_OBJ = pam_pwcapture.o
|
||||
PamMod_CSFILES_CSC :=
|
||||
PamMod_INCLUDES =
|
||||
PamMod_RESOURCES =
|
||||
PamMod_CFLAGS = $(CFLAGS)
|
||||
PamMod_LIBS =
|
||||
PamMod_LIBPATH =
|
||||
|
||||
EXTRA_DIST = $(PamMod_CFILES)
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: pam_pwcapture.so
|
||||
|
||||
pam_pwcapture.so: $(PamMod_CFILES)
|
||||
$(mkinstalldirs) ../Common/$(TARGET_CFG)
|
||||
$(mkinstalldirs) bin/$(TARGET_CFG)
|
||||
$(CC) -shared -lpam -lpam_misc -o bin/$(TARGET_CFG)/$@ $(PamMod_CFILES)
|
||||
cp bin/$(TARGET_CFG)/$@ ../Common/$(TARGET_CFG)/$@
|
||||
|
||||
install-exec-local: pam_pwcapture.so
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) bin/$(TARGET_CFG)/pam_pwcapture.so $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f pam_pwcapture.so
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
CLEAN_FILES = bin/$(TARGET_CFG)/pam_pwcapture.so
|
||||
|
||||
clean-local:
|
||||
rm -rf *.dbg *.exe *.so *.o *.dll $(CLEAN_FILES) $(COMMON_CLEAN_FILES)
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
304
LoginCapture/linux/install/modinstall.c
Normal file
304
LoginCapture/linux/install/modinstall.c
Normal file
@ -0,0 +1,304 @@
|
||||
/***********************************************************************
|
||||
* File: modinstall.c
|
||||
* Author: Juan Carlos Luciani (jluciani@novell.com)
|
||||
*
|
||||
* Abstract: Implements a utility to install or un-install the
|
||||
* pam_pwcapture module.
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
#include "stdio.h"
|
||||
#include "errno.h"
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
|
||||
typedef int BOOL;
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
|
||||
// Usage string
|
||||
char usage[] = "\nmodinstall: usage: [-i InstallPamConfigFilePath] [-u UninstallPamConfigFilePath]\n";
|
||||
|
||||
// Our PAM Configuration Line
|
||||
char pamConfigLine[] = "auth required\tpam_pwcapture.so\n";
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* InstallModule()
|
||||
*
|
||||
* Installs the pam_pwcapture file in the specified file.
|
||||
*
|
||||
* ************************************************************************/
|
||||
void
|
||||
InstallModule(char *pFilePath)
|
||||
{
|
||||
FILE *fp;
|
||||
FILE *fpTemp;
|
||||
fpos_t currLinePosition;
|
||||
char currLine[512];
|
||||
BOOL authLineFound = FALSE;
|
||||
BOOL insertedOurLine = FALSE;
|
||||
|
||||
// Open temporary file
|
||||
if ((fpTemp = tmpfile()) != NULL)
|
||||
{
|
||||
// Open the PAM config file for reading
|
||||
if ((fp = fopen(pFilePath, "r")) != NULL)
|
||||
{
|
||||
// Copy the PAM config file onto the temp file
|
||||
while (fgets(currLine, 512, fp) != NULL)
|
||||
if (fputs(currLine, fpTemp) < 0)
|
||||
fprintf(stderr, "Error writing line to temp file\n");
|
||||
|
||||
// Close the PAM Config file and reopen it for writing
|
||||
fclose(fp);
|
||||
if ((fp = fopen(pFilePath, "w")) != NULL)
|
||||
{
|
||||
// Reset the file position on the temp file to the beginning
|
||||
if (fseek(fpTemp, 0, SEEK_SET) == 0)
|
||||
{
|
||||
// Now move the lines from the temp file onto the clean
|
||||
// PAM config file looking for a place to insert our own
|
||||
// line.
|
||||
while (fgets(currLine, 512, fpTemp) != NULL)
|
||||
{
|
||||
// Check if we are dealing with a line configuring an authentication service
|
||||
if (strlen(currLine) > 4
|
||||
&& tolower(currLine[0]) == 'a'
|
||||
&& tolower(currLine[1]) == 'u'
|
||||
&& tolower(currLine[2]) == 't'
|
||||
&& tolower(currLine[3]) == 'h')
|
||||
{
|
||||
authLineFound = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// This line is not configuring an authentication service, check if we
|
||||
// now need to add a line for our module.
|
||||
if (authLineFound && insertedOurLine == FALSE)
|
||||
{
|
||||
// Do not add our line if the line is commented out
|
||||
if (strlen(currLine) > 1
|
||||
&& currLine[0] != '#')
|
||||
{
|
||||
// Ok, now insert our line into the configuration.
|
||||
if (fputs(pamConfigLine, fp) < 0)
|
||||
fprintf(stderr, "Error writing line to PAM Config file\n");
|
||||
insertedOurLine = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fputs(currLine, fp) < 0)
|
||||
fprintf(stderr, "Error writing line to PAM Config file\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Error resetting position in temp file\n");
|
||||
}
|
||||
|
||||
// Close the PAM Config file
|
||||
fclose(fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Error reopening PAM Config file\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Error opening PAM Config file for reading\n");
|
||||
}
|
||||
|
||||
// Close the temporary file
|
||||
fclose(fpTemp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Unable to open temporary file\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* UninstallModule()
|
||||
*
|
||||
* Uninstalls the pam_pwcapture file from the specified file.
|
||||
*
|
||||
* ************************************************************************/
|
||||
void
|
||||
UninstallModule(char *pFilePath)
|
||||
{
|
||||
FILE *fp;
|
||||
FILE *fpTemp;
|
||||
char currLine[512];
|
||||
|
||||
// Open temporary file
|
||||
if ((fpTemp = tmpfile()) != NULL)
|
||||
{
|
||||
// Open the PAM config file for reading
|
||||
if ((fp = fopen(pFilePath, "r")) != NULL)
|
||||
{
|
||||
// Copy the PAM config file onto the temp file
|
||||
while (fgets(currLine, 512, fp) != NULL)
|
||||
if (fputs(currLine, fpTemp) < 0)
|
||||
fprintf(stderr, "Error writing line to temp file\n");
|
||||
|
||||
// Close the PAM Config file and reopen it for writing
|
||||
fclose(fp);
|
||||
if ((fp = fopen(pFilePath, "w")) != NULL)
|
||||
{
|
||||
// Reset the file position on the temp file to the beginning
|
||||
if (fseek(fpTemp, 0, SEEK_SET) == 0)
|
||||
{
|
||||
// Now move the lines from the temp file onto the clean
|
||||
// PAM config file looking for our own line.
|
||||
while (fgets(currLine, 512, fpTemp) != NULL)
|
||||
{
|
||||
// Write lines other than our own back to the PAM Config file
|
||||
if (strcmp(currLine, pamConfigLine) != 0)
|
||||
{
|
||||
if (fputs(currLine, fp) < 0)
|
||||
fprintf(stderr, "Error writing line to PAM Config file\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Error resetting position in temp file\n");
|
||||
}
|
||||
|
||||
// Close the PAM Config file
|
||||
fclose(fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Error reopening PAM Config file\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Error opening PAM Config file for reading\n");
|
||||
}
|
||||
|
||||
// Close the temporary file
|
||||
fclose(fpTemp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Unable to open temporary file\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* main()
|
||||
*
|
||||
* Entry point for console application.
|
||||
*
|
||||
* ************************************************************************/
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int option;
|
||||
int optionsSpecified = 0;
|
||||
BOOL doneScanning = FALSE;
|
||||
BOOL invalidUsage = FALSE;
|
||||
char *pInstallFile = NULL;
|
||||
char *pUninstallFile = NULL;
|
||||
|
||||
// Scan options
|
||||
while (!doneScanning)
|
||||
{
|
||||
opterr = 0;
|
||||
option = getopt(argc, argv, "i:u:?");
|
||||
|
||||
// Proceed based on the result
|
||||
switch (option)
|
||||
{
|
||||
case 'i':
|
||||
// Install option, check the argument.
|
||||
if (optarg != NULL)
|
||||
{
|
||||
// Record location of argument
|
||||
pInstallFile = optarg;
|
||||
optionsSpecified ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No install file path specified
|
||||
doneScanning = TRUE;
|
||||
invalidUsage = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
// Uninstall option, check the argument.
|
||||
if (optarg != NULL)
|
||||
{
|
||||
// Record location of argument
|
||||
pUninstallFile = optarg;
|
||||
optionsSpecified ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No uninstall file path specified
|
||||
doneScanning = TRUE;
|
||||
invalidUsage = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case '?':
|
||||
// Invalid option detected
|
||||
doneScanning = TRUE;
|
||||
invalidUsage = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
// Done scanning
|
||||
doneScanning = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Do some sanity checking
|
||||
if (!invalidUsage
|
||||
&& optionsSpecified)
|
||||
{
|
||||
// Check if we need to install the module
|
||||
if (pInstallFile)
|
||||
{
|
||||
InstallModule(pInstallFile);
|
||||
}
|
||||
|
||||
// Check if we need to uninstall the module
|
||||
if (pUninstallFile)
|
||||
{
|
||||
UninstallModule(pUninstallFile);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Invalid option detected, print usage message.
|
||||
printf(usage, argv[0]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
239
LoginCapture/linux/pam_pwcapture.c
Normal file
239
LoginCapture/linux/pam_pwcapture.c
Normal file
@ -0,0 +1,239 @@
|
||||
/***********************************************************************
|
||||
* File: pam_pwcapture.c
|
||||
* Author: Juan Carlos Luciani (jluciani@novell.com)
|
||||
*
|
||||
* Abstract: Implements a PAM module that caches the username and
|
||||
* password into the SecretStore wallet.
|
||||
*
|
||||
* Copyright (C) 2004 Novell, Inc.
|
||||
*
|
||||
* This library 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 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
***********************************************************************/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <syslog.h>
|
||||
#include <stdarg.h>
|
||||
#ifndef LINUX
|
||||
#include <security/pam_appl.h>
|
||||
#endif
|
||||
|
||||
#define PAM_SM_AUTH
|
||||
#define PAM_SM_ACCOUNT
|
||||
#define PAM_SM_PASSWORD
|
||||
#define PAM_SM_SESSION
|
||||
|
||||
#include <security/pam_modules.h>
|
||||
#include <security/_pam_macros.h>
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* UpdateWallet()
|
||||
*
|
||||
* Updates the SecretStore wallet with the specified "Local" credentials.
|
||||
*
|
||||
* ************************************************************************/
|
||||
static void
|
||||
LogError(char *pFormatStr, ... )
|
||||
{
|
||||
va_list args;
|
||||
|
||||
openlog("pam_pwcapture", LOG_CONS | LOG_NOWAIT | LOG_ODELAY, LOG_USER);
|
||||
va_start(args, pFormatStr);
|
||||
vsyslog(LOG_USER | LOG_INFO, pFormatStr, args);
|
||||
va_end(args);
|
||||
closelog();
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* UpdateWallet()
|
||||
*
|
||||
* Updates the SecretStore wallet with the specified "Local" credentials.
|
||||
*
|
||||
* ************************************************************************/
|
||||
void UpdateWallet(char *pUsername,
|
||||
char *pPassword)
|
||||
{
|
||||
// Do nothing at this time
|
||||
// tbd
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* pam_sm_authenticate()
|
||||
*
|
||||
* Service provider implementation for pam_authenticate().
|
||||
*
|
||||
* This is a PAM authentication management function.
|
||||
*
|
||||
* We are only interested in obtaining the username and password at this
|
||||
* point and assume that the user has already been authenticated.
|
||||
*
|
||||
* ************************************************************************/
|
||||
PAM_EXTERN int
|
||||
pam_sm_authenticate(pam_handle_t *pamh,
|
||||
int flags,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
char *pUsername = NULL;
|
||||
char *pPassword = NULL;
|
||||
|
||||
// Obtain the username, note that we are not calling
|
||||
// pam_get_user() because we assume that the user has
|
||||
// already been prompted for his name based on where
|
||||
// we are configured in the PAM chain.
|
||||
if (pam_get_item(pamh, PAM_USER, (void*) &pUsername) == PAM_SUCCESS
|
||||
&& pUsername != NULL)
|
||||
{
|
||||
// We got the username, now get the password.
|
||||
if (pam_get_item(pamh, PAM_AUTHTOK, (void*) &pPassword) == PAM_SUCCESS
|
||||
&& pPassword != NULL)
|
||||
{
|
||||
// We got the password, now set the information in the wallet.
|
||||
UpdateWallet(pUsername, pPassword);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogError("Unable to obtain password");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogError("Unable to obtain username");
|
||||
}
|
||||
|
||||
// Always succeed, we do not want to risk messing up the user's login
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* pam_sm_setcred()
|
||||
*
|
||||
* Service provider implementation for pam_setcred().
|
||||
*
|
||||
* This is a PAM authentication management function.
|
||||
*
|
||||
* This function is here just for completedness and to protect against
|
||||
* PAM misconfiguration.
|
||||
*
|
||||
* ************************************************************************/
|
||||
PAM_EXTERN int
|
||||
pam_sm_setcred(pam_handle_t *pamh,
|
||||
int flags,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* pam_sm_acct_mgmt()
|
||||
*
|
||||
* Service provider implementation for pam_acct_mgmt().
|
||||
*
|
||||
* This is a PAM account management function.
|
||||
*
|
||||
* This function is here just for completedness and to protect against
|
||||
* PAM misconfiguration.
|
||||
*
|
||||
* ************************************************************************/
|
||||
PAM_EXTERN int
|
||||
pam_sm_acct_mgmt(pam_handle_t *pamh,
|
||||
int flags,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* pam_sm_chauthtok()
|
||||
*
|
||||
* Service provider implementation for pam_chauthtok().
|
||||
*
|
||||
* This is a PAM password management function.
|
||||
*
|
||||
* This function is here just for completedness and to protect against
|
||||
* PAM misconfiguration.
|
||||
*
|
||||
* ************************************************************************/
|
||||
PAM_EXTERN int
|
||||
pam_sm_chauthtok(pam_handle_t *pamh,
|
||||
int flags,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* pam_sm_open_session()
|
||||
*
|
||||
* Service provider implementation for pam_open_session().
|
||||
*
|
||||
* This is a PAM session management function.
|
||||
*
|
||||
* This function is here just for completedness and to protect against
|
||||
* PAM misconfiguration.
|
||||
*
|
||||
* ************************************************************************/
|
||||
PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh,
|
||||
int flags,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************
|
||||
* pam_sm_close_session()
|
||||
*
|
||||
* Service provider implementation for pam_close_session().
|
||||
*
|
||||
* This is a PAM session management function.
|
||||
*
|
||||
* This function is here just for completedness and to protect against
|
||||
* PAM misconfiguration.
|
||||
*
|
||||
* ************************************************************************/
|
||||
PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh,
|
||||
int flags,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
return PAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* static module data */
|
||||
#ifdef PAM_STATIC
|
||||
struct pam_module _pam_pwcapture_modstruct = {
|
||||
"pam_pwcapture",
|
||||
pam_sm_authenticate,
|
||||
pam_sm_setcred,
|
||||
pam_sm_acct_mgmt,
|
||||
pam_sm_chauthtok,
|
||||
pam_sm_open_session,
|
||||
pam_sm_close_session
|
||||
};
|
||||
#endif
|
||||
|
33
LoginCapture/package/Makefile.am
Normal file
33
LoginCapture/package/Makefile.am
Normal file
@ -0,0 +1,33 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
SUBDIRS = $(TARGET_OS)
|
||||
|
||||
DIST_SUBDIRS = linux windows
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall
|
||||
package package-clean package-install package-uninstall:
|
||||
$(MAKE) -C $(TARGET_OS) $@
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
65
LoginCapture/package/linux/Makefile.am
Normal file
65
LoginCapture/package/linux/Makefile.am
Normal file
@ -0,0 +1,65 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
RPM_FILE = $(PACKAGE)-$(VERSION)-$(RELEASE).$(target_cpu).rpm
|
||||
SRPM_FILE = $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall logincapture
|
||||
|
||||
#all: $(RPM_FILE)
|
||||
|
||||
package: $(RPM_FILE)
|
||||
|
||||
all clean:
|
||||
|
||||
$(RPM_FILE):
|
||||
cd $(top_srcdir); make dist
|
||||
rm -rf RPM
|
||||
mkdir RPM
|
||||
echo %_topdir `pwd`/RPM > $(HOME)/.rpmmacros
|
||||
mkdir -p RPM/BUILD
|
||||
mkdir -p RPM/RPMS
|
||||
mkdir -p RPM/SOURCES
|
||||
mkdir -p RPM/SPECS
|
||||
mkdir -p RPM/SRPMS
|
||||
cp logincapture.spec RPM/SPECS
|
||||
cp $(top_srcdir)/$(PACKAGE)-$(VERSION).tar.gz RPM/SOURCES
|
||||
mv $(top_srcdir)/$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)-$(RELEASE).tar.gz
|
||||
rpmbuild -ba -v -vv --target=$(target_triplet) RPM/SPECS/logincapture.spec
|
||||
cp RPM/RPMS/*/*.rpm .
|
||||
cp RPM/SRPMS/$(SRPM_FILE) .
|
||||
|
||||
package-install: package
|
||||
su -c "rpm -Uvh $(RPM_FILE)"
|
||||
|
||||
package-uninstall:
|
||||
su -c "rpm -e $(PACKAGE)"
|
||||
|
||||
package-clean clean-local:
|
||||
rm -rf *.rpm RPM *.gz
|
||||
|
||||
distclean-local: package-clean
|
||||
rm -f Makefile logincapture.spec
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
140
LoginCapture/package/linux/logincapture.spec.in
Normal file
140
LoginCapture/package/linux/logincapture.spec.in
Normal file
@ -0,0 +1,140 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
# SuSE Specific autobuild tags
|
||||
# neededforbuild pkgconfig glib2 glib2-devel libicu26
|
||||
|
||||
%define prefix /opt/Novell/LoginCapture
|
||||
|
||||
Summary: LoginCapture
|
||||
Name: @PACKAGE@
|
||||
Version: @VERSION@
|
||||
Release: @RELEASE@
|
||||
Copyright: GPL
|
||||
Group: Applications/Productivity
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
URL: http://forge.novell.com/modules/xfmod/project/?isecure
|
||||
#Distribution :
|
||||
Vendor: <unknown>
|
||||
Packager: <unknown>
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}
|
||||
|
||||
#Requires: secretstorewallet
|
||||
Obsoletes: %{name} <= %{version}
|
||||
#=============================================================================
|
||||
%Description
|
||||
LoginCapture provides a way for applications using the SecretStore Wallet
|
||||
to leverage the password entered by the user to login to the desktop when
|
||||
authenticating to backend services. The use of this feature in cases where
|
||||
the username and password used to login to the desktop are synchronized with
|
||||
the backend username and password database should result in fewer requests to
|
||||
the user to enter its credentials.
|
||||
|
||||
#=============================================================================
|
||||
%ChangeLog
|
||||
|
||||
|
||||
#=============================================================================
|
||||
%Prep
|
||||
%setup -n %{name}-%{version}
|
||||
|
||||
|
||||
#=============================================================================
|
||||
%Build
|
||||
./configure --prefix=%{prefix}
|
||||
make
|
||||
|
||||
#=============================================================================
|
||||
%Install
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
#=============================================================================
|
||||
%Clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
#=============================================================================
|
||||
%Post
|
||||
# Do not run script if this is an upgrade
|
||||
if test "$1" != 1; then
|
||||
#echo "LoginCapture install script does not run during upgrade"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Running LoginCapture install script..."
|
||||
|
||||
# Create a symbolic link to our library in the /lib/security folder
|
||||
ln -s "%{prefix}/lib/pam_pwcapture.so" /lib/security/pam_pwcapture.so
|
||||
|
||||
# Determine what Window Manager is in use
|
||||
if [ -f /etc/sysconfig/desktop ]; then
|
||||
if [ -n "´grep GNOME /etc/sysconfig/desktop´" ]; then
|
||||
windows_mgr=/etc/pam.d/gdm
|
||||
echo "Windows Mgr = gdm"
|
||||
elif [ -n "´grep KDE /etc/sysconfig/desktop´" ]; then
|
||||
windows_mgr=/etc/pam.d/kdm
|
||||
echo "Windows Mgr = kdm"
|
||||
elif [ -n "´grep AnotherLevel /etc/sysconfig/desktop´" ]; then
|
||||
windows_mgr=/etc/pam.d/xdm
|
||||
echo "Windows Mgr = xdm"
|
||||
else
|
||||
echo "Unknown windows manager, unable to update windows manager PAM configuration!"
|
||||
exit 0
|
||||
fi
|
||||
if [ -f $windows_mgr ]; then
|
||||
/opt/Novell/LoginCapture/bin/modinstall -i $windows_mgr
|
||||
else
|
||||
echo "Windows manager PAM config file not found!"
|
||||
fi
|
||||
else
|
||||
echo "Missing desktop file, unable to update windows manager PAM configuration!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "done running LoginCapture install script!"
|
||||
|
||||
#=============================================================================
|
||||
%Preun
|
||||
# Do not run script if this is an upgrade
|
||||
if test "$1" == 1; then
|
||||
#echo "LoginCapture un-install script does not run during upgrade"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Running LoginCapture un-install script..."
|
||||
|
||||
# Uninstall our module from all of the PAM configuration files onto which it
|
||||
# has been installed by our utility.
|
||||
for i in `grep -l pam_pwcapture /etc/pam.d/*`;do /opt/Novell/LoginCapture/bin/modinstall -u $i; done
|
||||
|
||||
# Remove symbolic link to our library from the /lib/security folder
|
||||
rm -f /lib/security/pam_pwcapture.so
|
||||
|
||||
echo "done running LoginCapture un-install script!"
|
||||
|
||||
#=============================================================================
|
||||
%Files
|
||||
%defattr(-,root,root)
|
||||
%{prefix}/*
|
||||
#%{prefix}/lib/*
|
||||
#%{prefix}/share/*
|
||||
|
32
LoginCapture/package/windows/Makefile.am
Normal file
32
LoginCapture/package/windows/Makefile.am
Normal file
@ -0,0 +1,32 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
SUBDIRS = logincapture-msm
|
||||
|
||||
.PHONY: package-clean package-install package-uninstall
|
||||
|
||||
package package-clean package-install package-uninstall:
|
||||
$(MAKE) -C logincapture-msm $@
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
61
LoginCapture/package/windows/logincapture-msm/Makefile.am
Normal file
61
LoginCapture/package/windows/logincapture-msm/Makefile.am
Normal file
@ -0,0 +1,61 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
MSM_FILE = $(PACKAGE)-$(VERSION)-$(RELEASE).msm
|
||||
MSM_LOG_FILE = devenv-logincapture-msm.log
|
||||
|
||||
.PHONY: package package-clean package-install package-uninstall logincapture devenv
|
||||
|
||||
#all clean:
|
||||
|
||||
package: $(MSM_FILE)
|
||||
|
||||
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
|
||||
|
||||
$(MSM_FILE): devenv
|
||||
@rm -f $(MSM_LOG_FILE) $@
|
||||
@CMD='"$(VSINSTALLDIR)/devenv.exe" ../../../LoginCapture.sln /build $(DEVENV_CONFIGURATION) /project logincapture-msm /out $(MSM_LOG_FILE)'; \
|
||||
echo $$CMD; \
|
||||
if eval $$CMD; then \
|
||||
ls -l $(DEVENV_CONFIGURATION)/logincapture.msm; \
|
||||
else \
|
||||
grep -a "ERROR:" $(MSM_LOG_FILE); \
|
||||
fi
|
||||
|
||||
securesink:
|
||||
make -C ../.. all
|
||||
|
||||
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 logincapture.spec
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
||||
|
||||
|
@ -0,0 +1,284 @@
|
||||
"DeployProject"
|
||||
{
|
||||
"VSVersion" = "3:701"
|
||||
"ProjectType" = "8:{DD7A5B58-C2F9-40FF-B2EF-0773356FB978}"
|
||||
"IsWebType" = "8:FALSE"
|
||||
"ProjectName" = "8:logincapture-msm"
|
||||
"LanguageId" = "3:1033"
|
||||
"CodePage" = "3:1252"
|
||||
"UILanguageId" = "3:1033"
|
||||
"SccProjectName" = "8:"
|
||||
"SccLocalPath" = "8:"
|
||||
"SccAuxPath" = "8:"
|
||||
"SccProvider" = "8:"
|
||||
"Hierarchy"
|
||||
{
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_1D888F783949406D8AF759805E213BD5"
|
||||
"OwnerKey" = "8:_UNDEFINED"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
"Entry"
|
||||
{
|
||||
"MsmKey" = "8:_5024BA67E4D44B2582887A3EE4467610"
|
||||
"OwnerKey" = "8:_UNDEFINED"
|
||||
"MsmSig" = "8:_UNDEFINED"
|
||||
}
|
||||
}
|
||||
"Configurations"
|
||||
{
|
||||
"Debug"
|
||||
{
|
||||
"DisplayName" = "8:Debug"
|
||||
"IsDebugOnly" = "11:TRUE"
|
||||
"IsReleaseOnly" = "11:FALSE"
|
||||
"OutputFilename" = "8:Debug\\logincapture.msm"
|
||||
"PackageFilesAs" = "3:2"
|
||||
"PackageFileSize" = "3:-2147483648"
|
||||
"CabType" = "3:1"
|
||||
"Compression" = "3:2"
|
||||
"SignOutput" = "11:FALSE"
|
||||
"CertificateFile" = "8:"
|
||||
"PrivateKeyFile" = "8:"
|
||||
"TimeStampServer" = "8:"
|
||||
"InstallerBootstrapper" = "3:1"
|
||||
}
|
||||
"Release"
|
||||
{
|
||||
"DisplayName" = "8:Release"
|
||||
"IsDebugOnly" = "11:FALSE"
|
||||
"IsReleaseOnly" = "11:TRUE"
|
||||
"OutputFilename" = "8:Release\\logincapture.msm"
|
||||
"PackageFilesAs" = "3:2"
|
||||
"PackageFileSize" = "3:-2147483648"
|
||||
"CabType" = "3:1"
|
||||
"Compression" = "3:2"
|
||||
"SignOutput" = "11:FALSE"
|
||||
"CertificateFile" = "8:"
|
||||
"PrivateKeyFile" = "8:"
|
||||
"TimeStampServer" = "8:"
|
||||
"InstallerBootstrapper" = "3:1"
|
||||
}
|
||||
}
|
||||
"Deployable"
|
||||
{
|
||||
"CustomAction"
|
||||
{
|
||||
"{0C9D821E-95BB-411F-BE03-2864360EBF94}:_6D6BB2ACDEFC4CA79BDA5440243CBE5D"
|
||||
{
|
||||
"Name" = "8:regsvr32.exe"
|
||||
"Condition" = "8:"
|
||||
"Object" = "8:_1D888F783949406D8AF759805E213BD5"
|
||||
"FileType" = "3:2"
|
||||
"InstallAction" = "3:4"
|
||||
"Arguments" = "8:/u /i /s \"\\Program Files\\Novell\\CASA\\bin\\lcredmgr.dll\""
|
||||
"EntryPoint" = "8:"
|
||||
"Sequence" = "3:1"
|
||||
"Identifier" = "8:_C86BF882_0E19_4471_9251_48E5B7A43128"
|
||||
"InstallerClass" = "11:FALSE"
|
||||
"CustomActionData" = "8:"
|
||||
}
|
||||
"{0C9D821E-95BB-411F-BE03-2864360EBF94}:_71B82B5A576741B7A39384FBDC5965D1"
|
||||
{
|
||||
"Name" = "8:regsvr32.exe"
|
||||
"Condition" = "8:"
|
||||
"Object" = "8:_1D888F783949406D8AF759805E213BD5"
|
||||
"FileType" = "3:2"
|
||||
"InstallAction" = "3:1"
|
||||
"Arguments" = "8:/i /n /s \"\\Program Files\\Novell\\CASA\\bin\\lcredmgr.dll\""
|
||||
"EntryPoint" = "8:"
|
||||
"Sequence" = "3:1"
|
||||
"Identifier" = "8:_C5112ACD_2314_4F87_9D57_4D7313F31D53"
|
||||
"InstallerClass" = "11:FALSE"
|
||||
"CustomActionData" = "8:"
|
||||
}
|
||||
}
|
||||
"DefaultFeature"
|
||||
{
|
||||
"Name" = "8:DefaultFeature"
|
||||
"Title" = "8:"
|
||||
"Description" = "8:"
|
||||
}
|
||||
"File"
|
||||
{
|
||||
"{A582A373-4685-4296-BEFE-614B80A702C3}:_1D888F783949406D8AF759805E213BD5"
|
||||
{
|
||||
"SourcePath" = "8:C:\\WINDOWS\\system32\\regsvr32.exe"
|
||||
"TargetName" = "8:regsvr32.exe"
|
||||
"Tag" = "8:"
|
||||
"Folder" = "8:_297B05AEB9BB4998B00A77B38D50F3C2"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Vital" = "11:TRUE"
|
||||
"ReadOnly" = "11:FALSE"
|
||||
"Hidden" = "11:FALSE"
|
||||
"System" = "11:FALSE"
|
||||
"Permanent" = "11:FALSE"
|
||||
"SharedLegacy" = "11:FALSE"
|
||||
"PackageAs" = "3:1"
|
||||
"Register" = "3:1"
|
||||
"Exclude" = "11:TRUE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"IsolateTo" = "8:"
|
||||
}
|
||||
}
|
||||
"FileType"
|
||||
{
|
||||
}
|
||||
"Folder"
|
||||
{
|
||||
"{78BAF5CE-F2E5-45BE-83BC-DB6AF387E941}:_297B05AEB9BB4998B00A77B38D50F3C2"
|
||||
{
|
||||
"Name" = "8:#1914"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:SystemFolder"
|
||||
"Folders"
|
||||
{
|
||||
}
|
||||
}
|
||||
"{78BAF5CE-F2E5-45BE-83BC-DB6AF387E941}:_4DAE214C2D21459D8E099142A2C41003"
|
||||
{
|
||||
"Name" = "8:#1910"
|
||||
"AlwaysCreate" = "11:FALSE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:CommonFilesFolder"
|
||||
"Folders"
|
||||
{
|
||||
}
|
||||
}
|
||||
"{78BAF5CE-F2E5-45BE-83BC-DB6AF387E941}:_74BD0329C7A64FCBBA7AA1C9017F7231"
|
||||
{
|
||||
"Name" = "8:#1912"
|
||||
"AlwaysCreate" = "11:TRUE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:ProgramFilesFolder"
|
||||
"Folders"
|
||||
{
|
||||
"{F27BD5C5-A65D-4608-96D4-7C5DA1F76302}:_2301CB3437EB4A4D9C07E46824B02F95"
|
||||
{
|
||||
"Name" = "8:Novell"
|
||||
"AlwaysCreate" = "11:TRUE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:_74D74862EF3A4184916B7C9EEB362F45"
|
||||
"Folders"
|
||||
{
|
||||
"{F27BD5C5-A65D-4608-96D4-7C5DA1F76302}:_3950800C84A1418EBD9FAB49DED77EE7"
|
||||
{
|
||||
"Name" = "8:CASA"
|
||||
"AlwaysCreate" = "11:TRUE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:_5EC83C58CC264998AA2BA9E70CEBE8D2"
|
||||
"Folders"
|
||||
{
|
||||
"{F27BD5C5-A65D-4608-96D4-7C5DA1F76302}:_811C752B8ADB46E7BD2C7DA2E4455D6D"
|
||||
{
|
||||
"Name" = "8:bin"
|
||||
"AlwaysCreate" = "11:TRUE"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Property" = "8:_BC04516D72544695891BA4E7AE0E46ED"
|
||||
"Folders"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"Sequences"
|
||||
{
|
||||
}
|
||||
"MergeModule"
|
||||
{
|
||||
}
|
||||
"Module"
|
||||
{
|
||||
"ModuleSignature" = "8:MergeModule.76F71560363541FD86D3AE2129C38D1A"
|
||||
"Version" = "8:1.0.0.0"
|
||||
"Title" = "8:logincapture-msm"
|
||||
"Subject" = "8:"
|
||||
"Author" = "8:Novell"
|
||||
"Keywords" = "8:"
|
||||
"Comments" = "8:"
|
||||
"SearchPath" = "8:"
|
||||
"UseSystemSearchPath" = "11:TRUE"
|
||||
}
|
||||
"ProjectOutput"
|
||||
{
|
||||
"{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_5024BA67E4D44B2582887A3EE4467610"
|
||||
{
|
||||
"SourcePath" = "8:..\\..\\..\\windows\\bin\\Debug\\lcredmgr.dll"
|
||||
"TargetName" = "8:"
|
||||
"Tag" = "8:"
|
||||
"Folder" = "8:_811C752B8ADB46E7BD2C7DA2E4455D6D"
|
||||
"Condition" = "8:"
|
||||
"Transitive" = "11:FALSE"
|
||||
"Vital" = "11:TRUE"
|
||||
"ReadOnly" = "11:FALSE"
|
||||
"Hidden" = "11:FALSE"
|
||||
"System" = "11:FALSE"
|
||||
"Permanent" = "11:FALSE"
|
||||
"SharedLegacy" = "11:FALSE"
|
||||
"PackageAs" = "3:1"
|
||||
"Register" = "3:1"
|
||||
"Exclude" = "11:FALSE"
|
||||
"IsDependency" = "11:FALSE"
|
||||
"IsolateTo" = "8:"
|
||||
"ProjectOutputGroupRegister" = "3:4"
|
||||
"OutputConfiguration" = "8:"
|
||||
"OutputGroupCanonicalName" = "8:Built"
|
||||
"OutputProjectGuid" = "8:{55E85618-3643-4213-A15F-08DA1F02D9BB}"
|
||||
"ShowKeyOutput" = "11:TRUE"
|
||||
"ExcludeFilters"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"Registry"
|
||||
{
|
||||
"HKLM"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKCU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKCR"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
"HKPU"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
"Shortcut"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
75
LoginCapture/windows/Makefile.am
Normal file
75
LoginCapture/windows/Makefile.am
Normal file
@ -0,0 +1,75 @@
|
||||
#######################################################################
|
||||
#
|
||||
# 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: Juan Carlos Luciani <jluciani@novell.com>
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
# handle Mono secondary dependencies
|
||||
export MONO_PATH := $(MONO_PATH)
|
||||
|
||||
lcredmgr_CSFILES = $(srcdir)/lextend.cpp $(srcdir)/lcredmgr.cpp
|
||||
lcredmgr_CSFILES_CSC := $(subst /,$(SEP),$(lcredmgr_CSFILES))
|
||||
lcredmgr_INCLUDES =
|
||||
lcredmgr_RESOURCES =
|
||||
lcredmgr_FLAGS = $(CSC_LIBFLAG)
|
||||
lcredmgr_LIBS =
|
||||
lcredmgr_LIBPATH =
|
||||
|
||||
EXTRA_DIST = $(lcredmgr_CSFILES)
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
all: lcredmgr.dll
|
||||
|
||||
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
|
||||
|
||||
lcredmgr.dll: $(lcredmgr_CSFILES) $(lcredmgr_RESOURCES) devenv
|
||||
@rm -f $(MSM_LOG_FILE) $@
|
||||
@CMD='"$(VSINSTALLDIR)/devenv.exe" ../LoginCapture.sln /build $(DEVENV_CONFIGURATION) /project lcredmgr /out build.log'; \
|
||||
echo $$CMD; \
|
||||
if eval $$CMD; then \
|
||||
ls -l bin/$(DEVENV_CONFIGURATION)/lcredmgr.dll; \
|
||||
else \
|
||||
grep -a "ERROR:" build.log; \
|
||||
fi
|
||||
|
||||
install-exec-local: Novell.Security.lcredmgr.dll
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) bin/$(DEVENV_CONFIGURATION)/lcredmgr.dll $(DESTDIR)$(libdir)/
|
||||
|
||||
uninstall-local:
|
||||
cd $(DESTDIR)$(libdir); rm -f lcredmgr.dll
|
||||
rmdir $(DESTDIR)$(libdir)
|
||||
|
||||
#installcheck-local: install
|
||||
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
||||
# cd $(DESTDIR)$(libdir); $(MONO)
|
||||
|
||||
CLEAN_FILES = bin/$(DEVENV_CONFIGURATION)/lcredmgr.dll ../Common/$(DEVENV_CONFIGURATION)/lcredmgr.dll
|
||||
|
||||
clean-local:
|
||||
rm -rf *.dbg *.exe *.dll $(CLEAN_FILES) $(COMMON_CLEAN_FILES)
|
||||
|
||||
distclean-local:
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile.in
|
||||
|
101
LoginCapture/windows/external/provider/include/nwlgext.h
vendored
Normal file
101
LoginCapture/windows/external/provider/include/nwlgext.h
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
/****************************************************************************
|
||||
Source module name: nwlgext.h
|
||||
Release Version: 1.00
|
||||
|
||||
$Workfile: nwlgext.h $
|
||||
$Revision: 1.1 $
|
||||
$Modtime:: $
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1999 Novell, Inc. All Rights Reserved.
|
||||
U.S. Patent Number 5,781,724 -- Novell, Inc.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
****************************************************************************/
|
||||
#ifndef NWLOGIN_H
|
||||
# include <nwlogin.h>
|
||||
#endif
|
||||
|
||||
#ifndef NWLGEXT_H
|
||||
#define NWLGEXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct tagNWLGLoginExtInfo
|
||||
{
|
||||
nint loginExtIDLen; // ID buffer length (max allowed by api is 32)
|
||||
pnstr loginExtID; // ID is the unique name for subkey in registry
|
||||
nint loginExtDLLNameLen; // DLL file name length
|
||||
pnstr loginExtDLLName; // DLL file name (may include path)
|
||||
nint loginExtDescLen; // Descriptive text buffer length
|
||||
pnstr loginExtDesc; // Any descriptive text
|
||||
DWORD loginExtType; // Login extension in type, UI, Authentication, Script only,...
|
||||
} NWLGLoginExtInfo;
|
||||
|
||||
typedef NWLGLoginExtInfo N_FAR * pNWLGLoginExtInfo;
|
||||
|
||||
/* some arbitrary limits set by API */
|
||||
#define LOGIN_EXT_MAX_ID_BYTES 32
|
||||
#define LOGIN_EXT_MAX_DLL_NAME MAX_PATH
|
||||
#define LOGIN_EXT_MAX_DESC 64
|
||||
|
||||
/* definitions valid for loginExtType */
|
||||
#define LOGIN_EXT_UI 0x0001
|
||||
#define LOGIN_EXT_AUTHENTICATE 0x0002
|
||||
#define LOGIN_EXT_SCRIPT 0x0004
|
||||
#define LOGIN_EXT_ALL 0x00FF
|
||||
|
||||
#define LOGIN_EXT_MANDATORY 0x0100
|
||||
#define LOGIN_EXT_OPTIONAL 0x0200
|
||||
|
||||
#define LOGIN_EXT_SECONDARY 0x4000
|
||||
#define LOGIN_EXT_MASTER 0x8000
|
||||
|
||||
/* Login extension init (registration) entry point */
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLoginExtInit
|
||||
(
|
||||
pNWLGAccessRec * pAccess,
|
||||
pNWVersion pCompiledVersion,
|
||||
pNWVersion pRuntimeVersion,
|
||||
nptr reserved1,
|
||||
nptr reserved2
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGLoginExtRegOpen
|
||||
(
|
||||
HKEY *hKey
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGLoginExtRegGet
|
||||
(
|
||||
DWORD *iSubKey, // -1 = find from structure, 0 = read first, increment for next
|
||||
pNWLGLoginExtInfo loginExtInfo
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGLoginExtRegWrite
|
||||
(
|
||||
pNWLGLoginExtInfo
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGLoginExtRegDelete
|
||||
(
|
||||
pNWLGLoginExtInfo loginExtInfo
|
||||
);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
907
LoginCapture/windows/external/provider/include/nwlogin.h
vendored
Normal file
907
LoginCapture/windows/external/provider/include/nwlogin.h
vendored
Normal file
@ -0,0 +1,907 @@
|
||||
/****************************************************************************
|
||||
Source module name: nwlogin.h
|
||||
Release Version: 1.00
|
||||
|
||||
Copyright (c) 1989-1999 Novell, Inc. All Rights Reserved.
|
||||
U.S. Patent Number 5,781,724 -- Novell, Inc.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
2-6-98 KPW remove PRE_NETWARE_LOGIN event - never used and don't plan to
|
||||
2-18-98 KPW added NWLG_RESTART_PRIMARY_LOGIN restartMode
|
||||
****************************************************************************/
|
||||
#ifndef NWLOGIN_H
|
||||
#define NWLOGIN_H
|
||||
|
||||
#ifndef NTYPES_H
|
||||
#include <ntypes.h>
|
||||
#endif
|
||||
|
||||
// MSVC 4.x MSVC 1.52 4.x BC4.x BC5.x
|
||||
#if !defined (_WINDOWS_) && !defined(_INC_WINDOWS) && !defined(__WINDOWS_H)
|
||||
// take care of a compile error for modules that do not need windows.h
|
||||
// but do include nwlogin.h
|
||||
#if defined (N_PLAT_MSW4) || defined (N_PLAT_WNT)
|
||||
typedef nptr HWND;
|
||||
#else
|
||||
typedef nuint HWND;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NWCALDEF_H
|
||||
#include <nwcaldef.h>
|
||||
#endif
|
||||
|
||||
#ifndef __NWDSDEFS_H
|
||||
#include <nwdsdefs.h>
|
||||
#endif
|
||||
|
||||
#if defined (N_ARCH_32)
|
||||
#if ! defined ( NWAPIDEF_H )
|
||||
#include <nwapidef.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _NWDSDC_HEADER_
|
||||
#include <nwdsdc.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
Event constants
|
||||
Command Line parsing events
|
||||
*/
|
||||
|
||||
#define NWLG_INITIALIZE 0
|
||||
#define NWLG_CMD_LINE_SERVICE 1
|
||||
#define NWLG_CMD_LINE_USER 2
|
||||
#define NWLG_CMD_LINE_NS 3
|
||||
#define NWLG_PRESCRIPT_CLS 4
|
||||
#define NWLG_CMD_LINE_SCRIPT_FILE 5
|
||||
#define NWLG_CMD_LINE_PROFILE 51
|
||||
#define NWLG_CMD_LINE_FLAGS 52
|
||||
#define NWLG_CMD_LINE_ARGS 53
|
||||
#define NWLG_CMD_LINE_BIND_LOGIN 6
|
||||
#define NWLG_CMD_LINE_TREE 7
|
||||
#define NWLG_RESOLVE_USER_NAME 8
|
||||
#define NWLG_NO_BANNER 9
|
||||
#define NWLG_CMD_LINE_ARG_DONE 10
|
||||
#define NWLG_CMD_LINE_HELP 11
|
||||
|
||||
/*
|
||||
Script related events
|
||||
*/
|
||||
#define NWLG_PRE_SCRIPTS 12
|
||||
#define NWLG_OPEN_SCRIPT 13
|
||||
#define NWLG_GET_SCRIPT_LINE 14
|
||||
#define NWLG_SCRIPT_BREAK 15
|
||||
#define NWLG_REWIND_SCRIPT 16
|
||||
#define NWLG_BIND_ATTACH 17
|
||||
#define NWLG_TERMINATE 18
|
||||
#define NWLG_CLEAR_SCREEN 19
|
||||
#define NWLG_DOS_COMSPEC 20
|
||||
#define NWLG_DS_CONTEXT 21
|
||||
#define NWLG_DISP_FILE 22
|
||||
#define NWLG_DOS_BREAK 23
|
||||
#define NWLG_DOS_VERIFY 24
|
||||
#define NWLG_DRIVE 25
|
||||
#define NWLG_EXIT 26
|
||||
#define NWLG_EXEC 27
|
||||
#define NWLG_FIRE_PHASERS 28
|
||||
#define NWLG_DISP_LTIME 29
|
||||
#define NWLG_MACHINE 30
|
||||
#define NWLG_MEMBER_OF 31
|
||||
#define NWLG_NO_DEFAULT 32
|
||||
#define NWLG_TERM_CMD 33
|
||||
#define NWLG_PAUSE 34
|
||||
#define NWLG_DOS_PC_COMPAT 35
|
||||
#define NWLG_PROFILE 36
|
||||
#define NWLG_NOTHING 37
|
||||
#define NWLG_BIND_SCRIPT_SERVER 38
|
||||
#define NWLG_SET_ENV_VAR 39
|
||||
#define NWLG_SYNC_TIME_FLAG 40
|
||||
#define NWLG_DOS_SWAP_PATH 41
|
||||
#define NWLG_DISP_LINE 42
|
||||
#define NWLG_INCLUDE 43
|
||||
#define NWLG_TREE_ATTACH 44
|
||||
#define NWLG_SWAP_CMD 45
|
||||
#define NWLG_NO_SWAP_CMD 46
|
||||
#define NWLG_CHDIR 47
|
||||
#define NWLG_LOGOUT_ALL 48
|
||||
#define NWLG_LOGOUT_ONE 49
|
||||
#define NWLG_CONTINUE 50
|
||||
|
||||
#define NWLG_RUN_SCRIPT 60
|
||||
#define NWLG_POST_SCRIPTS 61
|
||||
#define NWLG_DISP_BANNER 62
|
||||
#define NWLG_PWD_EXP_CHK 63
|
||||
#define NWLG_PWD_EXP_CHK_STAT 64
|
||||
#define NWLG_PWD_EXP_UPD 65
|
||||
|
||||
/*
|
||||
Connection Events
|
||||
*/
|
||||
#define NWLG_CONN_GET 90
|
||||
#define NWLG_CONN_AUTH 91
|
||||
#define NWLG_CONN_EXPIRED 92
|
||||
#define NWLG_SYNC_PWD_START 93
|
||||
#define NWLG_SYNC_PWD_END 94
|
||||
#define NWLG_SYNC_LIST_BLD 95
|
||||
#define NWLG_SYNC_LIST_UPD 96
|
||||
#define NWLG_SYNC_LIST_FREE 97
|
||||
|
||||
#define NWLG_PRE_LOGIN 98
|
||||
|
||||
/* Internal SYSTEM type message */
|
||||
#define NWLG_SYSTEM 100
|
||||
|
||||
#define NWLG_NETWARE_LOGIN 101
|
||||
|
||||
#define NWLG_ELSE 190
|
||||
#define NWLG_END 191
|
||||
#define NWLG_GOTO 192
|
||||
#define NWLG_IF 193
|
||||
#define NWLG_IFDO 194
|
||||
#define NWLG_LABEL 195
|
||||
#define NWLG_MAP 196
|
||||
#define NWLG_SHIFT 197
|
||||
|
||||
/*
|
||||
Map events
|
||||
*/
|
||||
/* Individual map events */
|
||||
#define NWLG_MAP_ADD 200
|
||||
#define NWLG_MAP_DEL 201
|
||||
#define NWLG_MAP_CHANGE 202
|
||||
#define NWLG_MAP_MOVE 203
|
||||
#define NWLG_MAP_DISP 204
|
||||
#define NWLG_MAP_MSG 205
|
||||
#define NWLG_MAP_ERR 206
|
||||
|
||||
/* detail map events from parser
|
||||
summary events below are passed to event handler
|
||||
*/
|
||||
#define NWLG_MAP_ADD_DRV 210
|
||||
#define NWLG_MAP_ADD_DRV_TO_SDRV 211
|
||||
#define NWLG_MAP_ADD_SRCH 212
|
||||
#define NWLG_MAP_ADD_SRCH_TO_SDRV 213
|
||||
#define NWLG_MAP_CHG_DRV_TO_SDRV 214
|
||||
#define NWLG_MAP_CHG_INS_DRV_TO_SDRV 215
|
||||
#define NWLG_MAP_CHG_SRCH 216
|
||||
#define NWLG_MAP_DEL_DRV 217
|
||||
#define NWLG_MAP_DEL_SRCH 218
|
||||
#define NWLG_MAP_DISP_ALL_DRVS 219
|
||||
#define NWLG_MAP_DISP_DRV 220
|
||||
#define NWLG_MAP_DISP_OFF 221
|
||||
#define NWLG_MAP_DISP_ON 222
|
||||
#define NWLG_MAP_DISP_SRCH 223
|
||||
#define NWLG_MAP_ERRORS_OFF 224
|
||||
#define NWLG_MAP_ERRORS_ON 225
|
||||
#define NWLG_MAP_INS_SRCH 226
|
||||
#define NWLG_MAP_INS_SRCH_TO_SDRV 227
|
||||
#define NWLG_MAP_NEXT_DRV 228
|
||||
|
||||
/*
|
||||
event types for extended script commands and to introduce some new hooks
|
||||
used by Mobile
|
||||
*/
|
||||
#define NWLG_DISP_WIBBLE 300
|
||||
#define NWLG_CAPTURE_PRINTER 301
|
||||
#define NWLG_DCACHE_ADD 302
|
||||
#define NWLG_DCACHE_FIND 303
|
||||
|
||||
#define NWLG_DO_GOTO 305
|
||||
|
||||
#define NWLG_AVAILABLE_DRIVE 309
|
||||
#define NWLG_NOTIFY_PARENT_WINDOW 310
|
||||
#define NWLG_PARSE_SCRIPT_LINE 311
|
||||
#define NWLG_NOTIFY_LOGIN_NAMES 312
|
||||
#define NWLG_NOTIFY_PROGRESS 313
|
||||
#define NWLG_GET_LOCATION_NAME 314
|
||||
#define NWLG_GET_FIRST_NETWORK_DRIVE 315
|
||||
|
||||
/*
|
||||
Event types for communication between extensions and default UI.
|
||||
*/
|
||||
#define NWLG_UI_DATA_CHANGED 400
|
||||
/* Event types for NWLG_UI_DATA_CHANGED */
|
||||
# define NWLG_UI_DC_USERNAME 0x0101
|
||||
# define NWLG_UI_DC_TREE_LOGIN 0x0201
|
||||
# define NWLG_UI_DC_TREE 0x0202
|
||||
# define NWLG_UI_DC_SERVER 0x0203
|
||||
# define NWLG_UI_DC_BINDERY_CONN 0x0204
|
||||
# define NWLG_UI_DC_CONTEXT 0x0205
|
||||
# define NWLG_UI_DC_CLEAR_CONNS 0x0206
|
||||
# define NWLG_UI_DC_RUN_SCRIPTS 0x0301
|
||||
# define NWLG_UI_DC_DISPLAY_RESULTS 0x0302
|
||||
# define NWLG_UI_DC_AUTO_CLOSE 0x0303
|
||||
# define NWLG_UI_DC_LOGIN_SCRIPT 0x0304
|
||||
# define NWLG_UI_DC_PROFILE_SCRIPT 0x0305
|
||||
# define NWLG_UI_DC_VAR 0x0400
|
||||
# define NWLG_UI_DC_MOBILE_PROFILE 0x4101
|
||||
# define NWLG_UI_DC_CONNECT_OFFLINE 0x4102
|
||||
# define NWLG_UI_DC_DEBUG_MODE 0x4301
|
||||
# define NWLG_UI_DC_VERBOSE_MODE 0x4302
|
||||
|
||||
#define NWLG_UNKNOWN 999
|
||||
/*
|
||||
END OF Event constants
|
||||
*/
|
||||
|
||||
/*
|
||||
NWLogin Shared Data identifier tags
|
||||
*/
|
||||
#define NWLG_SD_SERVER 1
|
||||
#define NWLG_SD_USER 2
|
||||
#define NWLG_SD_NS 3
|
||||
#define NWLG_SD_CLS 4
|
||||
#define NWLG_SD_SCRIPT_FILE 5
|
||||
#define NWLG_SD_BIND_LOGIN 6
|
||||
#define NWLG_SD_TREE_NAME 7
|
||||
#define NWLG_SD_SWAP_FLAG 8
|
||||
#define NWLG_SD_SWAP_PATH 9
|
||||
#define NWLG_SD_NB 10
|
||||
|
||||
#define NWLG_SD_ACCESS_SERVER 11
|
||||
#define NWLG_SD_AM_PM 12
|
||||
#define NWLG_SD_DAY 13
|
||||
#define NWLG_SD_DAY_OF_WEEK 14
|
||||
#define NWLG_SD_ENVAR 15
|
||||
#define NWLG_SD_FILE_SERVER 16
|
||||
#define NWLG_SD_FULL_NAME 17
|
||||
#define NWLG_SD_GREETING_TIME 18
|
||||
#define NWLG_SD_HOUR 19
|
||||
#define NWLG_SD_HOUR24 20
|
||||
#define NWLG_SD_LAST_NAME 21
|
||||
#define NWLG_SD_LOGIN_NAME 22
|
||||
#define NWLG_SD_LOGIN_CONTEXT 23
|
||||
#define NWLG_SD_MACHINE 24
|
||||
#define NWLG_SD_MINUTE 25
|
||||
#define NWLG_SD_MONTH 26
|
||||
#define NWLG_SD_MONTH_NAME 27
|
||||
#define NWLG_SD_NDAY_OF_YEAR 28
|
||||
#define NWLG_SD_NET_ADDRESS 29
|
||||
#define NWLG_SD_MAIL_STATUS 30
|
||||
#define NWLG_SD_PASSWORD_EXPIRES 31
|
||||
#define NWLG_SD_OS_VERSION 32
|
||||
#define NWLG_SD_OS_NAME 33
|
||||
#define NWLG_SD_REQ_VERSION 34
|
||||
#define NWLG_SD_REQ_CONTEXT 35
|
||||
#define NWLG_SD_SECOND 36
|
||||
#define NWLG_SD_SHORT_YEAR 37
|
||||
#define NWLG_SD_SHELL_VERSION 38
|
||||
#define NWLG_SD_SHORT_MACHINE 39
|
||||
#define NWLG_SD_STATION 40
|
||||
#define NWLG_SD_USER_OBJ 41
|
||||
#define NWLG_SD_YEAR 42
|
||||
#define NWLG_SD_CL_USER 43
|
||||
#define NWLG_SD_CL_SERVER 44
|
||||
#define NWLG_SD_PROFILE 45
|
||||
#define NWLG_SD_PASSWORD 46
|
||||
#define NWLG_SD_LOADPATH 47
|
||||
#define NWLG_SD_CMD_LINE_FLAGS 48
|
||||
#define NWLG_SD_CMD_LINE_ARG 49
|
||||
#define NWLG_SD_CONTEXT_HND 50
|
||||
#define NWLG_SD_PC_COMPATIBLE 51
|
||||
#define NWLG_SD_PRI_CONN_HANDLE 52
|
||||
#define NWLG_SD_APP_INSTANCE_HND 53
|
||||
#define NWLG_SD_ERROR_LEVEL 54
|
||||
#define NWLG_SD_START_INFO 55
|
||||
#define NWLG_SD_MULTI_TREE 56
|
||||
|
||||
/* Extensions to the Shared Data identifier tags for Mobile */
|
||||
#define NWLG_SD_DISPLAY_ERRORS 100
|
||||
#define NWLG_SD_DISPLAY_MAPPINGS 101
|
||||
#define NWLG_SD_PARSED_NAME 102
|
||||
#define NWLG_SD_PARSED_STRING 103
|
||||
#define NWLG_SD_PARSED_CMD_TYPE 104
|
||||
#define NWLG_SD_CL_SERVER_VERSION 105
|
||||
#define NWLG_SD_CL_SERVER_TYPE 106
|
||||
#define NWLG_SD_CL_TREE 107
|
||||
|
||||
/*
|
||||
END OF NWLogin Shared Data identifier tags
|
||||
*/
|
||||
|
||||
/*
|
||||
Error codes
|
||||
*/
|
||||
|
||||
#define NWLG_ERR_VERSION 0xff
|
||||
|
||||
/*
|
||||
Return codes for handlers
|
||||
*/
|
||||
#define NWLG_OK 0
|
||||
#define NWLG_RETRY 1
|
||||
#define NWLG_ABORT 2
|
||||
#define NWLG_FAIL 3
|
||||
#define NWLG_IGNORE 4
|
||||
#define NWLG_STOP_CYCLE 5
|
||||
#define NWLG_CANCEL 6
|
||||
#define NWLG_SHUT_DOWN 7
|
||||
#define NWLG_SHUT_DOWN_RESTART 8
|
||||
|
||||
/*
|
||||
END OF Return codes for handlers
|
||||
*/
|
||||
|
||||
#define NWLG_ON N_TRUE
|
||||
#define NWLG_OFF N_FALSE
|
||||
|
||||
/*
|
||||
Command Line Flag masks (NWLG_SD_CMD_LINE_FLAGS)
|
||||
*/
|
||||
|
||||
#define NWLG_CL_FLAG_CLS 0x00000001 /* Clear screen before login */
|
||||
#define NWLG_CL_FLAG_NS 0x00000002 /* Attach to a server and do not run script */
|
||||
#define NWLG_CL_FLAG_ATTACH 0x00000002
|
||||
#define NWLG_CL_FLAG_BIND 0x00000004 /* Force bindery mode login */
|
||||
#define NWLG_CL_FLAG_TREE 0x00000008 /* name specified on cmd line is a tree name */
|
||||
|
||||
#define NWLG_CL_FLAG_NB 0x00000010 /* Do not show login banner */
|
||||
#define NWLG_CL_FLAG_SWAP 0x00000020 /* (DOS) Swap to mem or disk for external cmds */
|
||||
#define NWLG_CL_FLAG_NOSWAP 0x00000040 /* (DOS) Do not swap to mem or disk for external cmds */
|
||||
#define NWLG_CL_FLAG_SCRIPT 0x00000080 /* Script file name specified on command line */
|
||||
|
||||
#define NWLG_CL_FLAG_RDF 0x00000100 /* (WIN) Restore permanent connections when done */
|
||||
#define NWLG_CL_FLAG_EXTFORK 0x00000200 /* external command is another process */
|
||||
#define NWLG_CL_FLAG_NO_DISPLAY 0x00000400 /* Do not display script results */
|
||||
#define NWLG_CL_FLAG_NA 0x00000800 /* /NA only, do not login just run scripts
|
||||
/NA and /AT(/NS) login and do not run scripts */
|
||||
|
||||
#define NWLG_CL_FLAG_NO_CLOSE 0x00001000 /* /NC Do not close script results */
|
||||
#define NWLG_CL_FLAG_ADVANCED 0x00002000 /* /A Advanced level login UI */
|
||||
#define NWLG_CL_FLAG_CONTINUE 0x00004000 /* /CONT accept command line and pass to API without stopping for initial UI */
|
||||
#define NWLG_CL_FLAG_SIMPLE 0x00008000 /* /SI Simple UI */
|
||||
|
||||
#define NWLG_CL_FLAG_MAP_ROOT_OFF 0x00010000 /* do not force map root on NT or other platform that can handle relative mapping */
|
||||
#define NWLG_CL_FLAG_START_UI 0x00020000 /* Internal flag to that start_UI in progress */
|
||||
#define NWLG_CL_FLAG_RUN_SCRIPT 0x20000000 /* Internal flag to run scripts */
|
||||
#define NWLG_CL_FLAG_CLEAR_CONN 0x40000000 /* Internal flag to clear connection (logout) before login */
|
||||
#define NWLG_CL_FLAG_DEBUG 0x80000000 /* API in debug mode */
|
||||
|
||||
/* Map flags */
|
||||
#define NWLG_MAP_FLAG_INSERT 0x00000001
|
||||
#define NWLG_MAP_FLAG_ROOT 0x00000002
|
||||
#define NWLG_MAP_FLAG_PHYSICAL 0x00000004
|
||||
|
||||
/*
|
||||
Get Service connection type flags
|
||||
*/
|
||||
#define NWLG_CONN_GET_DEFAULT 0
|
||||
#define NWLG_CONN_GET_SERVER 1
|
||||
#define NWLG_CONN_GET_TREE 2
|
||||
|
||||
/*
|
||||
Known Service types
|
||||
*/
|
||||
#define NWLG_TYPE_DS 0
|
||||
#define NWLG_TYPE_BINDERY 1
|
||||
#define NWLG_TYPE_HOST_OS 9
|
||||
|
||||
/*
|
||||
Message type and login process definitions.
|
||||
Allows room for future expansion and definitions
|
||||
Defines are used mainly for defining what type of messages are
|
||||
sent to IO routines.
|
||||
The first defines show what part of the login process we are in.
|
||||
The NWLG_MSGTYP_... are || with _PROC_ to indicate specific message type within
|
||||
process. Currently, the only one that is looked at is _MSGTYP_ERROR in
|
||||
IO event NWLG_IO_DATA_BLOCK
|
||||
*/
|
||||
#define NWLG_PROC 0x00ff
|
||||
#define NWLG_PROC_INIT 0x0000
|
||||
#define NWLG_PROC_LOGIN 0x0010
|
||||
#define NWLG_PROC_SCRIPT 0x0020
|
||||
#define NWLG_PROC_TERM 0x0040
|
||||
|
||||
#define NWLG_MSGTYP 0xff00
|
||||
#define NWLG_MSGTYP_INFO 0x0100
|
||||
#define NWLG_MSGTYP_ERROR 0x0200
|
||||
#define NWLG_MSGTYP_SCRIPT 0x0400
|
||||
|
||||
/************************ Handler definitions ********************/
|
||||
|
||||
/*
|
||||
I/O handler events
|
||||
*/
|
||||
#define NWLG_IO_MSG_PAUSE 0
|
||||
#define NWLG_IO_IDENTITY 1
|
||||
#define NWLG_IO_YES_NO 2
|
||||
#define NWLG_IO_EXP_PWD 22
|
||||
#define NWLG_IO_DATA_BLOCK 3
|
||||
#define NWLG_IO_BANNER 4
|
||||
#define NWLG_IO_FILE 5
|
||||
#define NWLG_IO_ERROR 6
|
||||
#define NWLG_IO_CLS 7
|
||||
#define NWLG_IO_SOUNDS 8
|
||||
#define NWLG_IO_CHANGE_PWD 9
|
||||
#define NWLG_IO_PWD_CHG 1
|
||||
#define NWLG_IO_PWD_SYNC 0
|
||||
#define NWLG_IO_CONFIRM_REATTACH 10
|
||||
#define NWLG_IO_DOS_SWAP_PATH 11
|
||||
#define NWLG_IO_START_UI 12
|
||||
#define NWLG_IO_FINISH_UI 13
|
||||
#define NWLG_IO_START_LOG 14
|
||||
#define NWLG_IO_FINISH_LOG 15
|
||||
#define NWLG_IO_WAIT 16
|
||||
#define NWLG_IO_WAIT_ON 1
|
||||
#define NWLG_IO_WAIT_OFF 0
|
||||
|
||||
|
||||
#define NWLG_IO_BRING_TO_FRONT 99
|
||||
|
||||
/* IO routine optional extensions */
|
||||
#define NWLG_IO_GET_DATA_LINE 900
|
||||
#define NWLG_IO_GET_DATA_BUF 901
|
||||
|
||||
#if defined (N_PLAT_MSW)
|
||||
/*
|
||||
Special values for the progress to NWMLGUIUpdate().
|
||||
A positive integer indicates the line count of a disconnected script
|
||||
*/
|
||||
#define NWLG_UIU_LOGIN_BEGIN (-1) // Connected/Disconnected: output dialog opens
|
||||
#define NWLG_UIU_LOGIN_PROPER_UPDATE (-2) // Connected: regular update from login proper (called many times)
|
||||
#define NWLG_UIU_SCRIPTS_BEGIN (-3) // Connected/Disconnected: signal that login proper is complete and scripts are about to run
|
||||
#define NWLG_UIU_END_OF_SCRIPT (-4) // Connected: signal that a script has closed
|
||||
#define NWLG_UIU_ALL_PROCESSING_COMPLETE (-5) // Connected/Disconnected: all login and script processing done
|
||||
#define NWLG_UIU_DISC_SCRIPT_LINE (-6) // Disconnected: signal that a new line is about to execute
|
||||
#define NWLG_UIU_ABORTED_INCOMPLETE (-7) // Connected/Disconnected: user aborted from debug dialog with script exec incomplete
|
||||
#endif
|
||||
|
||||
/*
|
||||
Event manager return codes
|
||||
*/
|
||||
|
||||
#define NWLG_EVT_OK NWLG_OK
|
||||
#define NWLG_EVT_RETRY NWLG_RETRY
|
||||
#define NWLG_EVT_ABORT NWLG_ABORT
|
||||
#define NWLG_EVT_FAIL NWLG_FAIL
|
||||
#define NWLG_EVT_IGNORE NWLG_IGNORE
|
||||
#define NWLG_EVT_STOP_CYCLE NWLG_STOP_CYCLE
|
||||
/*
|
||||
Event delivery types
|
||||
*/
|
||||
|
||||
#define NWLG_EVT_SYSTEM 0
|
||||
#define NWLG_EVT_PRIVATE 1
|
||||
#define NWLG_EVT_BROADCAST 2
|
||||
#define NWLG_EVT_UNTIL_OK 3
|
||||
#define NWLG_EVT_UNTIL_FAIL 4
|
||||
|
||||
/*
|
||||
-> NT ONLY
|
||||
Defines for restartMode in startinfo structure.
|
||||
Normal processing is NONE. Initial login on Wnt require that we authenticate
|
||||
then roll out to login to the workstation. Login is then restarted after
|
||||
the authenticate.
|
||||
GINA flag indicates that GINA does initial login (password expiration handled
|
||||
differently)
|
||||
*/
|
||||
#define NWLG_RESTART_NONE 0x0000
|
||||
/* only set during initial pass of NT login */
|
||||
#define NWLG_RESTART_AUTH_ONLY 0x0001
|
||||
#define NWLG_RESTART_SCRIPT 0x0002
|
||||
/* only set if netware authentication is performed in another module */
|
||||
#define NWLG_RESTART_ALT_AUTH 0x0004
|
||||
#define NWLG_RESTART_CITRIX_AUTH 0x0080
|
||||
#define NWLG_RESTART_NETWARE_LOGIN 0x0100
|
||||
#define NWLG_RESTART_PRIMARY_LOGIN 0x4000
|
||||
#define NWLG_RESTART_GINA_AUTH 0x8000
|
||||
|
||||
/*
|
||||
Flag set/clear/test macros
|
||||
*/
|
||||
|
||||
#define NWLGSetFlag( flag, var ) ((var) = (flag) | (var))
|
||||
#define NWLGSetFlagP( flag, pvar ) ((*pvar) = (flag) | (*pvar))
|
||||
|
||||
#define NWLGClearFlag( flag, var ) ((var) = (~(flag)) & (var))
|
||||
#define NWLGClearFlagP( flag, pvar ) ((*pvar) = (~(flag)) & (*pvar))
|
||||
|
||||
#define NWLGTestFlag( flag, var ) (((var) & (flag)) ? N_TRUE : N_FALSE)
|
||||
#define NWLGTestFlagP( flag, pvar ) (((*pvar) & (flag)) ? N_TRUE : N_FALSE)
|
||||
|
||||
/***
|
||||
Version information
|
||||
***/
|
||||
#define NWLG_MAJOR_VER 1
|
||||
#define NWLG_MINOR_VER 0
|
||||
#define NWLG_REV_VER 7
|
||||
|
||||
#define NWLGSetVersionP( pVersion ) pVersion->major = NWLG_MAJOR_VER;\
|
||||
pVersion->minor=NWLG_MINOR_VER;pVersion->revision = NWLG_REV_VER;
|
||||
#define NWLGSetVersion( version ) version.major = NWLG_MAJOR_VER;\
|
||||
version.minor=NWLG_MINOR_VER;version.revision = NWLG_REV_VER;
|
||||
|
||||
#define NWLGVersionLong( version ) (unsigned long) (version.major * 1000000L \
|
||||
+ version.minor * 1000 \
|
||||
+ version.revision)
|
||||
#define NWLGVersionLongP( pVersion ) (unsigned long) (pVersion->major * 1000000L \
|
||||
+ pVersion->minor * 1000 \
|
||||
+ pVersion->revision)
|
||||
#define NWLGVersionLongV( major, minor, revision ) (unsigned long) (major * 1000000L \
|
||||
+ minor * 1000 + revision)
|
||||
#define NWLG_CURRENT_VERSION NWLGUIVersionLongV( NWLG_MAJOR_VER, NWLG_MINOR_VER, NWLG_REV_VER )
|
||||
|
||||
typedef struct tagNWLGAccessRec N_FAR * pNWLGAccessRec;
|
||||
|
||||
N_TYPEDEF_CALLBACK( NWCCODE, pEVTSend )
|
||||
(
|
||||
nint deliveryType,
|
||||
pNWLGAccessRec pAccess,
|
||||
nint event,
|
||||
nint eventType,
|
||||
nint eventSubType,
|
||||
nparam param1,
|
||||
nparam param2,
|
||||
nflag32 flags
|
||||
);
|
||||
|
||||
N_TYPEDEF_CALLBACK( NWCCODE, pEvtHndlr )
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
nint event,
|
||||
nint eventType,
|
||||
nint eventSubType,
|
||||
nparam param1,
|
||||
nparam param2,
|
||||
nflag32 flag
|
||||
);
|
||||
|
||||
N_TYPEDEF_CALLBACK( NWCCODE, pIOHndlr )
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
nint ioEvent,
|
||||
nparam param1,
|
||||
nparam param2,
|
||||
nflag32 flags
|
||||
);
|
||||
|
||||
|
||||
#if defined(__BORLANDC__) // Don't pack the structs.
|
||||
# pragma option -a
|
||||
#elif defined(N_ARCH_16)
|
||||
# pragma pack(2)
|
||||
#else
|
||||
# pragma pack(4)
|
||||
#endif
|
||||
|
||||
typedef struct tagNWLGAccessRec
|
||||
{
|
||||
nid id; /* event handlers' unique id assigned by NWLogin */
|
||||
NWCCODE status; /* NWLG_OK, ... */
|
||||
NWRCODE errCode; /* Additional error code information */
|
||||
pEvtHndlr pEventHandler; /* callback to extension Event Handler */
|
||||
pEvtHndlr pExceptionHandler; /* callback to extension Exception Handler */
|
||||
pIOHndlr pIOHandler; /* callback to extension IO Event Handler */
|
||||
nptr pUserData; /* optional extension defined data pointer */
|
||||
} NWLGAccessRec;
|
||||
|
||||
typedef struct tagNWVersion
|
||||
{
|
||||
nuint16 major;
|
||||
nuint8 minor;
|
||||
nuint8 revision;
|
||||
} NWVersion;
|
||||
|
||||
typedef NWVersion N_FAR * pNWVersion;
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* Start up information structures */
|
||||
/***************************************************************************/
|
||||
|
||||
/* Elemnts for a generic linked list where id contains the type of data */
|
||||
typedef struct tagNWLGStartInfoData
|
||||
{
|
||||
nuint32 id;
|
||||
struct tagNWLGStartInfoData *next;
|
||||
nptr data;
|
||||
} NWLGStartInfoData;
|
||||
|
||||
typedef NWLGStartInfoData N_FAR * pNWLGStartInfoData;
|
||||
|
||||
/* Elements for a linked list of strings. */
|
||||
typedef struct tagNWLGStringElement
|
||||
{
|
||||
pnstr text;
|
||||
struct tagNWLGStringElement *next;
|
||||
} NWLGStringElement;
|
||||
|
||||
typedef NWLGStringElement N_FAR * pNWLGStringElement;
|
||||
|
||||
/* linked list of command line args */
|
||||
typedef struct tagNWLGStartInfoCmdArgs
|
||||
{
|
||||
pnstr arg;
|
||||
struct tagNWLGStartInfoCmdArgs *next;
|
||||
nint argLen;
|
||||
} NWLGStartInfoCmdArgs;
|
||||
|
||||
typedef NWLGStartInfoCmdArgs N_FAR * pNWLGStartInfoCmdArgs;
|
||||
#define NWLG_CMDLINE_ARG_LEN 65
|
||||
|
||||
#define NWLG_STARTINFO_NONE 0
|
||||
#define NWLG_STARTINFO_USE 1
|
||||
#define NWLG_STARTINFO_CMDLINE 2
|
||||
|
||||
typedef struct tagNWLGStartInfo
|
||||
{
|
||||
NWVersion APIVersion;
|
||||
pNWLGStartInfoData dataList;// linked list pointer or NULL
|
||||
pEVTSend pNWLGEVTSend;
|
||||
nint useStartInfo; // TRUE= info in structure, FALSE= info in cmdline
|
||||
nint serverLen;
|
||||
pnstr server; // server to log into
|
||||
nint treeLen;
|
||||
pnstr tree; // tree name if logging into tree instead of specific server
|
||||
nint userLen;
|
||||
pnstr user; // real login user name (normally no context)
|
||||
nint scriptUserLen;
|
||||
pnstr scriptUser; // user name to use when executing scripts
|
||||
nint passwordLen;
|
||||
pnstr password;
|
||||
nint profileLen;
|
||||
pnstr profile; // profile file/object name
|
||||
nint scriptFileLen;
|
||||
pnstr scriptFile; // override script file/object name
|
||||
nint contextLen;
|
||||
pnstr context; // full text context without leading '.'
|
||||
nint bannerInfoLen;
|
||||
pnstr bannerInfo; // name of banner file (NI)
|
||||
nint swapPathLen;
|
||||
pnstr swapPath; // DOS only
|
||||
pNWLGStartInfoCmdArgs cmdLine;// linked list of command line args (%2 %3 %4...%MAX_SCRIPT_ARGS+2)
|
||||
nbool noBanner;
|
||||
nbool bindery; // force bindery conns
|
||||
nbool clearConns; // combination of /NS
|
||||
nbool clearScreen; // cmd line versions
|
||||
nbool singleTree; // TRUE = do not allow multi-tree login
|
||||
nbool restorePerm; // W31 restore permanent connections
|
||||
nbool runScripts; // and /NA
|
||||
nint noSwap; // DOS - swap flag
|
||||
nint internalFlags; // 9-21-98 KPW Reserved
|
||||
nptr pData; /** Start Version 1.0.1 **/
|
||||
nint restartMode; /* NT - 0=Full Login, 1=Authenticate only, 2=Restart at Script NWLG_RESTART_... */
|
||||
nbool disableLoginExt; /* TRUE do not allow extensions */
|
||||
HWND hwndParent; /* HWND to treat as this DLL's main window */
|
||||
nuint32 NWMLGFlags; /* Mobile flags */
|
||||
nuint32 callingModule; //
|
||||
pnstr providerName; // Shell Login Extension DLL name (NOVELLNP, EDCMOBILE...)
|
||||
pEvtHndlr providerCallBack; // used to call back W95 provider (not implemented)
|
||||
pEvtHndlr pReserved1; // future FN pointers
|
||||
pEvtHndlr pReserved2; // future FN pointers
|
||||
pEvtHndlr pReserved3; // future FN pointers
|
||||
// 04-02-98 Make available for all 32bit platforms - start
|
||||
// #if defined (N_ARCH_32) IKM- Removed ifdef 08-23-99 as per Ransom's suggestion to make this available to ALL platforms
|
||||
NWCONN_HANDLE expiredConnID;
|
||||
nstr expiredPassword[MAX_DN_BYTES]; /* password that expired */
|
||||
nstr expiredServiceName[NW_MAX_SERVER_NAME_BYTES]; /* server or tree name or workstation description (WindowsNT...) */
|
||||
nint expiredServiceType; /* NDS or BINDERY */
|
||||
nbool expiredDSbinderyServer; /* ds server attached bindery mode SPD 47924 */
|
||||
nbool expiredPrimaryLogin; /* is this from the initial or primary login */
|
||||
nbool expiredWkstaPassword;
|
||||
nstr expiredWkstaNewPassword[MAX_DN_BYTES];
|
||||
// #endif IKM- Removed ifdef 08-23-99 as per Ransom's suggestion to make this available to ALL platforms
|
||||
// 04-02-98 Make available for all 32bit platforms - end
|
||||
} NWLGStartInfo;
|
||||
|
||||
typedef NWLGStartInfo N_FAR * pNWLGStartInfo;
|
||||
|
||||
/* IDs for items found in linked list 'dataList' */
|
||||
#define NWLGID_COMMAND_LINE 0x00000000L /* Command-line string */
|
||||
#define NWLGID_SI 0x00000001L /* NWLGStartInfo */
|
||||
#define NWLGID_SI_ORIG 0x00000002L /* Original NWLGStartInfo */
|
||||
#define NWLGID_UI 0x00000011L /* NWLGUIStartInfo */
|
||||
#define NWLGID_UI_ORIG 0x00000012L /* Original NWLGUIStartInfo */
|
||||
#define NWLGID_SSO 0x00000040L /* NWLGSSOInfo */
|
||||
|
||||
/* End of StartInfo */
|
||||
/***************************************************************************/
|
||||
|
||||
typedef struct tagNWLGMapRec
|
||||
{
|
||||
nchar driveLetter; /* NULL char for next drive i.e. c = (char)0 */
|
||||
nuint searchOrder; /* 0 for not a search drive */
|
||||
pnstr path; /* call NWParsePath to get it parsed */
|
||||
} NWLGMapRec;
|
||||
|
||||
|
||||
typedef NWLGMapRec N_FAR * pNWLGMapRec;
|
||||
|
||||
|
||||
/************************ NWLOGIN structures ********************/
|
||||
|
||||
typedef struct tagNWLGUserIDStruct
|
||||
{
|
||||
NWDSContextHandle context;
|
||||
pnstr server;
|
||||
pnstr user;
|
||||
pnstr password;
|
||||
nbool changeServer; /* allow server/tree to change */
|
||||
nbool DSLogin; /* NDS or bindery login */
|
||||
NWCONN_HANDLE connID;
|
||||
nptr data;
|
||||
nflag32 flags;
|
||||
pnstr tree;
|
||||
pnstr szContext;
|
||||
nbool treeLogin; /* tree or server login */
|
||||
} NWLGUserID;
|
||||
|
||||
typedef NWLGUserID N_FAR * pNWLGUserID;
|
||||
|
||||
typedef struct tagNWLGSrvcConnStruct
|
||||
{
|
||||
pnstr server; /* connect(ed) to server name */
|
||||
pnstr tree; /* connect(ed) to tree name */
|
||||
nint serviceType; /* server, tree or default */
|
||||
pnint connType;
|
||||
NWCONN_HANDLE N_FAR *connID;
|
||||
} NWLGSrvcConn;
|
||||
|
||||
typedef NWLGSrvcConn N_FAR * pNWLGSrvcConn;
|
||||
|
||||
typedef struct tagNWLGScriptInfoStruct
|
||||
{
|
||||
nint idx;
|
||||
nint scriptNameLen;
|
||||
pnstr scriptName;
|
||||
nint len;
|
||||
pnstr line;
|
||||
nint scriptLineNum;
|
||||
nbool crt;
|
||||
struct CLoginScript* OloginScript; // ref to C++ CLoginScript instance
|
||||
} NWLGScriptInfo;
|
||||
|
||||
typedef NWLGScriptInfo N_FAR * pNWLGScriptInfo;
|
||||
|
||||
#if defined(__BORLANDC__) // Restore to compiler specified.
|
||||
# pragma option -a.
|
||||
#else
|
||||
# pragma pack()
|
||||
#endif
|
||||
|
||||
|
||||
/************************ NWLOGIN API's ********************/
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLoginInit
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
pNWVersion pCompiledVersion,
|
||||
pNWVersion pRuntimeVersion
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLogin
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
pnstr cmdLine,
|
||||
pnstr password,
|
||||
pNWLGStartInfo infoStruct
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLoginTerm
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
nflag32 reserved
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( void )
|
||||
NWLoginVersion
|
||||
(
|
||||
pNWVersion pRuntimeVersion
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( nbool )
|
||||
NWLGBringLoginToFront
|
||||
(
|
||||
void
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGDefaultEvtHandler
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
nint event,
|
||||
nint eventType,
|
||||
nint eventSubType,
|
||||
nparam param1,
|
||||
nparam param2,
|
||||
nflag32 flags
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGDefaultExcptHandler
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
nint event,
|
||||
nint eventType,
|
||||
nint eventSubType,
|
||||
nparam param1,
|
||||
nparam param2,
|
||||
nflag32 flags
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGDefaultIOHandler
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
nint ioEvent,
|
||||
nparam param1,
|
||||
nparam param2,
|
||||
nflag32 flags
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGGetLoginData
|
||||
(
|
||||
nint identifier, /* NWLG_SD_... value*/
|
||||
nint itemIndex, /* 0 or 0.. for multi valued */
|
||||
nptr retvalue,
|
||||
nint len
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGSetLoginData
|
||||
(
|
||||
nint identifier,
|
||||
nint itemIndex,
|
||||
nptr value
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGOpenScriptFD
|
||||
(
|
||||
nint fd,
|
||||
nbool crt,
|
||||
pnint ccode
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( void )
|
||||
NWLGSetCtrlBreak
|
||||
(
|
||||
void
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGEVTSend
|
||||
(
|
||||
nint deliveryType,
|
||||
pNWLGAccessRec pAccess,
|
||||
nint event,
|
||||
nint eventType,
|
||||
nint eventSubType,
|
||||
nparam param1,
|
||||
nparam param2,
|
||||
nflag32 flags
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLGIOEVTSend
|
||||
(
|
||||
pNWLGAccessRec pAccess,
|
||||
nint ioEvent,
|
||||
nparam param1,
|
||||
nparam param2,
|
||||
nflag32 flags
|
||||
);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
37
LoginCapture/windows/external/xplatapi/include/npackoff.h
vendored
Normal file
37
LoginCapture/windows/external/xplatapi/include/npackoff.h
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/* this header sets packing back to default for different compilers */
|
||||
|
||||
#if defined (__BORLANDC__)
|
||||
# if (__BORLANDC__ >= 0x500)
|
||||
# pragma pack(pop)
|
||||
# else
|
||||
# pragma option -a.
|
||||
# endif
|
||||
#elif defined (__WATCOMC__)
|
||||
# if (__WATCOMC__ >= 1050)
|
||||
# pragma pack(pop)
|
||||
# else
|
||||
# pragma pack()
|
||||
# endif
|
||||
#elif defined (__MWERKS__)
|
||||
# if (__MWERKS__ >= 0x2100)
|
||||
# pragma pack(pop)
|
||||
# else
|
||||
# pragma pack()
|
||||
# endif
|
||||
#elif defined(__ECC__) || defined(__ECPP__)
|
||||
# pragma pack(pop)
|
||||
#elif defined (_MSC_VER)
|
||||
# if (_MSC_VER >= 900)
|
||||
# pragma pack(pop)
|
||||
# else
|
||||
# pragma pack()
|
||||
# endif
|
||||
#else
|
||||
# pragma pack()
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef N_PACK_1
|
||||
#undef N_PACK_1
|
||||
#endif
|
||||
|
55
LoginCapture/windows/external/xplatapi/include/npackon.h
vendored
Normal file
55
LoginCapture/windows/external/xplatapi/include/npackon.h
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
/* this header sets packing to 1 for different compilers */
|
||||
|
||||
#if defined (_MSC_VER) && !defined(__BORLANDC__)
|
||||
# if (_MSC_VER > 600)
|
||||
# pragma warning(disable:4103)
|
||||
# endif
|
||||
#elif defined (__BORLANDC__)
|
||||
# if (__BORLANDC__ >= 0x500)
|
||||
# pragma warn -pck
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (__BORLANDC__)
|
||||
# if (__BORLANDC__ >= 0x500)
|
||||
# pragma pack(push)
|
||||
# endif
|
||||
#elif defined (__WATCOMC__)
|
||||
# if (__WATCOMC__ >= 1050)
|
||||
# pragma pack(push)
|
||||
# endif
|
||||
#elif defined (__MWERKS__)
|
||||
# if (__MWERKS__ >= 0x2100)
|
||||
# pragma pack(push)
|
||||
# endif
|
||||
#elif defined(__ECC__) || defined(__ECPP__)
|
||||
# pragma pack(push)
|
||||
#elif defined (_MSC_VER)
|
||||
# if (_MSC_VER >= 900)
|
||||
# pragma pack(push)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(N_PLAT_DOS)\
|
||||
|| (defined(N_PLAT_MSW) && defined(N_ARCH_16) && !defined(N_PLAT_WNT))\
|
||||
|| defined(N_PLAT_NLM)\
|
||||
|| defined(N_PLAT_OS2)\
|
||||
|| defined(N_PLAT_UNIX)\
|
||||
|| defined(N_PACK_1)\
|
||||
|| defined(N_FORCE_INT_16)
|
||||
|
||||
# if defined(__BORLANDC__)
|
||||
# if (__BORLANDC__ < 0x500)
|
||||
# pragma option -a-
|
||||
# else
|
||||
# pragma pack(1)
|
||||
# endif
|
||||
# else
|
||||
# pragma pack(1)
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
# pragma pack(4)
|
||||
|
||||
#endif
|
1454
LoginCapture/windows/external/xplatapi/include/ntypes.h
vendored
Normal file
1454
LoginCapture/windows/external/xplatapi/include/ntypes.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
215
LoginCapture/windows/external/xplatapi/include/ntypes.txt
vendored
Normal file
215
LoginCapture/windows/external/xplatapi/include/ntypes.txt
vendored
Normal file
@ -0,0 +1,215 @@
|
||||
Brief documentation for NTYPES.H v1.08
|
||||
|
||||
NTYPES.H is broken up into five sections. The first defines automatic
|
||||
compiler/platform settings. The second section defines items according
|
||||
to the platform. The third section defines non-platform specific defines.
|
||||
The fourth section defines new types. The fifth section defines macros.
|
||||
|
||||
This file is guaranteed NOT to include any other files. It should be
|
||||
placed before any Novell include files, but after any standard C or
|
||||
platform specific files, such as "windows.h".
|
||||
|
||||
Certain sections may be excluded by defining N_INC_NO... macros. These
|
||||
are currently defined as:
|
||||
|
||||
N_INC_NO_AUTO Don't automatically define platforms defines.
|
||||
N_INC_NO_OLD_CONSTANTS Don't define historical constants.
|
||||
N_INC_NO_OLD_MACROS Don't define historical macros.
|
||||
|
||||
Section 4c is has been removed from v1.06 of NTYPES.H
|
||||
|
||||
N_INC_NO_GUI Is no longer checked
|
||||
N_INC_GUI Is no longer checked
|
||||
|
||||
For compatibility purposes a platform may be defined in multiple ways.
|
||||
Some of these methods are defacto standards for their appropriate
|
||||
platforms. Note that AppWare considers the N_PLAT_xxxx method to be the
|
||||
default.
|
||||
|
||||
(Some of the following are trademarks of their respective companies)
|
||||
|
||||
Microsoft Windows Family - N_PLAT_MSW
|
||||
**************************
|
||||
If N_PLAT_MSW is defined, at least one of the below should be defined;
|
||||
if none is defined, N_PLAT_MSW3 will be forced on.
|
||||
If any of the following are defined, N_PLAT_MSW will be forced on.
|
||||
If N_PLAT_WNT? is defined, N_PLAT_WNT will be forced on.
|
||||
Microsoft Windows 3.x - N_PLAT_MSW3
|
||||
Microsoft Windows 4.x - N_PLAT_MSW4
|
||||
Microsoft Windows NT 3.x - N_PLAT_WNT3
|
||||
Microsoft Windows NT 4.x - N_PLAT_WNT4
|
||||
**************************
|
||||
IBM OS/2 - N_PLAT_OS2
|
||||
DOS - N_PLAT_DOS, NWDOS
|
||||
Novell NetWare NLM - N_PLAT_NLM
|
||||
Macintosh - N_PLAT_MAC
|
||||
Unix - N_PLAT_UNIX
|
||||
|
||||
One of the following architectures will always be defined:
|
||||
|
||||
N_ARCH_16 - 16 bit word size
|
||||
N_ARCH_32 - 32 bit word size
|
||||
N_ARCH_64 - 64 bit word size
|
||||
|
||||
If there is a need to force the natural integer to a specific size
|
||||
use one of the following definitions (like for thunk layers).
|
||||
|
||||
N_FORCE_INT_16 - Force nint and nuint to be 16 bit word size
|
||||
N_FORCE_INT_32 - Force nint and nuint to be 32 bit word size
|
||||
|
||||
Typical combinations are as follows. The preferred defines are the first
|
||||
one in each of the following lines:
|
||||
|
||||
Microsoft Windows (16 bit) - N_PLAT_MSW and N_ARCH_16, NWWIN
|
||||
Microsoft Windows (32 bit) - N_PLAT_MSW and N_ARCH_32, WIN32
|
||||
Microsoft Windows 3.x - N_PLAT_MSW3
|
||||
Microsoft Windows 4.x - N_PLAT_MSW4
|
||||
Microsoft Windows NT - N_PLAT_WNT
|
||||
Microsoft Windows NT 3.x - N_PLAT_WNT3
|
||||
Microsoft Windows NT 4.x - N_PLAT_WNT4
|
||||
IBM OS/2 (16 bit) - N_PLAT_OS2 and N_ARCH_16, NWOS2
|
||||
IBM OS/2 (32 bit) - N_PLAT_OS2 and N_ARCH_32
|
||||
DOS - N_PLAT_DOS, NWDOS
|
||||
Novell NetWare NLM - N_PLAT_NETWARE and N_PLAT_NETWARE
|
||||
Novell NISO NLM - N_PLAT_NIOS and N_PLAT_NIOS
|
||||
Macintosh - N_PLAT_MAC
|
||||
Unix - N_PLAT_UNIX and N_ARCH_32 or N_ARCH_64
|
||||
|
||||
Implied definitions (ntypes.h will create the implied definitions if no
|
||||
additional defines are provided). Variances (ex: N_PLAT_WNT && N_ARCH_16)
|
||||
must be defined explicity:
|
||||
|
||||
Defined Implied
|
||||
|
||||
NWDOS N_PLAT_DOS, N_ARCH_16
|
||||
N_PLAT_DOS NWDOS, N_ARCH_16
|
||||
NWOS2 N_PLAT_OS2, N_ARCH_16
|
||||
N_PLAT_OS2 N_ARCH_32
|
||||
N_PLAT_OS2, N_ARCH_16 NWOS2
|
||||
NWWIN N_PLAT_MSW, N_ARCH_16
|
||||
N_PLAT_MSW N_PLAT_MSW3, N_ARCH_16
|
||||
N_PLAT_MSW, N_ARCH_16 NWWIN, N_PLAT_MSW3
|
||||
N_PLAT_MSW3 N_PLAT_MSW, N_ARCH_16
|
||||
N_PLAT_MSW4 N_PLAT_MSW, N_ARCH_32
|
||||
N_PLAT_WNT N_PLAT_MSW, N_PLAT_WNT3, N_ARCH_32
|
||||
N_PLAT_WNT, N_ARCH_16 NWWIN, N_PLAT_MSW, N_PLAT_WNT3
|
||||
N_PLAT_WNT3 N_PLAT_MSW, N_PLAT_WNT, N_ARCH_32
|
||||
N_PLAT_WNT4 N_PLAT_MSW, N_PLAT_WNT, N_ARCH_32
|
||||
N_PLAT_NLM N_PLAT_NETWARE, N_IAPX386 N_ARCH_32
|
||||
N_PLAT_NETWARE N_PLAT_NLM, N_IAPX386 N_ARCH_32
|
||||
N_PLAT_NIOS N_PLAT_NLM, N_IAPX386 N_ARCH_32
|
||||
N_PLAT_MAC N_ARCH_32
|
||||
N_PLAT_UNIX N_ARCH_32
|
||||
|
||||
Note that the following constants are assumed to be defined for the
|
||||
given circumstances:
|
||||
|
||||
_INC_WINDOWS - Microsoft's WINDOWS.H file has been included.
|
||||
RC_INVOKED - Microsoft's RC resource compiler is currently
|
||||
processing the file.
|
||||
|
||||
|
||||
Revision history:
|
||||
v1.08
|
||||
- Removed inadvertent define of N_EXPORTS for N_PLAT_MSW/N_ARCH_32
|
||||
|
||||
v1.07
|
||||
- Added auto defines for N_PLAT_NLM:
|
||||
N_PLAT_NLM machine defaults to N_IAPX386 (vs N_PPC).
|
||||
N_PLAT_NLM OS defaults to N_PLAT_NETWARE (vs N_PLAT_NIOS).
|
||||
N_PLAT_NETWARE causes N_PLAT_NLM to be defined.
|
||||
N_PLAT_NIOS causes N_PLAT_NLM to be defined.
|
||||
|
||||
v1.06
|
||||
- Removed GUI defines.
|
||||
- Fixed bug in NGet16/32 and NRead16/32 macros that caused them to swap on
|
||||
N_INT_ENDIAN_HI_LO machines.
|
||||
- Cleaned up/reduced macros that were effectively just duplicates of other
|
||||
macros with the only difference being how parameters were passed.
|
||||
- Cleaned up alignment of macro defines to make them easier to read.
|
||||
- Added HiLo/LoHi Get, Set, Read, and Write macros
|
||||
|
||||
v1.05
|
||||
- Added special pascal type for OS2 under Borland compile.
|
||||
- Added Enhanced "endianness" checks for N_PLAT_NLM
|
||||
- Changed N_API et.al. under N_PLAT_NLM to use compiler "default" and changed
|
||||
N_PASCAL and N_CDECL to be properly defined. This allows forced function
|
||||
types when needed.
|
||||
- Changed TRUE/FALSE in section 5 to be defined directly, not in terms of
|
||||
N_TRUE and N_FALSE.
|
||||
- Changed default to NOT include GUI defines. N_INC_GUI must be defined to
|
||||
include these now. This section will be removed in v1.06 of NTYPES.H.
|
||||
- Broke off large comment at beginning of file into NTYPES.TXT.
|
||||
- Added pointers to pointers typedefs.
|
||||
- Added sized boolean types.
|
||||
Changes to NPACKON.H:
|
||||
- Added support for Windows 95 platform
|
||||
|
||||
v1.04
|
||||
-Added N_..._CALLBACK and N_TYPEDEFs for N_PLAT_NLM
|
||||
-Corrected bug in NCopyFrom... macros (they were reversed in functionality)
|
||||
-Added support for reading from or writing to unaligned values (NRead... and
|
||||
NWrite...)
|
||||
-Changed:
|
||||
#if !defined(N_ARCH_64) && \
|
||||
!defined(N_ARCH_32) && \
|
||||
!defined(N_ARCH_16)
|
||||
to:
|
||||
#if !defined(N_ARCH_64) && !defined(N_ARCH_32) && !defined(N_ARCH_16)
|
||||
to work around a bug in MPW's CFront preprocessor.
|
||||
-Changed METROWERKS_C define check to check for __MWERKS__ instead.
|
||||
METROWERKS_C is obsolete.
|
||||
-Changed N_GLOBAL_LIBRARY and N_EXTERN_LIBRARY to use N_PASCAL instead of
|
||||
pascal (which is the purpose of N_PASCAL anyway).
|
||||
-Changed platform specific typedefs to use N_HUGE...will probably consolidate
|
||||
into platform independent types later.
|
||||
-Changed to standardized copyright (smaller)
|
||||
-Cosmetic (typo) changes made to introductory comments
|
||||
-Changed function definition macros and function pointer type definition
|
||||
macros to correctly match document and use the N_CALLBACK, N_CDECL, and
|
||||
N_PASCAL defines.
|
||||
Changes to NPACKON.H:
|
||||
-Added pragma to shut up Visual C compilers so they don't complain about
|
||||
changing the alignment.
|
||||
|
||||
v1.03
|
||||
-Reformat (one time hit, won't happen again); includes removal of embedded
|
||||
tabs and consistent indenting to 4,7 "tabbing", consistent use of #if's.
|
||||
Various authors have modified this file using different tab stop
|
||||
interpretations (some at 4 spaces per tab, some at 3, and some at 8).
|
||||
Reading the code was subject to misinterpretations because of differences in
|
||||
indentation. Embedded tabs will now be kept out of ntypes.
|
||||
-"Fixed" missing section markers and corrected commented documentation on
|
||||
sections.
|
||||
-Clarified and corrected commented documentation.
|
||||
-Added support for N_INC_NO_GUI (don't include GUI structures) so that
|
||||
non-interface apps don't need to fill up compiler symbol space.
|
||||
-Added automatic defininitions for N_ARCH... and N_PLAT... macros when they
|
||||
can be deduced from a single definition. For example, if N_PLAT_DOS is
|
||||
defined, N_ARCH_16 is automatically defined if no N_ARCH... macro has yet
|
||||
been set.
|
||||
-Removed automatic inclusion of Types.h for Mac platform (as stated at the
|
||||
beginning of ntypes:
|
||||
"This file is guarenteed NOT to include any other files. It should be
|
||||
placed before any NetWare include files, but after any standard C or
|
||||
platform specific files, such as "windows.h"."
|
||||
Types.h should be included before ntypes for Mac code.
|
||||
-Added NSwapTo... and NSwapFrom... macros to clarify usage.
|
||||
-Renamed NMake32() and NMake16() macro parameters for clarity.
|
||||
-Changed use of PASCAL to N_PASCAL as per spec in function macros.
|
||||
|
||||
|
||||
v1.02
|
||||
- Added support for NLMs
|
||||
- Eliminated nbool16 and nbool32 in all Platforms.
|
||||
- Fixed bugs in Macintosh PowerPC
|
||||
- Added support for OSF on Alpha
|
||||
|
||||
v1.01
|
||||
- Macintosh compile problems, want to use C calling conventions, not pascal
|
||||
(at least for now)
|
||||
- Changes in OS/2 Section only to support 32 bit IBM C++ compiler
|
||||
- Added support for non-MPW compilers
|
||||
|
||||
v1.00
|
||||
- Initial release
|
62
LoginCapture/windows/external/xplatapi/include/nunicode.h
vendored
Normal file
62
LoginCapture/windows/external/xplatapi/include/nunicode.h
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nunicode.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:06:59 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1997 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
#if !defined(NUNICODE_H)
|
||||
#define NUNICODE_H
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/* For LIBC builds the XPlat libraries use the LIBC unicode and
|
||||
* localization support. LIBC is the next generation of the c-runtime
|
||||
* on NetWare. All other platforms will continue to use unicode.h
|
||||
* NOTE: stddef.h in the LIBC sdk defines __NOVELL_LIBC__
|
||||
*
|
||||
*/
|
||||
#if defined(__NOVELL_LIBC__)
|
||||
|
||||
#include "unilib.h"
|
||||
|
||||
/* unilib.h doesn't define the following with are used significantly
|
||||
* in the XPlat SDK. Define them for the XPlat SDK.
|
||||
*/
|
||||
|
||||
/* NOTE: LibC WinSock2 #defines "unicode" inside ws2defs.h.
|
||||
* If LibC WinSock2 headers have been included, undefine unicode
|
||||
* and typdef it the way XPlat SDK expects it.
|
||||
*/
|
||||
#if defined(unicode)
|
||||
#undef unicode
|
||||
#endif
|
||||
|
||||
#ifndef UNICODE_TYPE_DEFINED
|
||||
#define UNICODE_TYPE_DEFINED
|
||||
typedef unicode_t unicode; /* use LibC's unicode_t type */
|
||||
#endif
|
||||
|
||||
typedef unicode * punicode;
|
||||
typedef unicode ** ppunicode;
|
||||
|
||||
#else /* All non-LibC builds */
|
||||
|
||||
#include "unicode.h"
|
||||
|
||||
#endif /* #if defined(__NOVELL_LIBC__) */
|
||||
|
||||
|
||||
#endif /* #if !defined(NUNICODE_H) */
|
105
LoginCapture/windows/external/xplatapi/include/nwacct.h
vendored
Normal file
105
LoginCapture/windows/external/xplatapi/include/nwacct.h
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwacct.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:02 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWACCT_H )
|
||||
#define NWACCT_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 objectID;
|
||||
nint32 amount;
|
||||
} HOLDS_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint16 holdsCount;
|
||||
HOLDS_INFO holds[16];
|
||||
} HOLDS_STATUS;
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetAccountStatus
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * objName,
|
||||
pnint32 balance,
|
||||
pnint32 limit,
|
||||
HOLDS_STATUS N_FAR * holds
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWQueryAccountingInstalled
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
pnuint8 installed
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSubmitAccountCharge
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 serviceType,
|
||||
nint32 chargeAmt,
|
||||
nint32 holdCancelAmt,
|
||||
nuint16 noteType,
|
||||
const nstr8 N_FAR * note
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSubmitAccountHold
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * objName,
|
||||
nint32 holdAmt
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSubmitAccountNote
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 serviceType,
|
||||
nuint16 noteType,
|
||||
const nstr8 N_FAR * note
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif
|
778
LoginCapture/windows/external/xplatapi/include/nwadevnt.h
vendored
Normal file
778
LoginCapture/windows/external/xplatapi/include/nwadevnt.h
vendored
Normal file
@ -0,0 +1,778 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwadevnt.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:04 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWADEVNT_H )
|
||||
#define NWADEVNT_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
/* Bit definitions for volume audit events used in bit map */
|
||||
enum auditBitMapIDs
|
||||
{
|
||||
/* first 32 (0 - 31)bits reserved for dir service */
|
||||
A_BIT_BIND_CHG_OBJ_SECURITY = 32,
|
||||
A_BIT_BIND_CHG_PROP_SECURITY,
|
||||
A_BIT_BIND_CREATE_OBJ,
|
||||
A_BIT_BIND_CREATE_PROPERTY,
|
||||
A_BIT_BIND_DELETE_OBJ,
|
||||
A_BIT_BIND_DELETE_PROPERTY,
|
||||
A_BIT_CHANGE_DATE_TIME,
|
||||
A_BIT_CHANGE_EQUIVALENCE,
|
||||
A_BIT_CHANGE_SECURITY_GROUP,
|
||||
A_BIT_UCLOSE_FILE,
|
||||
A_BIT_CLOSE_BINDERY,
|
||||
A_BIT_UCREATE_FILE,
|
||||
A_BIT_CREATE_USER,
|
||||
A_BIT_UDELETE_FILE,
|
||||
A_BIT_DELETE_USER,
|
||||
A_BIT_DIR_SPACE_RESTRICTIONS,
|
||||
A_BIT_DISABLE_ACCOUNT,
|
||||
A_BIT_DOWN_SERVER,
|
||||
A_BIT_GRANT_TRUSTEE,
|
||||
A_BIT_INTRUDER_LOCKOUT_CHANGE,
|
||||
A_BIT_LOGIN_USER,
|
||||
A_BIT_LOGIN_USER_FAILURE,
|
||||
A_BIT_LOGOUT_USER,
|
||||
A_BIT_NET_LOGIN,
|
||||
A_BIT_UMODIFY_ENTRY,
|
||||
A_BIT_OPEN_BINDERY,
|
||||
A_BIT_UOPEN_FILE,
|
||||
A_BIT_UREAD_FILE,
|
||||
A_BIT_REMOVE_TRUSTEE,
|
||||
A_BIT_URENAME_MOVE_FILE,
|
||||
A_BIT_RENAME_USER,
|
||||
A_BIT_USALVAGE_FILE,
|
||||
A_BIT_STATION_RESTRICTIONS,
|
||||
A_BIT_CHANGE_PASSWORD,
|
||||
A_BIT_TERMINATE_CONNECTION,
|
||||
A_BIT_UP_SERVER,
|
||||
A_BIT_USER_CHANGE_PASSWORD,
|
||||
A_BIT_USER_LOCKED,
|
||||
A_BIT_USER_SPACE_RESTRICTIONS,
|
||||
A_BIT_USER_UNLOCKED,
|
||||
A_BIT_VOLUME_MOUNT,
|
||||
A_BIT_VOLUME_DISMOUNT,
|
||||
A_BIT_UWRITE_FILE,
|
||||
A_BIT_GOPEN_FILE,
|
||||
A_BIT_GCLOSE_FILE,
|
||||
A_BIT_GCREATE_FILE,
|
||||
A_BIT_GDELETE_FILE,
|
||||
A_BIT_GREAD_FILE,
|
||||
A_BIT_GWRITE_FILE,
|
||||
A_BIT_GRENAME_MOVE_FILE,
|
||||
A_BIT_GMODIFY_ENTRY,
|
||||
A_BIT_IOPEN_FILE,
|
||||
A_BIT_ICLOSE_FILE,
|
||||
A_BIT_ICREATE_FILE,
|
||||
A_BIT_IDELETE_FILE,
|
||||
A_BIT_IREAD_FILE,
|
||||
A_BIT_IWRITE_FILE,
|
||||
A_BIT_IRENAME_MOVE_FILE,
|
||||
A_BIT_IMODIFY_ENTRY,
|
||||
A_BIT_Q_ATTACH_SERVER,
|
||||
A_BIT_Q_CREATE,
|
||||
A_BIT_Q_CREATE_JOB,
|
||||
A_BIT_Q_DESTROY,
|
||||
A_BIT_Q_DETACH_SERVER,
|
||||
A_BIT_Q_EDIT_JOB,
|
||||
A_BIT_Q_JOB_FINISH,
|
||||
A_BIT_Q_JOB_SERVICE,
|
||||
A_BIT_Q_JOB_SERVICE_ABORT,
|
||||
A_BIT_Q_REMOVE_JOB,
|
||||
A_BIT_Q_SET_JOB_PRIORITY,
|
||||
A_BIT_Q_SET_STATUS,
|
||||
A_BIT_Q_START_JOB,
|
||||
A_BIT_Q_SWAP_RIGHTS,
|
||||
A_BIT_NLM_ADD_RECORD,
|
||||
A_BIT_NLM_ADD_ID_RECORD,
|
||||
A_BIT_CLOSE_MODIFIED_FILE,
|
||||
A_BIT_GCREATE_DIRECTORY,
|
||||
A_BIT_ICREATE_DIRECTORY,
|
||||
A_BIT_UCREATE_DIRECTORY,
|
||||
A_BIT_GDELETE_DIRECTORY,
|
||||
A_BIT_IDELETE_DIRECTORY,
|
||||
A_BIT_UDELETE_DIRECTORY, /* 113 */
|
||||
/* Start of Trusted NetWare Auditing */
|
||||
A_BIT_GET_CURRENT_ACCNT_STATS,
|
||||
A_BIT_SUBMIT_ACCOUNT_CHARGE,
|
||||
A_BIT_SUBMIT_ACCOUNT_HOLD,
|
||||
A_BIT_SUBMIT_ACCOUNT_NOTE,
|
||||
A_BIT_DISABLE_BROADCASTS,
|
||||
A_BIT_GET_BROADCAST_MESSAGE,
|
||||
A_BIT_ENABLE_BROADCASTS,
|
||||
A_BIT_BROADCAST_TO_CONSOLE,
|
||||
A_BIT_SEND_BROADCAST_MESSAGE,
|
||||
A_BIT_WRITE_EATTRIB,
|
||||
A_BIT_READ_EATTRIB,
|
||||
A_BIT_ENUM_EATTRIB,
|
||||
A_BIT_SEE_FSO, /* not used */
|
||||
A_BIT_GET_FSO_RIGHTS,
|
||||
A_BIT_PURGE_FILE,
|
||||
A_BIT_SCAN_DELETED,
|
||||
A_BIT_DUPLICATE_EATTRIB,
|
||||
A_BIT_ALLOC_DIR_HANDLE,
|
||||
A_BIT_SET_HANDLE,
|
||||
A_BIT_SEARCH,
|
||||
A_BIT_GEN_DIR_BASE_AND_VOL,
|
||||
A_BIT_OBTAIN_FSO_INFO,
|
||||
A_BIT_GET_REF_COUNT,
|
||||
A_BIT_MODIFY_ENTRY_NO_SRCH, /* not used */
|
||||
A_BIT_SCAN_TRUSTEES,
|
||||
A_BIT_GET_OBJ_EFFECTIVE_RTS,
|
||||
A_BIT_PARSE_TREE,
|
||||
A_BIT_SET_SPOOL_FILE_FLAGS,
|
||||
A_BIT_RESTORE_Q_SERVER_RTS,
|
||||
A_BIT_Q_JOB_SIZE,
|
||||
A_BIT_Q_JOB_LIST,
|
||||
A_BIT_Q_JOB_FROM_FORM_LIST,
|
||||
A_BIT_READ_Q_JOB_ENTRY,
|
||||
A_BIT_MOVE_Q_JOB,
|
||||
A_BIT_READ_Q_STATUS,
|
||||
A_BIT_READ_Q_SERVER_STATUS,
|
||||
A_BIT_EXTENDED_SEARCH,
|
||||
A_BIT_GET_DIR_ENTRY,
|
||||
A_BIT_SCAN_VOL_USER_RESTR,
|
||||
A_BIT_VERIFY_SERIAL,
|
||||
A_BIT_GET_DISK_UTILIZATION,
|
||||
A_BIT_LOG_FILE,
|
||||
A_BIT_SET_COMP_FILE_SZ,
|
||||
A_BIT_DISABLE_LOGIN,
|
||||
A_BIT_ENABLE_LOGIN,
|
||||
A_BIT_DISABLE_TTS,
|
||||
A_BIT_ENABLE_TTS,
|
||||
A_BIT_SEND_CONSOLE_BCAST,
|
||||
A_BIT_GET_REMAIN_OBJ_DISK_SPC,
|
||||
A_BIT_GET_CONN_TASKS,
|
||||
A_BIT_GET_CONN_OPEN_FILES,
|
||||
A_BIT_GET_CONN_USING_FILE,
|
||||
A_BIT_GET_PHYS_REC_LOCKS_CONN,
|
||||
A_BIT_GET_PHYS_REC_LOCKS_FILE,
|
||||
A_BIT_GET_LOG_REC_BY_CONN,
|
||||
A_BIT_GET_LOG_REC_INFO,
|
||||
A_BIT_GET_CONN_SEMS,
|
||||
A_BIT_GET_SEM_INFO,
|
||||
A_BIT_MAP_DIR_TO_PATH,
|
||||
A_BIT_CONVERT_PATH_TO_ENTRY,
|
||||
A_BIT_DESTROY_SERVICE_CONN,
|
||||
A_BIT_SET_Q_SERVER_STATUS,
|
||||
A_BIT_CONSOLE_COMMAND,
|
||||
A_BIT_REMOTE_ADD_NS,
|
||||
A_BIT_REMOTE_DISMOUNT,
|
||||
A_BIT_REMOTE_EXE,
|
||||
A_BIT_REMOTE_LOAD,
|
||||
A_BIT_REMOTE_MOUNT,
|
||||
A_BIT_REMOTE_SET,
|
||||
A_BIT_REMOTE_UNLOAD,
|
||||
A_BIT_GET_CONN_RANGE,
|
||||
A_BIT_GET_VOL_LABEL,
|
||||
A_BIT_SET_VOL_LABEL,
|
||||
A_BIT_FAILED_MASV_ACCESS
|
||||
};
|
||||
|
||||
/* The following is used for Volume Auditing Events */
|
||||
typedef struct tagNWVolAuditRecord
|
||||
{
|
||||
nuint16 eventTypeID;
|
||||
nuint16 chkWord;
|
||||
nuint32 connectionID;
|
||||
nuint32 processUniqueID;
|
||||
nuint32 successFailureStatusCode;
|
||||
nuint16 dosDate;
|
||||
nuint16 dosTime;
|
||||
/* nuint8 extra[0]; start of 'union EventUnion' */
|
||||
}NWVolumeAuditRcd, N_FAR *pNWVolumeAuditRcd;
|
||||
|
||||
/* auditing events that are returned in the AuditRecord eventTypeID field */
|
||||
enum auditedEventIDs
|
||||
{
|
||||
A_EVENT_BIND_CHG_OBJ_SECURITY = 1,
|
||||
A_EVENT_BIND_CHG_PROP_SECURITY = 2,
|
||||
A_EVENT_BIND_CREATE_OBJ = 3,
|
||||
A_EVENT_BIND_CREATE_PROPERTY = 4,
|
||||
A_EVENT_BIND_DELETE_OBJ = 5,
|
||||
A_EVENT_BIND_DELETE_PROPERTY = 6,
|
||||
A_EVENT_CHANGE_DATE_TIME = 7,
|
||||
A_EVENT_CHANGE_EQUIVALENCE = 8,
|
||||
A_EVENT_CHANGE_SECURITY_GROUP = 9,
|
||||
A_EVENT_CLOSE_FILE = 10,
|
||||
A_EVENT_CLOSE_BINDERY = 11,
|
||||
A_EVENT_CREATE_FILE = 12,
|
||||
A_EVENT_CREATE_USER = 13,
|
||||
A_EVENT_DELETE_FILE = 14,
|
||||
A_EVENT_DELETE_USER = 15,
|
||||
A_EVENT_DIR_SPACE_RESTRICTIONS = 16,
|
||||
A_EVENT_DISABLE_ACCOUNT = 17,
|
||||
A_EVENT_DOWN_SERVER = 18,
|
||||
A_EVENT_GRANT_TRUSTEE = 19,
|
||||
A_EVENT_INTRUDER_LOCKOUT_CHNG = 20,
|
||||
A_EVENT_LOGIN_USER = 21,
|
||||
A_EVENT_LOGIN_USER_FAILURE = 22,
|
||||
A_EVENT_LOGOUT_USER = 23,
|
||||
A_EVENT_NET_LOGIN = 24,
|
||||
A_EVENT_MODIFY_ENTRY = 25,
|
||||
A_EVENT_OPEN_BINDERY = 26,
|
||||
A_EVENT_OPEN_FILE = 27,
|
||||
A_EVENT_Q_ATTACH_SERVER = 28,
|
||||
A_EVENT_Q_CREATE = 29,
|
||||
A_EVENT_Q_CREATE_JOB = 30,
|
||||
A_EVENT_Q_DESTROY = 31,
|
||||
A_EVENT_Q_DETACH_SERVER = 32,
|
||||
A_EVENT_Q_EDIT_JOB = 33,
|
||||
A_EVENT_Q_JOB_FINISH = 34,
|
||||
A_EVENT_Q_JOB_SERVICE = 35,
|
||||
A_EVENT_Q_JOB_SERVICE_ABORT = 36,
|
||||
A_EVENT_Q_REMOVE_JOB = 37,
|
||||
A_EVENT_Q_SET_JOB_PRIORITY = 38,
|
||||
A_EVENT_Q_SET_STATUS = 39,
|
||||
A_EVENT_Q_START_JOB = 40,
|
||||
A_EVENT_Q_SWAP_RIGHTS = 41,
|
||||
A_EVENT_READ_FILE = 42,
|
||||
A_EVENT_REMOVE_TRUSTEE = 43,
|
||||
A_EVENT_RENAME_MOVE_FILE = 44,
|
||||
A_EVENT_RENAME_USER = 45,
|
||||
A_EVENT_SALVAGE_FILE = 46,
|
||||
A_EVENT_STATION_RESTRICTIONS = 47,
|
||||
A_EVENT_CHANGE_PASSWORD = 48,
|
||||
A_EVENT_TERMINATE_CONNECTION = 49,
|
||||
A_EVENT_UP_SERVER = 50,
|
||||
A_EVENT_USER_CHANGE_PASSWORD = 51,
|
||||
A_EVENT_USER_LOCKED = 52,
|
||||
A_EVENT_USER_SPACE_RESTRICTION = 53,
|
||||
A_EVENT_USER_UNLOCKED = 54,
|
||||
A_EVENT_VOLUME_MOUNT = 55,
|
||||
A_EVENT_VOLUME_DISMOUNT = 56,
|
||||
A_EVENT_WRITE_FILE = 57,
|
||||
A_ACTIVE_CONNECTION_RCD = 58,
|
||||
A_ADD_AUDITOR_ACCESS = 59,
|
||||
A_ADD_AUDIT_PROPERTY = 60,
|
||||
A_CHANGE_AUDIT_PASSWORD = 61,
|
||||
A_DELETE_AUDIT_PROPERTY = 62,
|
||||
A_DISABLE_VOLUME_AUDIT = 63,
|
||||
A_OPEN_FILE_HANDLE_RCD = 64,
|
||||
A_ENABLE_VOLUME_AUDITING = 65,
|
||||
A_REMOVE_AUDITOR_ACCESS = 66,
|
||||
A_RESET_AUDIT_FILE = 67,
|
||||
A_RESET_AUDIT_FILE2 = 68,
|
||||
A_RESET_CONFIG_FILE = 69,
|
||||
A_WRITE_AUDIT_BIT_MAP = 70,
|
||||
A_WRITE_AUDIT_CONFIG_HDR = 71,
|
||||
A_NLM_ADD_RECORD = 72,
|
||||
A_ADD_NLM_ID_RECORD = 73,
|
||||
A_CHANGE_AUDIT_PASSWORD2 = 74,
|
||||
A_EVENT_CREATE_DIRECTORY = 75,
|
||||
A_EVENT_DELETE_DIRECTORY = 76,
|
||||
A_INTRUDER_DETECT = 77,
|
||||
A_VOLUME_NAME_RCD = 78,
|
||||
A_BEGIN_AUDIT_FILE_READ = 79,
|
||||
A_VOLUME_NAME_RCD_2 = 80,
|
||||
A_DELETE_OLD_AUDIT_FILE = 81,
|
||||
A_QUERY_AUDIT_STATUS = 82,
|
||||
|
||||
/* begin TNW changes */
|
||||
|
||||
A_EVENT_GET_CURRENT_ACNT_STATS = 200,
|
||||
A_EVENT_SUBMIT_ACCOUNT_CHARGE = 201,
|
||||
A_EVENT_SUBMIT_ACCOUNT_HOLD = 202,
|
||||
A_EVENT_SUBMIT_ACCOUNT_NOTE = 203,
|
||||
A_EVENT_DISABLE_BROADCASTS = 204,
|
||||
A_EVENT_GET_BROADCAST_MESSAGE = 205,
|
||||
A_EVENT_ENABLE_BROADCASTS = 206,
|
||||
A_EVENT_BROADCAST_TO_CONSOLE = 207,
|
||||
A_EVENT_SEND_BROADCAST_MESSAGE = 208,
|
||||
A_EVENT_WRITE_EATTRIB = 209,
|
||||
A_EVENT_READ_EATTRIB = 210,
|
||||
A_EVENT_ENUM_EATTRIB = 211,
|
||||
A_EVENT_SEE_FSO = 212, /* not used */
|
||||
A_EVENT_GET_FSO_RIGHTS = 213,
|
||||
A_EVENT_PURGE_FILE = 214,
|
||||
A_EVENT_SCAN_DELETED = 215,
|
||||
A_EVENT_DUPLICATE_EATTRIB = 216,
|
||||
A_EVENT_ALLOC_DIR_HANDLE = 217,
|
||||
A_EVENT_SET_HANDLE = 218,
|
||||
A_EVENT_SEARCH = 219,
|
||||
A_EVENT_GEN_DIR_BASE_AND_VOL = 220,
|
||||
A_EVENT_OBTAIN_FSO_INFO = 221,
|
||||
A_EVENT_GET_REF_COUNT = 222,
|
||||
A_EVENT_MODIFY_ENTRY_NO_SEARCH = 223,
|
||||
A_EVENT_SCAN_TRUSTEES = 224,
|
||||
A_EVENT_GET_OBJ_EFFECTIVE_RGHT = 225,
|
||||
A_EVENT_PARSE_TREE = 226,
|
||||
A_EVENT_SET_SPOOL_FILE_FLAGS = 227,
|
||||
A_EVENT_RESTORE_Q_SERVER_RGHT = 228,
|
||||
A_EVENT_Q_JOB_SIZE = 229,
|
||||
A_EVENT_Q_JOB_LIST = 230,
|
||||
A_EVENT_Q_JOB_FROM_FORM_LIST = 231,
|
||||
A_EVENT_READ_Q_JOB_ENTRY = 232,
|
||||
A_EVENT_MOVE_Q_JOB = 233,
|
||||
A_EVENT_READ_Q_STATUS = 234,
|
||||
A_EVENT_READ_Q_SERVER_STATUS = 235,
|
||||
A_EVENT_EXTENDED_SEARCH = 236,
|
||||
A_EVENT_GET_DIR_ENTRY = 237,
|
||||
A_EVENT_SCAN_VOL_USER_RESTR = 238,
|
||||
A_EVENT_VERIFY_SERIAL = 239,
|
||||
A_EVENT_GET_DISK_UTILIZATION = 240,
|
||||
A_EVENT_LOG_FILE = 241,
|
||||
A_EVENT_SET_COMP_FILE_SZ = 242,
|
||||
A_EVENT_DISABLE_LOGIN = 243,
|
||||
A_EVENT_ENABLE_LOGIN = 244,
|
||||
A_EVENT_DISABLE_TTS = 245,
|
||||
A_EVENT_ENABLE_TTS = 246,
|
||||
A_EVENT_SEND_CONSOLE_BROADCAST = 247,
|
||||
A_EVENT_GET_REMAIN_OBJ_DISK_SPC = 248,
|
||||
A_EVENT_GET_CONN_TASKS = 249,
|
||||
A_EVENT_GET_CONN_OPEN_FILES = 250,
|
||||
A_EVENT_GET_CONN_USING_FILE = 251,
|
||||
A_EVENT_GET_PHYS_REC_LOCKS_CONN = 252,
|
||||
A_EVENT_GET_PHYS_REC_LOCKS_FILE = 253,
|
||||
A_EVENT_GET_LOG_REC_BY_CONN = 254,
|
||||
A_EVENT_GET_LOG_REC_INFO = 255,
|
||||
A_EVENT_GET_CONN_SEMS = 256,
|
||||
A_EVENT_GET_SEM_INFO = 257,
|
||||
A_EVENT_MAP_DIR_TO_PATH = 258,
|
||||
A_EVENT_CONVERT_PATH_TO_ENTRY = 259,
|
||||
A_EVENT_DESTROY_SERVICE_CONN = 260,
|
||||
A_EVENT_SET_Q_SERVER_STATUS = 261,
|
||||
A_EVENT_CONSOLE_COMMAND = 262,
|
||||
A_EVENT_REMOTE_ADD_NS = 263,
|
||||
A_EVENT_REMOTE_DISMOUNT = 264,
|
||||
A_EVENT_REMOTE_EXE = 265,
|
||||
A_EVENT_REMOTE_LOAD = 266,
|
||||
A_EVENT_REMOTE_MOUNT = 267,
|
||||
A_EVENT_REMOTE_SET = 268,
|
||||
A_EVENT_REMOTE_UNLOAD = 269,
|
||||
A_EVENT_GET_CONN_RANGE = 270,
|
||||
A_EVENT_GET_VOL_LABEL = 271,
|
||||
A_EVENT_SET_VOL_LABEL = 272,
|
||||
A_EVENT_FAILED_MASV_ACCESS = 273,
|
||||
A_EVENT_LAST_PLUS_ONE = 274
|
||||
};
|
||||
|
||||
typedef struct tagNWModifyStructure
|
||||
{
|
||||
nuint8 *MModifyName;
|
||||
nuint32 MFileAttributes;
|
||||
nuint32 MFileAttributesMask;
|
||||
nuint16 MCreateDate;
|
||||
nuint16 MCreateTime;
|
||||
nuint32 MOwnerID;
|
||||
nuint16 MLastArchivedDate;
|
||||
nuint16 MLastArchivedTime;
|
||||
nuint32 MLastArchivedID;
|
||||
nuint16 MLastUpdatedDate; /* also last modified date and time. */
|
||||
nuint16 MLastUpdatedTime;
|
||||
nuint32 MLastUpdatedID;
|
||||
nuint16 MLastAccessedDate;
|
||||
nuint16 MInheritanceGrantMask;
|
||||
nuint16 MInheritanceRevokeMask;
|
||||
nuint32 MMaximumSpace;
|
||||
} NWModifyStructure, N_FAR *pNWModifyStructure;
|
||||
|
||||
#ifndef MModifyNameBit
|
||||
#define MModifyNameBit 0x0001L
|
||||
#define MFileAttributesBit 0x0002L
|
||||
#define MCreateDateBit 0x0004L
|
||||
#define MCreateTimeBit 0x0008L
|
||||
#define MOwnerIDBit 0x0010L
|
||||
#define MLastArchivedDateBit 0x0020L
|
||||
#define MLastArchivedTimeBit 0x0040L
|
||||
#define MLastArchivedIDBit 0x0080L
|
||||
#define MLastUpdatedDateBit 0x0100L
|
||||
#define MLastUpdatedTimeBit 0x0200L
|
||||
#define MLastUpdatedIDBit 0x0400L
|
||||
#define MLastAccessedDateBit 0x0800L
|
||||
#define MInheritedRightsMaskBit 0x1000L
|
||||
#define MMaximumSpaceBit 0x2000L
|
||||
#endif
|
||||
|
||||
union EventUnion
|
||||
{
|
||||
struct eventChgDate
|
||||
{
|
||||
nuint32 newDosDateTime;
|
||||
} EChgDate;
|
||||
|
||||
struct eventCreateUser
|
||||
{
|
||||
nuint32 userID;
|
||||
nuint8 name[1];
|
||||
} ECreateUser;
|
||||
|
||||
struct eventBindChgSecurity
|
||||
{
|
||||
nuint32 newSecurity;
|
||||
nuint32 oldSecurity;
|
||||
nuint8 name[1];
|
||||
} EBindChgSecurity;
|
||||
|
||||
struct eventBindChgSecGrp
|
||||
{
|
||||
nuint32 addFlag;
|
||||
nuint8 objName[1]; /* obj name */
|
||||
nuint8 name[1]; /* member name */
|
||||
} EBindChgSecGrp;
|
||||
|
||||
struct eventBindCreateObj
|
||||
{
|
||||
nuint32 objectID;
|
||||
nuint32 security;
|
||||
nuint8 name[1];
|
||||
} EBindCreateObj;
|
||||
|
||||
struct eventBindCreateProp
|
||||
{
|
||||
nuint32 security;
|
||||
nuint8 name[1];
|
||||
} EBindCreateProp;
|
||||
|
||||
struct eventBindDeleteProp
|
||||
{
|
||||
nuint8 name[1];
|
||||
} EBindDeleteProp;
|
||||
|
||||
struct eventIntruderLockoutChg
|
||||
{
|
||||
nuint8 hbaa; /* nuint8 exchanged allowed attempts */
|
||||
nuint8 lbaa;
|
||||
nuint8 hbrm; /* reset minutes */
|
||||
nuint8 lbrm;
|
||||
nuint8 hblm; /* lock minutes */
|
||||
nuint8 lblm;
|
||||
} EILockChg;
|
||||
|
||||
struct eventLogin
|
||||
{
|
||||
nuint32 userID;
|
||||
nuint8 networkAddressType;
|
||||
nuint8 networkAddressLength;
|
||||
nuint8 networkAddress[1]; /* variable length */
|
||||
nuint8 name[1];
|
||||
} ELogin;
|
||||
|
||||
|
||||
struct eventChgPasswd
|
||||
{
|
||||
nuint8 name[1]; /* object or user name */
|
||||
} EChgPasswd;
|
||||
|
||||
struct eventChgSecurity
|
||||
{
|
||||
nuint32 newSecurity;
|
||||
nuint32 oldSecurity;
|
||||
nuint8 name[1];
|
||||
} EChgSecurity;
|
||||
|
||||
struct eventFDelete
|
||||
{
|
||||
nuint32 nameSpace;
|
||||
nuint8 fileName[1];
|
||||
} EFDelete;
|
||||
|
||||
struct eventFOpen
|
||||
{
|
||||
nuint32 handle;
|
||||
nuint32 rights;
|
||||
nuint32 nameSpace;
|
||||
nuint8 fileName[1];
|
||||
} EFOpen;
|
||||
|
||||
struct eventFClose
|
||||
{
|
||||
nuint32 handle;
|
||||
nuint32 modified;
|
||||
} EFClose;
|
||||
|
||||
struct eventFRead
|
||||
{
|
||||
nuint32 handle;
|
||||
nuint32 byteCount;
|
||||
nuint32 offset;
|
||||
} EFRead;
|
||||
|
||||
struct eventAuditProperty
|
||||
{
|
||||
nuint8 name[1];
|
||||
} EAuditProperty;
|
||||
|
||||
struct eventModify /* modify dir entry */
|
||||
{
|
||||
nuint32 modifyBits;
|
||||
nuint32 nameSpace;
|
||||
nuint8 modifyStruct[ sizeof(NWModifyStructure) ];
|
||||
nuint8 fileName[1];
|
||||
/* the following length preceeded strings are optional
|
||||
as defined by the modify bits */
|
||||
nuint8 oldDosName[1];
|
||||
nuint8 newOwner[1];
|
||||
nuint8 lastArchivedBy[1];
|
||||
nuint8 lastModifiedBy[1];
|
||||
} EModify;
|
||||
|
||||
struct eventQAttach
|
||||
{
|
||||
nuint8 qname[1];
|
||||
} EQAttach;
|
||||
|
||||
struct eventQCreate
|
||||
{
|
||||
nuint32 qType;
|
||||
nuint8 fileName[1];
|
||||
} EQCreate;
|
||||
|
||||
struct eventQJobService
|
||||
{
|
||||
nuint32 tType;
|
||||
nuint8 qname[1];
|
||||
} EQJobService;
|
||||
|
||||
struct eventQSetStatus
|
||||
{
|
||||
nuint32 status;
|
||||
nuint8 qname[1];
|
||||
} EQSetStatus;
|
||||
|
||||
struct eventStationRestrictions
|
||||
{
|
||||
nuint8 name[1];
|
||||
nuint8 netAddress[1];
|
||||
} EStnRestrictions;
|
||||
|
||||
struct eventTrustee
|
||||
{
|
||||
nuint32 trusteeID;
|
||||
nuint32 rights;
|
||||
nuint32 nameSpace;
|
||||
nuint8 trusteeName[1];
|
||||
nuint8 fileName[1];
|
||||
} ETrustee;
|
||||
|
||||
struct eventTrusteeSpace
|
||||
{
|
||||
nuint32 spaceValue;
|
||||
nuint8 trusteeName[1];
|
||||
} ETSpace;
|
||||
|
||||
struct auditingNLMAddRecord
|
||||
{
|
||||
nuint32 recordTypeID;
|
||||
nuint32 dataLen;
|
||||
nuint8 userName[1];
|
||||
nuint8 data[1];
|
||||
} ENLMRecord;
|
||||
};
|
||||
|
||||
/* The following is used for Directory Services Auditing Events */
|
||||
typedef struct tagNWContAuditRecord
|
||||
{
|
||||
nuint16 replicaNumber;
|
||||
nuint16 eventTypeID;
|
||||
nuint32 recordNumber;
|
||||
nuint32 dosDateTime;
|
||||
nuint32 userID;
|
||||
nuint32 processUniqueID;
|
||||
nuint32 successFailureStatusCode;
|
||||
/* nuint8 extra[0]; start of 'union EventUnion' */
|
||||
}NWContAuditRecord, N_FAR *pNWContAuditRecord;
|
||||
|
||||
/* Audit event bit definitions for Container Auditing */
|
||||
#define ADS_BIT_ADD_ENTRY 1 /* first bit no. is 1 */
|
||||
#define ADS_BIT_REMOVE_ENTRY 2
|
||||
#define ADS_BIT_RENAME_OBJECT 3
|
||||
#define ADS_BIT_MOVE_ENTRY 4
|
||||
#define ADS_BIT_CHANGE_SECURITY_EQUIV 5
|
||||
#define ADS_BIT_CHG_SECURITY_ALSO_EQUAL 6
|
||||
#define ADS_BIT_CHANGE_ACL 7
|
||||
#define ADS_BIT_CHG_STATION_RESTRICTION 8
|
||||
#define ADS_BIT_LOGIN 9
|
||||
#define ADS_BIT_LOGOUT 10
|
||||
#define ADS_BIT_CHANGE_PASSWORD 11
|
||||
#define ADS_BIT_USER_LOCKED 12
|
||||
#define ADS_BIT_USER_UNLOCKED 13
|
||||
#define ADS_BIT_USER_DISABLE 14
|
||||
#define ADS_BIT_USER_ENABLE 15
|
||||
#define ADS_BIT_CHANGE_INTRUDER_DETECT 16
|
||||
|
||||
#define ADS_BIT_ADD_PARTITION 17
|
||||
#define ADS_BIT_REMOVE_PARTITION 18
|
||||
#define ADS_BIT_ADD_REPLICA 19
|
||||
#define ADS_BIT_REMOVE_REPLICA 20
|
||||
|
||||
#define ADS_BIT_SPLIT_PARTITION 21
|
||||
#define ADS_BIT_JOIN_PARTITIONS 22
|
||||
#define ADS_BIT_CHANGE_REPLICA_TYPE 23
|
||||
#define ADS_BIT_REPAIR_TIME_STAMPS 24
|
||||
#define ADS_BIT_MOVE_SUB_TREE 25
|
||||
#define ADS_BIT_ABORT_PARTITION_OP 26
|
||||
#define ADS_BIT_SEND_REPLICA_UPDATES 27
|
||||
#define ADS_BIT_RECEIVE_REPLICA_UPDATES 28
|
||||
|
||||
/* Added for Trusted NetWare auditing */
|
||||
#define ADS_BIT_ADD_MEMBER 29
|
||||
#define ADS_BIT_BACKUP_ENTRY 30
|
||||
#define ADS_BIT_CHANGE_BIND_OBJ_SECUR 31
|
||||
#define ADS_BIT_CHANGE_PROP_SECURITY 32
|
||||
#define ADS_BIT_CHANGE_TREE_NAME 33
|
||||
#define ADS_BIT_CHECK_CONSOLE_OPERATOR 34
|
||||
#define ADS_BIT_COMPARE_ATTR_VALUE 35
|
||||
#define ADS_BIT_CREATE_PROPERTY 36
|
||||
#define ADS_BIT_CREATE_SUBORDINATE_REF 37
|
||||
#define ADS_BIT_DEFINE_ATTR_DEF 38
|
||||
#define ADS_BIT_DEFINE_CLASS_DEF 39
|
||||
#define ADS_BIT_DELETE_MEMBER 40
|
||||
#define ADS_BIT_DELETE_PROPERTY 41
|
||||
#define ADS_BIT_DS_NCP_RELOAD 42
|
||||
#define ADS_BIT_RESET_DS_COUNTERS 43
|
||||
#define ADS_BIT_FRAG_REQUEST 44
|
||||
#define ADS_BIT_INSPECT_ENTRY 45
|
||||
#define ADS_BIT_LIST_CONTAINABLE_CLASS 46
|
||||
#define ADS_BIT_LIST_PARTITIONS 47
|
||||
#define ADS_BIT_LIST_SUBORDINATES 48
|
||||
#define ADS_BIT_MERGE_TREE 49
|
||||
#define ADS_BIT_MODIFY_CLASS_DEF 50
|
||||
#define ADS_BIT_MOVE_TREE 51
|
||||
#define ADS_BIT_OPEN_STREAM 52
|
||||
#define ADS_BIT_READ 53
|
||||
#define ADS_BIT_READ_REFERENCES 54
|
||||
#define ADS_BIT_REMOVE_ATTR_DEF 55
|
||||
#define ADS_BIT_REMOVE_CLASS_DEF 56
|
||||
#define ADS_BIT_REMOVE_ENTRY_DIR 57
|
||||
#define ADS_BIT_RESTORE_ENTRY 58
|
||||
#define ADS_BIT_START_JOIN 59
|
||||
#define ADS_BIT_START_UPDATE_REPLICA 60
|
||||
#define ADS_BIT_START_UPDATE_SCHEMA 61
|
||||
#define ADS_BIT_SYNC_PARTITION 62
|
||||
#define ADS_BIT_SYNC_SCHEMA 63
|
||||
#define ADS_BIT_UPDATE_REPLICA 64
|
||||
#define ADS_BIT_UPDATE_SCHEMA 65
|
||||
#define ADS_BIT_VERIFY_PASSWORD 66
|
||||
#define ADS_BIT_ABORT_JOIN 67
|
||||
#define ADS_BIT_RESEND_ENTRY 68
|
||||
#define ADS_BIT_MUTATE_ENTRY 69
|
||||
#define ADS_BIT_MERGE_ENTRIES 70
|
||||
#define ADS_BIT_END_UPDATE_REPLICA 71
|
||||
#define ADS_BIT_END_UPDATE_SCHEMA 72
|
||||
#define ADS_BIT_CREATE_BACKLINK 73
|
||||
#define ADS_BIT_MODIFY_ENTRY 74
|
||||
#define ADS_BIT_REMOVE_BACKLINK 75
|
||||
#define ADS_BIT_NEW_SCHEMA_EPOCH 76
|
||||
#define ADS_BIT_CLOSE_BINDERY 77
|
||||
#define ADS_BIT_OPEN_BINDERY 78
|
||||
#define ADS_BIT_NLM_FIRST 89
|
||||
#define ADS_BIT_NLS_NLM 89
|
||||
#define ADS_BIT_NLM_LAST 99
|
||||
|
||||
|
||||
/* Audit Event ID for Container Audit Events */
|
||||
|
||||
#define ADS_ADD_ENTRY 101 /* unsigned long newEntryID */
|
||||
#define ADS_REMOVE_ENTRY 102 /* unsigned long oldEntryID */
|
||||
#define ADS_RENAME_OBJECT 103 /* unsigned long renamedEntryID, char *oldRDN */
|
||||
#define ADS_MOVE_ENTRY 104 /* unsigned long movedEntryID, char *oldDN */
|
||||
#define ADS_CHANGE_SECURITY_EQUIV 105
|
||||
#define ADS_CHG_SECURITY_ALSO_EQUAL 106
|
||||
#define ADS_CHANGE_ACL 107
|
||||
#define ADS_CHG_STATION_RESTRICTION 108
|
||||
#define ADS_LOGIN 109 /* unsigned long entryID */
|
||||
#define ADS_LOGOUT 110
|
||||
#define ADS_CHANGE_PASSWORD 111 /* unsigned long entryID */
|
||||
#define ADS_USER_LOCKED 112 /* unsigned long entryID */
|
||||
#define ADS_USER_UNLOCKED 113 /* unsigned long entryID */
|
||||
#define ADS_USER_DISABLE 114 /* unsigned long entryID */
|
||||
#define ADS_USER_ENABLE 115 /* unsigned long entryID */
|
||||
#define ADS_CHANGE_INTRUDER_DETECT 116
|
||||
#define ADS_ADD_PARTITION 117
|
||||
#define ADS_REMOVE_PARTITION 118
|
||||
#define ADS_ADD_REPLICA 119
|
||||
#define ADS_REMOVE_REPLICA 120
|
||||
#define ADS_SPLIT_PARTITION 121
|
||||
#define ADS_JOIN_PARTITIONS 122
|
||||
#define ADS_CHANGE_REPLICA_TYPE 123
|
||||
#define ADS_REPAIR_TIME_STAMPS 124
|
||||
#define ADS_MOVE_SUB_TREE 125
|
||||
#define ADS_ABORT_PARTITION_OP 126
|
||||
#define ADS_SEND_REPLICA_UPDATES 127
|
||||
#define ADS_RECEIVE_REPLICA_UPDATES 128
|
||||
|
||||
/* start Trusted NetWare auditing events */
|
||||
#define ADS_ADD_MEMBER 129
|
||||
#define ADS_BACKUP_ENTRY 130
|
||||
#define ADS_CHANGE_BIND_OBJ_SECURITY 131
|
||||
#define ADS_CHANGE_PROP_SECURITY 132
|
||||
#define ADS_CHANGE_TREE_NAME 133
|
||||
#define ADS_CHECK_CONSOLE_OPERATOR 134
|
||||
#define ADS_COMPARE_ATTR_VALUE 135
|
||||
#define ADS_CREATE_PROPERTY 136
|
||||
#define ADS_CREATE_SUBORDINATE_REF 137
|
||||
#define ADS_DEFINE_ATTR_DEF 138
|
||||
#define ADS_DEFINE_CLASS_DEF 139
|
||||
#define ADS_DELETE_MEMBER 140
|
||||
#define ADS_DELETE_PROPERTY 141
|
||||
#define ADS_DS_NCP_RELOAD 142
|
||||
#define ADS_RESET_DS_COUNTERS 143
|
||||
#define ADS_FRAG_REQUEST 144
|
||||
#define ADS_INSPECT_ENTRY 145
|
||||
#define ADS_LIST_CONTAINABLE_CLASSES 146
|
||||
#define ADS_LIST_PARTITIONS 147
|
||||
#define ADS_LIST_SUBORDINATES 148
|
||||
#define ADS_MERGE_TREE 149
|
||||
#define ADS_MODIFY_CLASS_DEF 150
|
||||
#define ADS_MOVE_TREE 151
|
||||
#define ADS_OPEN_STREAM 152
|
||||
#define ADS_READ 153
|
||||
#define ADS_READ_REFERENCES 154
|
||||
#define ADS_REMOVE_ATTR_DEF 155
|
||||
#define ADS_REMOVE_CLASS_DEF 156
|
||||
#define ADS_REMOVE_ENTRY_DIR 157
|
||||
#define ADS_RESTORE_ENTRY 158
|
||||
#define ADS_START_JOIN 159
|
||||
#define ADS_START_UPDATE_REPLICA 160
|
||||
#define ADS_START_UPDATE_SCHEMA 161
|
||||
#define ADS_SYNC_PARTITION 162
|
||||
#define ADS_SYNC_SCHEMA 163
|
||||
#define ADS_UPDATE_REPLICA 164
|
||||
#define ADS_UPDATE_SCHEMA 165
|
||||
#define ADS_VERIFY_PASSWORD 166
|
||||
#define ADS_ABORT_JOIN 167
|
||||
#define ADS_MUTATE_ENTRY 169
|
||||
#define ADS_MERGE_ENTRIES 170
|
||||
|
||||
#define ADS_END_UPDATE_REPLICA 171
|
||||
#define ADS_END_UPDATE_SCHEMA 172
|
||||
#define ADS_CREATE_BACKLINK 173
|
||||
#define ADS_MODIFY_ENTRY 174
|
||||
#define ADS_REMOVE_BACKLINK 175
|
||||
#define ADS_NEW_SCHEMA_EPOCH 176
|
||||
#define ADS_CLOSE_BINDERY 177
|
||||
#define ADS_OPEN_BINDERY 178
|
||||
#define ADS_CLOSE_STREAM 179
|
||||
/*
|
||||
180 - 188 reserved
|
||||
*/
|
||||
#define ADS_NLM_FIRST 189
|
||||
#define ADS_NLS_NLM 189
|
||||
#define ADS_NLM_LAST 199
|
||||
#define ADS_LAST_PLUS_ONE 200 /* Must be last one */
|
||||
/* end TNW additions */
|
||||
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif /* NWADEVNT_H */
|
306
LoginCapture/windows/external/xplatapi/include/nwafp.h
vendored
Normal file
306
LoginCapture/windows/external/xplatapi/include/nwafp.h
vendored
Normal file
@ -0,0 +1,306 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwafp.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:06 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWAFP_H )
|
||||
#define NWAFP_H
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
# include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** This is the structure that the application expects to see. Note that the
|
||||
long name and short name will be null terminated, and one extra byte has
|
||||
been added to long name and short name to assure word alignment **/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 entryID;
|
||||
nuint32 parentID;
|
||||
nuint16 attributes;
|
||||
nuint32 dataForkLength;
|
||||
nuint32 resourceForkLength;
|
||||
nuint16 numOffspring;
|
||||
nuint16 creationDate;
|
||||
nuint16 accessDate;
|
||||
nuint16 modifyDate;
|
||||
nuint16 modifyTime;
|
||||
nuint16 backupDate;
|
||||
nuint16 backupTime;
|
||||
nuint8 finderInfo[32];
|
||||
nstr8 longName[34];
|
||||
nuint32 ownerID;
|
||||
nstr8 shortName[14];
|
||||
nuint16 accessPrivileges;
|
||||
nuint8 proDOSInfo[6];
|
||||
} AFPFILEINFO, NW_AFP_FILE_INFO;
|
||||
|
||||
/** This is the structure that is actually returned from the NCP call **/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 entryID;
|
||||
nuint32 parentID;
|
||||
nuint16 attributes;
|
||||
nuint32 dataForkLength;
|
||||
nuint32 resourceForkLength;
|
||||
nuint16 numOffspring;
|
||||
nuint16 creationDate;
|
||||
nuint16 accessDate;
|
||||
nuint16 modifyDate;
|
||||
nuint16 modifyTime;
|
||||
nuint16 backupDate;
|
||||
nuint16 backupTime;
|
||||
nuint8 finderInfo[32];
|
||||
nstr8 longName[32];
|
||||
nuint32 ownerID;
|
||||
nstr8 shortName[12];
|
||||
nuint16 accessPrivileges;
|
||||
nuint8 proDOSInfo[6];
|
||||
} RECPKT_AFPFILEINFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint16 attributes;
|
||||
nuint16 creationDate;
|
||||
nuint16 accessDate;
|
||||
nuint16 modifyDate;
|
||||
nuint16 modifyTime;
|
||||
nuint16 backupDate;
|
||||
nuint16 backupTime;
|
||||
nuint8 finderInfo[32];
|
||||
nuint8 proDOSInfo[6];
|
||||
} AFPSETINFO, NW_AFP_SET_INFO;
|
||||
|
||||
|
||||
/* the following are the constants that can be used for requestMasks
|
||||
in NWAFPScanFileInformation and NWAFPGetFileInformation.
|
||||
*/
|
||||
#ifndef AFP_GET_ATTRIBUTES
|
||||
#define AFP_GET_ATTRIBUTES 0x0001
|
||||
#define AFP_GET_PARENT_ID 0x0002
|
||||
#define AFP_GET_CREATE_DATE 0x0004
|
||||
#define AFP_GET_ACCESS_DATE 0x0008
|
||||
#define AFP_GET_MODIFY_DATETIME 0x0010
|
||||
#define AFP_GET_BACKUP_DATETIME 0x0020
|
||||
#define AFP_GET_FINDER_INFO 0x0040
|
||||
#define AFP_GET_LONG_NAME 0x0080
|
||||
#define AFP_GET_ENTRY_ID 0x0100
|
||||
#define AFP_GET_DATA_LEN 0x0200
|
||||
#define AFP_GET_RESOURCE_LEN 0x0400
|
||||
#define AFP_GET_NUM_OFFSPRING 0x0800
|
||||
#define AFP_GET_OWNER_ID 0x1000
|
||||
#define AFP_GET_SHORT_NAME 0x2000
|
||||
#define AFP_GET_ACCESS_RIGHTS 0x4000
|
||||
#define AFP_GET_PRO_DOS_INFO 0x8000
|
||||
#define AFP_GET_ALL 0xffff
|
||||
#endif
|
||||
|
||||
/*
|
||||
The following constants are used for NWAFPSetFileInformation
|
||||
*/
|
||||
#ifndef AFP_SET_ATTRIBUTES
|
||||
#define AFP_SET_ATTRIBUTES 0x0001
|
||||
#define AFP_SET_CREATE_DATE 0x0004
|
||||
#define AFP_SET_ACCESS_DATE 0x0008
|
||||
#define AFP_SET_MODIFY_DATETIME 0x0010
|
||||
#define AFP_SET_BACKUP_DATETIME 0x0020
|
||||
#define AFP_SET_FINDER_INFO 0x0040
|
||||
#define AFP_SET_PRO_DOS_INFO 0x8000
|
||||
#endif
|
||||
|
||||
#ifndef AFP_SA_HIDDEN
|
||||
#define AFP_SA_NORMAL 0x0000
|
||||
#define AFP_SA_HIDDEN 0x0100
|
||||
#define AFP_SA_SYSTEM 0x0200
|
||||
#define AFP_SA_SUBDIR 0x0400
|
||||
#define AFP_SA_FILES 0x0800
|
||||
#define AFP_SA_ALL 0x0F00
|
||||
#endif
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPAllocTemporaryDirHandle
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPEntryID,
|
||||
const nstr8 N_FAR * AFPPathString,
|
||||
NWDIR_HANDLE N_FAR * dirHandle,
|
||||
pnuint8 accessRights
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPCreateDirectory
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPEntryID,
|
||||
pnuint8 finderInfo,
|
||||
pnstr8 AFPPathString,
|
||||
pnuint32 newAFPEntryID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPCreateFile
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPEntryID,
|
||||
nuint8 delExistingFile,
|
||||
pnuint8 finderInfo,
|
||||
pnstr8 AFPPathString,
|
||||
pnuint32 newAFPEntryID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPDelete
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPEntryID,
|
||||
const nstr8 N_FAR * AFPPathString
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPGetEntryIDFromName
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPEntryID,
|
||||
const nstr8 N_FAR * AFPPathString,
|
||||
pnuint32 newAFPEntryID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPGetEntryIDFromHandle
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nuint8 N_FAR * NWHandle,
|
||||
pnuint16 volNum,
|
||||
pnuint32 AFPEntryID,
|
||||
pnuint8 forkIndicator
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPGetEntryIDFromPathName
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint32 AFPEntryID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPGetFileInformation
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPEntryID,
|
||||
nuint16 reqMask,
|
||||
const nstr8 N_FAR * AFPPathString,
|
||||
nuint16 structSize,
|
||||
NW_AFP_FILE_INFO N_FAR * AFPFileInfo
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPDirectoryEntry
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPOpenFileFork
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPEntryID,
|
||||
nuint8 forkIndicator,
|
||||
nuint8 accessMode,
|
||||
const nstr8 N_FAR * AFPPathString,
|
||||
pnuint32 fileID,
|
||||
pnuint32 forkLength,
|
||||
pnuint8 NWHandle,
|
||||
NWFILE_HANDLE N_FAR * DOSFileHandle
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPRename
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPSourceEntryID,
|
||||
nuint32 AFPDestEntryID,
|
||||
const nstr8 N_FAR * AFPSrcPath,
|
||||
const nstr8 N_FAR * AFPDstPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPScanFileInformation
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPEntryID,
|
||||
pnuint32 AFPLastSeenID,
|
||||
nuint16 searchMask,
|
||||
nuint16 reqMask,
|
||||
const nstr8 N_FAR * AFPPathString,
|
||||
nuint16 structSize,
|
||||
NW_AFP_FILE_INFO N_FAR * AFPFileInfo
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPSetFileInformation
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum,
|
||||
nuint32 AFPBaseID,
|
||||
nuint16 reqMask,
|
||||
const nstr8 N_FAR * AFPPathString,
|
||||
nuint16 structSize,
|
||||
NW_AFP_SET_INFO N_FAR * AFPSetInfo
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPSupported
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint16 volNum
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAFPASCIIZToLenStr
|
||||
(
|
||||
pnstr8 pbstrDstStr,
|
||||
const nstr8 N_FAR * pbstrSrcStr
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif
|
329
LoginCapture/windows/external/xplatapi/include/nwalias.h
vendored
Normal file
329
LoginCapture/windows/external/xplatapi/include/nwalias.h
vendored
Normal file
@ -0,0 +1,329 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwalias.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:08 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWALIAS_H )
|
||||
#define NWALIAS_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#define FILE_ATTRIBUTES_MASK nuint32
|
||||
#define NWACCESS_MODE nuint8
|
||||
#define NWACCESS_RIGHTS nuint8
|
||||
#define NWACCT_BALANCE nint32
|
||||
#define NWACCT_HOLDS nuint16
|
||||
#define NWACCT_LIMIT nint32
|
||||
#define NWADDR_LEN nuint8
|
||||
#define NWADDR_TYPE nuint8
|
||||
#define NWAES_COUNT nuint16
|
||||
#define NWAFP_ACCESS_PRIVILEGES nuint16
|
||||
#define NWAFP_ENTRY_ID nuint32
|
||||
#define NWAFP_FILE_ATTRIBUTES nuint16
|
||||
#define NWAFP_FILE_INFO AFPFILEINFO
|
||||
#define NWAFP_FORK_LEN nuint32
|
||||
#define NWAFP_NUM_OFFSPRING nuint16
|
||||
#define NWAFP_SET_INFO AFPSETINFO
|
||||
#define NWAPP_NUM nuint16
|
||||
#define NWASN1_ID Asn1ID_T
|
||||
#define NWATTR nuint32
|
||||
#define NWATTRIBUTES nuint32
|
||||
#define NWATTR_INFO Attr_Info_T
|
||||
#define NWAUDIT_BUF_SIZE nuint16
|
||||
#define NWAUDIT_CONN_ID nuint32
|
||||
#define NWAUDIT_CONTAINER_BIT_MAP nuint32
|
||||
#define NWAUDIT_DATA_LEN nuint32
|
||||
#define NWAUDIT_DATE_TIME nuint32
|
||||
#define NWAUDIT_DS_FLAG nint16
|
||||
#define NWAUDIT_EVENT nuint16
|
||||
#define NWAUDIT_FILE_CODE nint16
|
||||
#define NWAUDIT_FILE_HANDLE nuint32
|
||||
#define NWAUDIT_FLAGS nuint32
|
||||
#define NWAUDIT_KEY_BUF pnuint8
|
||||
#define NWAUDIT_LEVEL nuint8
|
||||
#define NWAUDIT_NAME_SPACE nuint32
|
||||
#define NWAUDIT_OBJ_SECURITY nuint32
|
||||
#define NWAUDIT_PASSWORD pnuint8
|
||||
#define NWAUDIT_PROCESS_ID nuint32
|
||||
#define NWAUDIT_QUEUE_TYPE nuint32
|
||||
#define NWAUDIT_RECORD_ID nuint32
|
||||
#define NWAUDIT_REC_NUM nuint32
|
||||
#define NWAUDIT_REPLICA_NUM nuint16
|
||||
#define NWAUDIT_SIZE NWSIZE
|
||||
#define NWAUDIT_STATUS_CODE nuint32
|
||||
#define NWAUDIT_TRUSTEE_RIGHTS nuint32
|
||||
#define NWAUDIT_VOL_NUM nuint32
|
||||
#define NWAUGMENT nuint16 /* AN ADDITIONAL FLAG SIZE */
|
||||
#define NWBITS nuint32
|
||||
#define NWBROADCAST_MODE nuint16
|
||||
#define NWBUF_SIZE nuint16
|
||||
#define NWCHANGE_BITS nuint32
|
||||
#define NWCHANGE_TYPE nuint32
|
||||
#define NWCHARGE_AMOUNT nint32
|
||||
#define NWCLASS_INFO Class_Info_T
|
||||
#define NWCONFIG_DEFAULT_VALUE nint32
|
||||
#define NWCONFIG_ELEMENT_NUM nint16
|
||||
#define NWCONFIG_PARAM_TYPE nint16
|
||||
#define NWCONN_FLAGS nuint16
|
||||
#define NWCONN_NUM_WORD nuint16
|
||||
#define NWCONN_TYPE nuint8
|
||||
#define NWCOUNT nuint32
|
||||
#define NWCTLR_NUM nuint8
|
||||
#define NWCTLR_TYPE nuint8
|
||||
#define NWCURRENT_REC nuint16
|
||||
#define NWDATA_STREAM nuint32
|
||||
#define NWDATE nuint16
|
||||
#define NWDATE_TIME nuint32
|
||||
#define NWDELETE_TIME nuint32
|
||||
#define NWDENY_COUNT nuint16
|
||||
#define NWDEVICE_ID nuint16
|
||||
#define NWDIR_ATTRIBUTES nuint8
|
||||
#define NWDIR_BASE nuint32
|
||||
#define NWDIR_ENTRY nuint32
|
||||
#define NWDIR_ID nuint8
|
||||
#define NWDIR_NUM nuint16
|
||||
#define NWDIR_SPACE nuint32
|
||||
#define NWDIR_STAMP nuint16
|
||||
#define NWDIR_TRUSTEE_RIGHTS nuint16
|
||||
#define NWDIR_VOL nuint8
|
||||
#define NWDISK_CHANNEL nuint8
|
||||
#define NWDISK_DRV_TYPE nuint8
|
||||
#define NWDISK_FLAGS nuint16
|
||||
#define NWDISK_NUM nuint8
|
||||
#define NWDISK_SPACE nuint32
|
||||
#define NWDISK_TYPE nuint8
|
||||
#define NWDISTANCE nuint16
|
||||
#define NWDMA nuint8
|
||||
#define NWDM_FLAGS nuint32
|
||||
#define NWDRIVE_NUM nuint16
|
||||
#define NWDRIVE_NUMBER nuint8
|
||||
#define NWDRV_COMMAND nuint32
|
||||
#define NWDRV_CONFIG nuint32
|
||||
#define NWDRV_FLAGS nuint16
|
||||
#define NWDRV_ID nuint16
|
||||
#define NWDRV_LINK nuint32
|
||||
#define NWDRV_MEM nuint32
|
||||
#define NWDRV_NAME nuint32
|
||||
#define NWDRV_TAG nuint32
|
||||
#define NWDRV_TYPE nuint32
|
||||
#define NWDRV_VERSION nuint8
|
||||
#define NWDSLEN nuint32
|
||||
#define NWDS_BUFFER Buf_T
|
||||
#define NWDS_EVENT nuint32
|
||||
#define NWDS_FILTER_CURSOR Filter_Cursor_T
|
||||
#define NWDS_FILTER_LEVEL nuint16
|
||||
#define NWDS_FILTER_NODE Filter_Node_T
|
||||
#define NWDS_FLAGS nuint32
|
||||
#define NWDS_ID nint16
|
||||
#define NWDS_INTERVAL nuint32
|
||||
#define NWDS_ITERATION nint32
|
||||
#define NWDS_LOGIN_FILE nint16
|
||||
#define NWDS_NUM_OBJ nint32
|
||||
#define NWDS_OPERATION nuint32
|
||||
#define NWDS_PRIVILEGES nuint32
|
||||
#define NWDS_SEARCH_SCOPE nuint16
|
||||
#define NWDS_SESSION_KEY NWDS_Session_Key_T
|
||||
#define NWDS_SIZE nuint32
|
||||
#define NWDS_SYNTAX_FLAGS nint16
|
||||
#define NWDS_TOKEN nuint16
|
||||
#define NWDS_TYPE nuint32
|
||||
#define NWDS_TYPE_LEVEL nuint32
|
||||
#define NWDS_VALIDITY nuint32
|
||||
#define NWDS_VALUE nuint32
|
||||
#define NWEA NW_EA_HANDLE
|
||||
#define NWEA_HANDLE nuint32
|
||||
#define NWEA_KEY nuint16
|
||||
#define NWEA_KEY_LEN nuint16
|
||||
#define NWEA_KEY_OFFSET nuint16
|
||||
#define NWEA_SCAN NW_EA_FF_STRUCT
|
||||
#define NWECB_CANCEL_COUNT nuint16
|
||||
#define NWELEMENT_VALUE nint16
|
||||
#define NWEMAIL_TYPE nuint32
|
||||
#define NWFACTOR nuint32
|
||||
#define NWFAT nuint32
|
||||
#define NWFILE_ATTR nuint8
|
||||
#define NWFILE_LEN nuint32
|
||||
#define NWFILE_MODE nuint8
|
||||
#define NWFILE_SYS_ID nuint32
|
||||
#define NWFINDER_INFO nuint8
|
||||
#define NWFLAGS nuint8
|
||||
#define NWFORM_NUM nuint8
|
||||
#define NWFORM_TYPE nuint16
|
||||
#define NWFRAG_SIZE nuint16
|
||||
#define NWFSE_CONN_TYPE nuint32
|
||||
#define NWFSE_FLAGS nuint32
|
||||
#define NWGLT_FAIL_COUNT nuint16
|
||||
#define NWHANDLE nuint8
|
||||
#define NWHF_START nuint32
|
||||
#define NWHOLDS_INFO HOLDS_INFO
|
||||
#define NWHOLDS_STATUS HOLDS_STATUS
|
||||
#define NWHOLD_AMOUNT nuint32
|
||||
#define NWHOLD_CANCEL_AMOUNT nuint32
|
||||
#define NWINFO_LEVEL nuint32
|
||||
#define NWINTERRUPT nuint8
|
||||
#define NWIO_MEM nuint16
|
||||
#define NWJOB_FLAGS nuint16
|
||||
#define NWJOB_HANDLE nuint32
|
||||
#define NWJOB_POSITION nuint8
|
||||
#define NWJOB_POSITION2 nuint16
|
||||
#define NWJOB_TYPE nuint16
|
||||
#define NWLAN_NUM nuint8
|
||||
#define NWLAST_RECORD nint16
|
||||
#define NWLEN nuint32
|
||||
#define NWLENGTH nuint16
|
||||
#define NWLOCAL_FILE_HANDLE nuint16 /* FOR DOS, OS/2, AND WINDOWS */
|
||||
#define NWLOCAL_MODE nuint16
|
||||
#define NWLOCAL_SCOPE nuint16
|
||||
#define NWLOCK_COUNT nuint16
|
||||
#define NWLOCK_DATA_STREAM nuint8
|
||||
#define NWLOCK_STATE nuint8
|
||||
#define NWLOCK_TYPE nuint8
|
||||
#define NWLOCK_TYPE nuint8
|
||||
#define NWLOGIN_TIME nuint8[7]
|
||||
#define NWLPT nuint8
|
||||
#define NWMAX_PACKET_SIZE nuint16
|
||||
#define NWMEDIA_MASK nuint32
|
||||
#define NWMEDIA_TYPE nuint32
|
||||
#define NWMEM_OFFSET nuint16
|
||||
#define NWMINUTES nuint8
|
||||
#define NWMODULE_ID nuint32
|
||||
#define NWNAME pnuint8
|
||||
#define NWNAME_LEN nuint8
|
||||
#define NWNAME_SPACE nuint8
|
||||
#define NWNAME_SPACE_TYPE nuint32
|
||||
#define NWNET_ADDR nuint8
|
||||
#define NWNET_ADDR_LEN nuint32
|
||||
#define NWNET_ADDR_TYPE nuint32
|
||||
#define NWNEXT_REQUEST nuint16
|
||||
#define NWNLM_ID nuint32
|
||||
#define NWNLM_TYPE nuint32
|
||||
#define NWNOTE_TYPE nuint16
|
||||
#define NWNS_ACCESS_MODE nuint16
|
||||
#define NWNS_ACCESS_RIGHTS nuint16
|
||||
#define NWNS_ATTR nuint16
|
||||
#define NWNS_BITS nuint16
|
||||
#define NWNS_DATA_STREAM nuint8
|
||||
#define NWNS_DATA_STREAM2 nuint16
|
||||
#define NWNS_FLAGS nuint16
|
||||
#define NWNS_HANDLE nuint32
|
||||
#define NWNS_LIST_SIZE nuint8
|
||||
#define NWNS_MASK nuint32
|
||||
#define NWNS_NUM nuint8
|
||||
#define NWNS_TYPE nuint16
|
||||
#define NWNUM nuint32
|
||||
#define NWNUMBER nuint16
|
||||
#define NWNUMBER_ENTRIES nuint8
|
||||
#define NWNUM_BLOCKS nuint32
|
||||
#define NWNUM_BUFFERS nuint16
|
||||
#define NWNUM_BYTES nuint32
|
||||
#define NWNUM_CONNS nuint8
|
||||
#define NWNUM_COPIES nuint8
|
||||
#define NWNUM_DIR_ENTRIES nuint32
|
||||
#define NWNUM_DRIVES nuint8
|
||||
#define NWNUM_ELEMENTS nint16
|
||||
#define NWNUM_ENTRIES nuint16
|
||||
#define NWNUM_FORKS nuint8
|
||||
#define NWNUM_HEADS nuint8
|
||||
#define NWNUM_HOPS nuint16
|
||||
#define NWNUM_PACKETS nuint32
|
||||
#define NWNUM_REQUESTS nuint32
|
||||
#define NWNUM_SECTORS nuint8
|
||||
#define NWNUM_TRANSACTIONS nuint8
|
||||
#define NWOBJECT_INFO Object_Info_T
|
||||
#define NWOBJ_ID nuint32
|
||||
#define NWOBJ_TYPE nuint16
|
||||
#define NWOFFSET nuint32
|
||||
#define NWOPEN_COUNT nuint16
|
||||
#define NWOPTION_NUM nuint8
|
||||
#define NWOS_REVISION nuint16
|
||||
#define NWOS_VERSION nuint16
|
||||
#define NWPATH_SIZE nuint16
|
||||
#define NWPATH_VOL nuint8
|
||||
#define NWPOSITION nuint32
|
||||
#define NWPRINTER nuint16
|
||||
#define NWPRINT_FLAGS nuint16
|
||||
#define NWPRINT_TASK nuint32
|
||||
#define NWPROTOCOL_MASK nuint32
|
||||
#define NWPROTOCOL_VERSION nuint8
|
||||
#define NWPSTR pnstr
|
||||
#define NWQMS_HANDLE nuint32
|
||||
#define NWQMS_TASK nuint32
|
||||
#define NWREC_OFFSET nuint16
|
||||
#define NWREPLICA_NUM nint32
|
||||
#define NWREPLICA_TYPE nuint32
|
||||
#define NWREQUESTER_VERSION nuint8
|
||||
#define NWREQUEST_MASK nuint16
|
||||
#define NWRESERVED16 nuint32
|
||||
#define NWRESERVED32 nuint32
|
||||
#define NWREVISION nuint32
|
||||
#define NWRIGHTS nuint32
|
||||
#define NWRIGHTS_MASK nuint16
|
||||
#define NWSEARCH_ATTR nuint8
|
||||
#define NWSEARCH_ATTRIBUTES nuint16
|
||||
#define NWSEARCH_CONTEXT nuint16
|
||||
#define NWSEARCH_MASK nuint16
|
||||
#define NWSECONDS nuint32
|
||||
#define NWSEGMENT_DATA pnuint8
|
||||
#define NWSEGMENT_NUM nuint8
|
||||
#define NWSEM_HANDLE nuint32
|
||||
#define NWSEM_INT nint16
|
||||
#define NWSEM_VALUE nuint16
|
||||
#define NWSEQUENCE nuint32
|
||||
#define NWSEQUENCE_NUM nuint16
|
||||
#define NWSEQ_NUM nuint8
|
||||
#define NWSERVER_NAME_LEN nuint16
|
||||
#define NWSERVER_TYPE nuint16
|
||||
#define NWSERVICE_VERSION nuint8
|
||||
#define NWSESSION_ID nuint16
|
||||
#define NWSIZE nuint32
|
||||
#define NWSOCKET_COUNT nuint16
|
||||
#define NWSPX_COUNT nuint16
|
||||
#define NWSTATION_NUM nuint8
|
||||
#define NWSTATION_NUM2 nuint32
|
||||
#define NWSTATS_VERSION nuint8
|
||||
#define NWSTATUS nuint32
|
||||
#define NWSTRUCT_SIZE nuint16
|
||||
#define NWSUPPORT_LEVEL nuint8
|
||||
#define NWSYNTAX_ID nuint32
|
||||
#define NWSYNTAX_INFO Syntax_Info_T
|
||||
#define NWSYS_TIME nuint32
|
||||
#define NWTAB nuint8
|
||||
#define NWTASK nuint16
|
||||
#define NWTASK_COUNT nuint8
|
||||
#define NWTASK_NUM nuint16
|
||||
#define NWTASK_STATE nuint8
|
||||
#define NWTDS nuint16
|
||||
#define NWTDS_OFFSET nuint16
|
||||
#define NWTICKS nuint16
|
||||
#define NWTIME nuint16
|
||||
#define NWTRAN_TYPE nuint8
|
||||
#define NWTRUSTEE_SEQUENCE_NUM nuint16
|
||||
#define NWUSE_COUNT nuint16
|
||||
#define NWUTILIZATION nuint32
|
||||
#define NWVCONSOLE_REVISION nuint8
|
||||
#define NWVCONSOLE_VERSION nuint8
|
||||
#define NWVERSION nuint32
|
||||
#define NWVOL nuint32
|
||||
#define NWVOL_FLAGS nuint16
|
||||
#define NWVOL_NUM nuint16
|
||||
#define NWVOL_NUMBER nuint8
|
||||
#define NWVOL_TYPE nuint32
|
||||
#define TRUSTEE_RIGHTS nuint32
|
||||
|
||||
#endif /* NWALIAS_H */
|
60
LoginCapture/windows/external/xplatapi/include/nwapidef.h
vendored
Normal file
60
LoginCapture/windows/external/xplatapi/include/nwapidef.h
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwapidef.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:10 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWAPIDEF_H )
|
||||
#define NWAPIDEF_H
|
||||
|
||||
/* Miscellaneous string lengths (constant) */
|
||||
/* NOTE: These max values include a byte for null */
|
||||
#define NW_MAX_USER_NAME_LEN 49
|
||||
#define NW_MAX_VOLUME_NAME_LEN 17
|
||||
#define NW_MAX_SERVER_NAME_LEN 49
|
||||
#define NW_MAX_TREE_NAME_LEN 33
|
||||
#define NW_MAX_SERVICE_TYPE_LEN 49
|
||||
|
||||
/* Miscellaneous unicode string sizes in bytes (constant) */
|
||||
|
||||
#define NW_MAX_USER_NAME_BYTES 2 * NW_MAX_USER_NAME_LEN
|
||||
#define NW_MAX_VOLUME_NAME_BYTES 2 * NW_MAX_VOLUME_NAME_LEN
|
||||
#define NW_MAX_SERVER_NAME_BYTES 2 * NW_MAX_SERVER_NAME_LEN
|
||||
#define NW_MAX_TREE_NAME_BYTES 2 * NW_MAX_TREE_NAME_LEN
|
||||
#define NW_MAX_SERVICE_TYPE_BYTES 2 * NW_MAX_SERVICE_TYPE_LEN
|
||||
|
||||
/* PrintFlags (nuint16 value) */
|
||||
#define NW_PRINT_FLAG_RELEASE 0x0001
|
||||
#define NW_PRINT_FLAG_SUPPRESS_FF 0x0002
|
||||
#define NW_PRINT_FLAG_TEXT_FILE 0x0004
|
||||
#define NW_PRINT_FLAG_PRINT_BANNER 0x0008
|
||||
#define NW_PRINT_FLAG_NOTIFY 0x0010
|
||||
|
||||
/* Print string lengths (constant) */
|
||||
#define NW_MAX_JOBDESCR_LEN 50
|
||||
#define NW_MAX_FORM_NAME_LEN 13
|
||||
#define NW_MAX_BANNER_NAME_LEN 13
|
||||
#define NW_MAX_QUEUE_NAME_LEN 65
|
||||
|
||||
/* Client Types : these are returned by NWGetClientType */
|
||||
#define NW_NETX_SHELL 1
|
||||
#define NW_VLM_REQ 2
|
||||
#define NW_CLIENT32 3
|
||||
#define NW_NT_REQ 4
|
||||
#define NW_OS2_REQ 5
|
||||
#define NW_NLM_REQ 6
|
||||
|
||||
#endif /* NWAPIDEF_INC */
|
560
LoginCapture/windows/external/xplatapi/include/nwaudit.h
vendored
Normal file
560
LoginCapture/windows/external/xplatapi/include/nwaudit.h
vendored
Normal file
@ -0,0 +1,560 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwaudit.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:13 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWAUDIT_H )
|
||||
#define NWAUDIT_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWADEVNT_H )
|
||||
#include "nwadevnt.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
/* Error codes */
|
||||
#define ERROR_AUDITING_NOT_INITIALIZED 224
|
||||
|
||||
/* bit map sizes */
|
||||
#define NW_AUDIT_NUMBER_EVENT_BITS 256
|
||||
#define NW_AUDIT_NUMBER_EVENT_BITS_TNW 512
|
||||
|
||||
/* audit ID types */
|
||||
#define AUDIT_ID_IS_TRUSTED_NETWARE 2
|
||||
#define AUDIT_ID_IS_CONTAINER 1
|
||||
#define AUDIT_ID_IS_VOLUME 0
|
||||
|
||||
/* audit flags */
|
||||
#define DiscardAuditRcdsOnErrorFlag 0x01
|
||||
#define ConcurrentVolAuditorAccess 0x02
|
||||
#define DualLevelPasswordsActive 0x04
|
||||
#define BroadcastWarningsToAllUsers 0x08
|
||||
#define LevelTwoPasswordSet 0x10
|
||||
#define ArchiveAuditFileOnErrorFlag 0x20
|
||||
|
||||
typedef struct tagNWADOpenStatus
|
||||
{
|
||||
nuint32 auditingStatus;
|
||||
nuint32 isTrustedNetWare;
|
||||
nuint32 trustedNetWareStatus;
|
||||
nuint32 reserved1; /* Future status */
|
||||
nuint32 reserved2;
|
||||
nuint32 reserved3;
|
||||
nuint32 reserved4;
|
||||
} NWADOpenStatus, N_FAR *pNWADOpenStatus;
|
||||
|
||||
typedef struct tagTIMESTAMP
|
||||
{
|
||||
nuint32 seconds;
|
||||
nuint16 replicaNumber;
|
||||
nuint16 event;
|
||||
} TIMESTAMP;
|
||||
|
||||
typedef struct tagNWAuditBitMap
|
||||
{
|
||||
nuint8 bitMap[NW_AUDIT_NUMBER_EVENT_BITS / 8];
|
||||
}NWAuditBitMap, N_FAR *pNWAuditBitMap;
|
||||
|
||||
typedef struct tagNWAuditBitMapTNW
|
||||
{
|
||||
nuint8 bitMap[NW_AUDIT_NUMBER_EVENT_BITS_TNW / 8];
|
||||
}NWAuditBitMapTNW, N_FAR *pNWAuditBitMapTNW;
|
||||
|
||||
typedef struct tagNWAuditFileList
|
||||
{
|
||||
nuint32 fileCreateDateTime[16];
|
||||
nuint32 fileSize[16];
|
||||
}NWAuditFileList, N_FAR *pNWAuditFileList;
|
||||
|
||||
typedef struct tagNWConfigHeader
|
||||
{
|
||||
nuint16 fileVersionDate;
|
||||
nuint8 auditFlags;
|
||||
nuint8 errMsgDelayMinutes;
|
||||
nuint8 reserved1[16];
|
||||
nuint32 auditFileMaxSize;
|
||||
nuint32 auditFileSizeThreshold;
|
||||
nuint32 auditRecordCount;
|
||||
nuint32 historyRecordCount;
|
||||
nuint8 reserved2[16];
|
||||
nuint32 reserved3[3];
|
||||
nuint8 auditEventBitMap[NW_AUDIT_NUMBER_EVENT_BITS / 8];
|
||||
nuint32 auditFileCreationDateTime;
|
||||
nuint8 reserved4[8];
|
||||
nuint16 auditFlags2;
|
||||
nuint16 fileVersionDate2;
|
||||
nuint8 fileArchiveDays;
|
||||
nuint8 fileArchiveHour;
|
||||
nuint8 numOldAuditFilesToKeep;
|
||||
nuint8 reserved5;
|
||||
nuint32 headerChecksum;
|
||||
nuint32 headerModifiedCounter;
|
||||
nuint32 reserved6;
|
||||
/* Trusted NetWare uses the following two fields */
|
||||
nuint8 newBitMap[64]; /* Tusted NetWare uses this bit map instead of volumeAuditEventBitMap above */
|
||||
nuint8 reserved7[64];
|
||||
} NWConfigHeader, N_FAR *pNWConfigHeader;
|
||||
|
||||
typedef struct tagNWDSContainerConfigHdr
|
||||
{
|
||||
nuint16 fileVersionDate;
|
||||
nuint8 auditFlags;
|
||||
nuint8 errMsgDelayMinutes;
|
||||
nuint32 containerID;
|
||||
nuint32 reserved1;
|
||||
TIMESTAMP creationTS;
|
||||
nuint32 bitMap;
|
||||
nuint32 auditFileMaxSize;
|
||||
nuint32 auditFileSizeThreshold;
|
||||
nuint32 auditRecordCount;
|
||||
nuint16 replicaNumber;
|
||||
nuint8 enabledFlag;
|
||||
nuint8 fileArchiveDays;
|
||||
nuint8 fileArchiveHour;
|
||||
nuint8 numOldFilesToKeep;
|
||||
nuint16 numberReplicaEntries;
|
||||
nuint32 auditFileCreationDateTime;
|
||||
nuint8 reserved2[8];
|
||||
nuint32 partitionID;
|
||||
nuint32 headerChecksum;
|
||||
nuint32 reserved3[4];
|
||||
nuint32 auditDisabledCounter;
|
||||
nuint32 auditEnabledCounter;
|
||||
nuint8 reserved4[32];
|
||||
nuint32 hdrModifiedCounter;
|
||||
nuint32 fileResetCounter;
|
||||
/* Trusted NetWare uses the following two fields */
|
||||
nuint8 newBitMap[64]; /* Tusted NetWare uses this bit map */
|
||||
nuint8 reserved5[64];
|
||||
} NWDSContainerConfigHdr, N_FAR *pNWDSContainerConfigHdr;
|
||||
|
||||
typedef struct tagNWAuditStatus
|
||||
{
|
||||
nuint16 auditingVersionDate;
|
||||
nuint16 auditFileVersionDate;
|
||||
nuint32 auditingEnabledFlag;
|
||||
nuint32 auditFileSize;
|
||||
nuint32 modifiedCounter;
|
||||
nuint32 auditFileMaxSize;
|
||||
nuint32 auditFileSizeThreshold;
|
||||
nuint32 auditRecordCount;
|
||||
nuint32 auditingFlags;
|
||||
} NWAuditStatus, N_FAR *pNWAuditStatus;
|
||||
|
||||
typedef struct tagNWAuditRecord
|
||||
{
|
||||
nuint32 recordLength;
|
||||
pnuint8 record;
|
||||
} NWAuditRecord, N_FAR *pNWAuditRecord;
|
||||
|
||||
typedef struct tagNWADAuditPolicy
|
||||
{
|
||||
nuint16 policyVersionDate;
|
||||
nuint16 reserved;
|
||||
nuint8 auditFlags[4];
|
||||
nuint32 auditFileMaxSize;
|
||||
nuint32 auditFileThresholdSize;
|
||||
nuint8 fileArchiveDays;
|
||||
nuint8 fileArchiveHour;
|
||||
nuint8 numOldAuditFilesToKeep;
|
||||
nuint8 userRestrictionFlag;
|
||||
nuint32 modifiedCounter;
|
||||
nuint32 auditOverflowFileSize;
|
||||
nuint32 reservedLong;
|
||||
nuint8 auditedEventBitMap[256];
|
||||
} NWADAuditPolicy, N_FAR *pNWADAuditPolicy;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
N_EXTERN_LIBRARY( void )
|
||||
NWGetNWADVersion
|
||||
(
|
||||
pnuint8 majorVersion,
|
||||
pnuint8 minorVersion,
|
||||
pnuint8 revisionLevel,
|
||||
pnuint8 betaReleaseLevel
|
||||
);
|
||||
|
||||
/* allocate auditHandle for use in other Auditing calls */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADOpen
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
pnptr auditHandle, /* allocate auditHandle */
|
||||
pNWADOpenStatus openStatus
|
||||
);
|
||||
|
||||
/* free auditHandle and NULL the pointer */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADClose
|
||||
(
|
||||
pnptr auditHandle /* free auditHandle */
|
||||
);
|
||||
|
||||
#define NWGetVolumeAuditStats(a, b, c, d) \
|
||||
NWADGetStatus(a, AUDIT_ID_IS_VOLUME, b, c, d)
|
||||
#define NWDSGetContainerAuditStats(a, b, c, d) \
|
||||
NWADGetStatus(a, AUDIT_ID_IS_CONTAINER, b, c, d)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADGetStatus
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
pNWAuditStatus auditStatus,
|
||||
nuint16 bufferSize
|
||||
);
|
||||
|
||||
#define NWGetAuditingFlags(a, b, c, d) \
|
||||
NWADGetFlags(a, AUDIT_ID_IS_VOLUME, b, c, d)
|
||||
#define NWDSGetAuditingFlags(a, b, c, d) \
|
||||
NWADGetFlags(a, AUDIT_ID_IS_CONTAINER, b, c, d)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADGetFlags
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
pnuint8 flags
|
||||
);
|
||||
|
||||
#define NWLoginAsVolumeAuditor(a, b, c, d) \
|
||||
NWADLogin(a, AUDIT_ID_IS_VOLUME, b, c, d)
|
||||
#define NWDSLoginAsContainerAuditor(a, b, c, d) \
|
||||
NWADLogin(a, AUDIT_ID_IS_CONTAINER, b, c, d)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADLogin
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
pnuint8 password
|
||||
);
|
||||
|
||||
#define NWInitAuditLevelTwoPassword NWADInitLevelTwoPassword
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADInitLevelTwoPassword
|
||||
(
|
||||
nptr auditHandle,
|
||||
pnuint8 password
|
||||
);
|
||||
|
||||
#define NWLogoutAsVolumeAuditor(a, b, c) \
|
||||
NWADLogout(a, AUDIT_ID_IS_VOLUME, b, c)
|
||||
#define NWDSLogoutAsContainerAuditor(a, b, c) \
|
||||
NWADLogout(a, AUDIT_ID_IS_CONTAINER, b, c)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADLogout
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle
|
||||
);
|
||||
|
||||
#define NWChangeAuditorPassword(a, b, c, d, e) \
|
||||
NWADChangePassword(a, AUDIT_ID_IS_VOLUME, b, c, d, e)
|
||||
#define NWDSChangeAuditorPassword(a, b, c, d, e) \
|
||||
NWADChangePassword(a, AUDIT_ID_IS_CONTAINER, b, c, d, e)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADChangePassword
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
pnuint8 newPassword,
|
||||
nuint8 level
|
||||
);
|
||||
|
||||
#define NWCheckAuditAccess(a, b) \
|
||||
NWADCheckAccess(a, AUDIT_ID_IS_VOLUME, b)
|
||||
#define NWDSCheckAuditAccess(a, b) \
|
||||
NWADCheckAccess(a, AUDIT_ID_IS_CONTAINER, b)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADCheckAccess
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID
|
||||
);
|
||||
|
||||
#define NWCheckAuditLevelTwoAccess(a, b, c) \
|
||||
NWADCheckLevelTwoAccess(a, AUDIT_ID_IS_VOLUME, b, c)
|
||||
#define NWDSCheckAuditLevelTwoAccess(a, b, c) \
|
||||
NWADCheckLevelTwoAccess(a, AUDIT_ID_IS_CONTAINER, b, c)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADCheckLevelTwoAccess
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle
|
||||
);
|
||||
|
||||
#define NWEnableAuditingOnVolume(a, b, c) \
|
||||
NWADEnable(a, AUDIT_ID_IS_VOLUME, b, c)
|
||||
#define NWDSEnableAuditingOnContainer(a, b, c) \
|
||||
NWADEnable(a, AUDIT_ID_IS_CONTAINER, b, c)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADEnable
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle
|
||||
);
|
||||
|
||||
#define NWDisableAuditingOnVolume(a, b, c) \
|
||||
NWADDisable(a, AUDIT_ID_IS_VOLUME, b, c)
|
||||
#define NWDSDisableAuditingOnContainer(a, b, c) \
|
||||
NWADDisable(a, AUDIT_ID_IS_CONTAINER, b, c)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADDisable
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle
|
||||
);
|
||||
|
||||
#define NWIsUserBeingAudited(a, b, c, d) \
|
||||
NWADIsObjectAudited(a, AUDIT_ID_IS_VOLUME, b, d)
|
||||
#define NWDSIsObjectBeingAudited(a, b, c) \
|
||||
NWADIsObjectAudited(a, AUDIT_ID_IS_CONTAINER, b, c)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADIsObjectAudited
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nuint32 userObjectID
|
||||
);
|
||||
|
||||
#define NWAddAuditProperty(a, b, c, d) \
|
||||
NWADChangeObjectProperty(a, AUDIT_ID_IS_VOLUME, b, c, d, 1)
|
||||
#define NWRemoveAuditProperty(a, b, c, d) \
|
||||
NWADChangeObjectProperty(a, AUDIT_ID_IS_VOLUME, b, c, d, 0)
|
||||
#define NWDSChangeObjectAuditProperty(a, b, c, d, e) \
|
||||
NWADChangeObjectProperty(a, AUDIT_ID_IS_CONTAINER, b, c, d, e)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADChangeObjectProperty
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
nuint32 objectID,
|
||||
nuint8 auditFlag /* 0:remove 1:add */
|
||||
);
|
||||
|
||||
/* Volume audit call only */
|
||||
#define NWReadAuditingBitMap(a, b, c, d, e)\
|
||||
NWADReadBitMap(a, b, d, e)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADReadBitMap
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditID, /* can only be volume */
|
||||
NWAuditBitMap N_FAR *buffer,
|
||||
nuint16 bufferSize
|
||||
);
|
||||
|
||||
#define NWReadAuditConfigHeader(a, b, c, d, e) \
|
||||
NWADReadConfigHeader(a, AUDIT_ID_IS_VOLUME, b, c, d, e)
|
||||
#define NWDSReadAuditConfigHeader(a, b, c, d, e) \
|
||||
NWADReadConfigHeader(a, AUDIT_ID_IS_CONTAINER, b, c, d, e)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADReadConfigHeader
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
nptr buffer,
|
||||
nuint16 bufferSize
|
||||
);
|
||||
|
||||
/* volume auditing only */
|
||||
#define NWWriteAuditingBitMap(a, b, c, d) \
|
||||
NWADWriteBitMap(a, b, c, d)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADWriteBitMap
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditID, /* can only be volume */
|
||||
nptr auditHandle,
|
||||
NWAuditBitMap N_FAR *buffer
|
||||
);
|
||||
|
||||
#define NWWriteAuditConfigHeader(a, b, c, d) \
|
||||
NWADWriteConfigHeader(a, AUDIT_ID_IS_VOLUME, b, c, d)
|
||||
#define NWDSWriteAuditConfigHeader(a, b, c, d) \
|
||||
NWADWriteConfigHeader(a, AUDIT_ID_IS_CONTAINER, b, c, d)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADWriteConfigHeader
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
pNWConfigHeader buffer
|
||||
);
|
||||
|
||||
#define NWResetAuditingFile(a, b, c) \
|
||||
NWADResetFile(a, AUDIT_ID_IS_VOLUME, b, c)
|
||||
#define NWDSResetAuditingFile(a, b, c) \
|
||||
NWADResetFile(a, AUDIT_ID_IS_CONTAINER, b, c)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADResetFile
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle
|
||||
);
|
||||
|
||||
/* NWADOpenReadFile will only work with NetWare version 4.10 or newer */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADOpenRecordFile
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
nint16 fileCode,
|
||||
pnptr recordHandle /* Allocate record handle */
|
||||
);
|
||||
|
||||
/* NWADInitRead will only work with NetWare version 4.10 or newer */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADReadRecord
|
||||
(
|
||||
nptr recordHandle, /* Allocated in NWADOpenRecordFile */
|
||||
nuint16 maxSize,
|
||||
nint16 direction,
|
||||
pnuint8 buffer,
|
||||
pnuint16 bufferSize,
|
||||
pnuint8 eofFlag,
|
||||
pnuint32 offsetPtr
|
||||
);
|
||||
|
||||
/* NWADInitRead will only work with NetWare version 4.10 or newer */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADCloseRecordFile
|
||||
(
|
||||
pnptr recordHandle /* Free record handle */
|
||||
);
|
||||
|
||||
#define NWCloseOldAuditingFile(a, b, c) \
|
||||
NWADCloseOldFile(a, AUDIT_ID_IS_VOLUME, b, c)
|
||||
#define NWDSCloseOldAuditingFile(a, b, c) \
|
||||
NWADCloseOldFile(a, AUDIT_ID_IS_CONTAINER, b, c)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADCloseOldFile
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle
|
||||
);
|
||||
|
||||
#define NWDeleteOldAuditingFile(a, b, c) \
|
||||
NWADDeleteFile(a, AUDIT_ID_IS_VOLUME, b, c)
|
||||
#define NWDSDeleteOldAuditingFile(a, b, c) \
|
||||
NWADDeleteFile(a, AUDIT_ID_IS_CONTAINER, b, c)
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADDeleteFile
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle
|
||||
);
|
||||
|
||||
/* NetWare version 4.10 or newer */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADGetFileList
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
pNWAuditFileList fileList
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADDeleteOldFile
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
nuint32 fileCode
|
||||
);
|
||||
|
||||
/* Trusted NetWare and Volume Only */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADRestartVolumeAuditing
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID
|
||||
);
|
||||
|
||||
/* Trusted NetWare Only */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADSetPassword
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditIDType,
|
||||
nuint32 auditID,
|
||||
nptr auditHandle,
|
||||
pnuint8 newPassword
|
||||
);
|
||||
|
||||
/* Trusted NetWare Only */
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWADAppendExternalRecords
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 auditFileObjectID,
|
||||
nuint32 vendorID,
|
||||
nuint32 numberRecords,
|
||||
pNWAuditRecord recordsPtr
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif /* NWAUDIT_H */
|
402
LoginCapture/windows/external/xplatapi/include/nwbindry.h
vendored
Normal file
402
LoginCapture/windows/external/xplatapi/include/nwbindry.h
vendored
Normal file
@ -0,0 +1,402 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwbindry.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:15 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWBINDRY_H )
|
||||
#define NWBINDRY_H
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NUNICODE_H )
|
||||
#include "nunicode.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Bindery object types (in HIGH-LOW order) */
|
||||
#define OT_WILD 0xFFFF
|
||||
#define OT_UNKNOWN 0x0000
|
||||
#define OT_USER 0x0100
|
||||
#define OT_USER_GROUP 0x0200
|
||||
#define OT_PRINT_QUEUE 0x0300
|
||||
#define OT_FILE_SERVER 0x0400
|
||||
#define OT_JOB_SERVER 0x0500
|
||||
#define OT_GATEWAY 0x0600
|
||||
#define OT_PRINT_SERVER 0x0700
|
||||
#define OT_ARCHIVE_QUEUE 0x0800
|
||||
#define OT_ARCHIVE_SERVER 0x0900
|
||||
#define OT_JOB_QUEUE 0x0A00
|
||||
#define OT_ADMINISTRATION 0x0B00
|
||||
#define OT_NAS_SNA_GATEWAY 0x2100
|
||||
#define OT_REMOTE_BRIDGE_SERVER 0x2600
|
||||
#define OT_TCPIP_GATEWAY 0x2700
|
||||
#define OT_TREE_NAME 0x7802
|
||||
|
||||
/* Extended bindery object types */
|
||||
#define OT_TIME_SYNCHRONIZATION_SERVER 0x2D00
|
||||
#define OT_ARCHIVE_SERVER_DYNAMIC_SAP 0x2E00
|
||||
#define OT_ADVERTISING_PRINT_SERVER 0x4700
|
||||
#define OT_BTRIEVE_VAP 0x5000
|
||||
#define OT_PRINT_QUEUE_USER 0x5300
|
||||
|
||||
|
||||
/* Bindery object and property flags */
|
||||
#define BF_STATIC 0x00
|
||||
#define BF_DYNAMIC 0x01
|
||||
#define BF_ITEM 0x00
|
||||
#define BF_SET 0x02
|
||||
|
||||
/********* Bindery object and property security access levels **********/
|
||||
#define BS_ANY_READ 0x00 /* Readable by anyone */
|
||||
#define BS_LOGGED_READ 0x01 /* Must be logged in to read */
|
||||
#define BS_OBJECT_READ 0x02 /* Readable by same object or super */
|
||||
#define BS_SUPER_READ 0x03 /* Readable by supervisor only */
|
||||
#define BS_BINDERY_READ 0x04 /* Readable only by the bindery */
|
||||
#define BS_ANY_WRITE 0x00 /* Writeable by anyone */
|
||||
#define BS_LOGGED_WRITE 0x10 /* Must be logged in to write */
|
||||
#define BS_OBJECT_WRITE 0x20 /* Writeable by same object or super */
|
||||
#define BS_SUPER_WRITE 0x30 /* Writeable only by the supervisor */
|
||||
#define BS_BINDERY_WRITE 0x40 /* Writeable by the bindery only */
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWVerifyObjectPassword
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * password
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDisallowObjectPassword
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * disallowedPassword
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWChangeObjectPassword
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * oldPassword,
|
||||
const nstr8 N_FAR * newPassword
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWReadPropertyValue
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * propertyName,
|
||||
nuint8 segmentNum,
|
||||
pnuint8 segmentData,
|
||||
pnuint8 moreSegments,
|
||||
pnuint8 flags
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWWritePropertyValue
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * propertyName,
|
||||
nuint8 segmentNum,
|
||||
const nuint8 N_FAR * segmentData,
|
||||
nuint8 moreSegments
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAddObjectToSet
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * propertyName,
|
||||
const nstr8 N_FAR * memberName,
|
||||
nuint16 memberType
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeleteObjectFromSet
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
pnstr8 propertyName,
|
||||
pnstr8 memberName,
|
||||
nuint16 memberType
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWIsObjectInSet
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * propertyName,
|
||||
const nstr8 N_FAR * memberName,
|
||||
nuint16 memberType
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWScanProperty
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
pnstr8 searchPropertyName,
|
||||
pnuint32 iterHandle,
|
||||
pnstr8 propertyName,
|
||||
pnuint8 propertyFlags,
|
||||
pnuint8 propertySecurity,
|
||||
pnuint8 valueAvailable,
|
||||
pnuint8 moreFlag
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectID
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
pnuint32 objID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectDiskSpaceLeft
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 objID,
|
||||
pnuint32 systemElapsedTime,
|
||||
pnuint32 unusedDiskBlocks,
|
||||
pnuint8 restrictionEnforced
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectName
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 objID,
|
||||
pnstr8 objName,
|
||||
pnuint16 objType
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWScanObject
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * searchName,
|
||||
nuint16 searchType,
|
||||
pnuint32 objID,
|
||||
pnstr8 objName,
|
||||
pnuint16 objType,
|
||||
pnuint8 hasPropertiesFlag,
|
||||
pnuint8 objFlags,
|
||||
pnuint8 objSecurity
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetBinderyAccessLevel
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
pnuint8 accessLevel,
|
||||
pnuint32 objID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWCreateProperty
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * propertyName,
|
||||
nuint8 propertyFlags,
|
||||
nuint8 propertySecurity
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeleteProperty
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * propertyName
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWChangePropertySecurity
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
const nstr8 N_FAR * propertyName,
|
||||
nuint8 newPropertySecurity
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWCreateObject
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
pnstr8 objName,
|
||||
nuint16 objType,
|
||||
nuint8 objFlags,
|
||||
nuint8 objSecurity
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeleteObject
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWRenameObject
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * oldObjName,
|
||||
const nstr8 N_FAR * newObjName,
|
||||
nuint16 objType
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWChangeObjectSecurity
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
const nstr8 N_FAR * objName,
|
||||
nuint16 objType,
|
||||
nuint8 newObjSecurity
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWOpenBindery
|
||||
(
|
||||
NWCONN_HANDLE conn
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWCloseBindery
|
||||
(
|
||||
NWCONN_HANDLE conn
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWScanObjectTrusteePaths
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 objID,
|
||||
nuint16 volNum,
|
||||
pnuint16 iterHandle,
|
||||
pnuint8 accessRights,
|
||||
pnstr8 dirPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectEffectiveRights
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 objID,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint16 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectEffectiveRightsExt
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 objID,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
nuint8 buNameSpace,
|
||||
pnuint16 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectEffectiveRights2
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint32 objID,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint16 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectNamesBeginA
|
||||
(
|
||||
nuint32 luObjectType,
|
||||
pnuint32 pluHandle
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectNamesNextA
|
||||
(
|
||||
nuint32 luHandle,
|
||||
pnuint32 pluLenBuffer,
|
||||
pnstr8 strBuffer
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectNamesEndA
|
||||
(
|
||||
nuint32 luHandle
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectNamesBeginW
|
||||
(
|
||||
nuint32 luObjectType,
|
||||
pnuint32 pluHandle
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectNamesNextW
|
||||
(
|
||||
nuint32 luHandle,
|
||||
pnuint32 pluLenBuffer,
|
||||
punicode strBuffer
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectNamesEndW
|
||||
(
|
||||
nuint32 luHandle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
178
LoginCapture/windows/external/xplatapi/include/nwcaldef.h
vendored
Normal file
178
LoginCapture/windows/external/xplatapi/include/nwcaldef.h
vendored
Normal file
@ -0,0 +1,178 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwcaldef.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:17 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#define NWCALDEF_H
|
||||
|
||||
#ifdef N_PLAT_NLM
|
||||
|
||||
#include <stddef.h>
|
||||
#if !defined(__NOVELL_LIBC__)
|
||||
#if ! defined ( _NWFATTR_H_ )
|
||||
#include <nwtypes.h>
|
||||
#include <nwfattr.h>
|
||||
#endif
|
||||
#undef FA_NORMAL
|
||||
#undef FA_HIDDEN
|
||||
#undef FA_SYSTEM
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#ifndef NWPASCAL
|
||||
#define NWPASCAL N_PASCAL
|
||||
#endif
|
||||
|
||||
#ifndef NWFAR
|
||||
#define NWFAR N_FAR
|
||||
#endif
|
||||
|
||||
#define NWCONN_HANDLE nuint
|
||||
#define pNWCONN_HANDLE pnuint
|
||||
#define NWCONN_NUM nuint16
|
||||
#define NWCCODE nuint
|
||||
#define NWDIR_HANDLE nuint8
|
||||
|
||||
/*
|
||||
Changes to this structure need to be mirrored in
|
||||
internal header nwclient.h. Would be nice to have
|
||||
win31 and OS/2 be defined as HFILE. Need to look
|
||||
into that a little more.
|
||||
*/
|
||||
#if defined (N_PLAT_MSW) && defined (N_ARCH_32)
|
||||
#define NWFILE_HANDLE nptr
|
||||
#elif defined (N_PLAT_OS2)
|
||||
#define NWFILE_HANDLE unsigned long
|
||||
#else
|
||||
#define NWFILE_HANDLE nint
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(__WINDOWS_H) && \
|
||||
!defined(_INC_WINDOWS) && \
|
||||
!defined(__WIN386_INCLUDED__)
|
||||
|
||||
#if !defined(BYTE) && !defined(OS2DEF_INCLUDED)
|
||||
#define BYTE nuint8
|
||||
#endif
|
||||
|
||||
#ifndef WORD
|
||||
#define WORD nuint16
|
||||
#endif
|
||||
|
||||
#ifndef DWORD
|
||||
#define DWORD nuint32
|
||||
#endif
|
||||
|
||||
#ifndef LONG
|
||||
#define LONG nuint32
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef FA_READ_ONLY
|
||||
#define FA_NORMAL 0x00
|
||||
#define FA_READ_ONLY 0x01
|
||||
#define FA_HIDDEN 0x02
|
||||
#define FA_SYSTEM 0x04
|
||||
#define FA_EXECUTE_ONLY 0x08
|
||||
#define FA_DIRECTORY 0x10
|
||||
#define FA_NEEDS_ARCHIVED 0x20
|
||||
#define FA_SHAREABLE 0x80
|
||||
|
||||
/* Extended file attributes */
|
||||
#define FA_TRANSACTIONAL 0x10
|
||||
#define FA_INDEXED 0x20
|
||||
#define FA_READ_AUDIT 0x40
|
||||
#define FA_WRITE_AUDIT 0x80
|
||||
#endif
|
||||
|
||||
/* the following is a the correct attribute mask list */
|
||||
/* The difference between these and the FA_ constants above is that these
|
||||
are in the correct positions. The last four attributes above are 8 bits
|
||||
off. (They need to be shifted 8 bits to the left.) */
|
||||
#ifndef A_NORMAL
|
||||
#define A_NORMAL 0x00000000L
|
||||
#define A_READ_ONLY 0x00000001L
|
||||
#define A_HIDDEN 0x00000002L
|
||||
#define A_SYSTEM 0x00000004L
|
||||
#define A_EXECUTE_ONLY 0x00000008L
|
||||
#define A_DIRECTORY 0x00000010L
|
||||
#define A_NEEDS_ARCHIVED 0x00000020L
|
||||
#define A_SHAREABLE 0x00000080L
|
||||
#define A_DONT_SUBALLOCATE 0x00000800L
|
||||
#define A_TRANSACTIONAL 0x00001000L
|
||||
#define A_INDEXED 0x00002000L /* not in the NCP book */
|
||||
#define A_READ_AUDIT 0x00004000L
|
||||
#define A_WRITE_AUDIT 0x00008000L
|
||||
#define A_IMMEDIATE_PURGE 0x00010000L
|
||||
#define A_RENAME_INHIBIT 0x00020000L
|
||||
#define A_DELETE_INHIBIT 0x00040000L
|
||||
#define A_COPY_INHIBIT 0x00080000L
|
||||
#define A_FILE_MIGRATED 0x00400000L
|
||||
#define A_DONT_MIGRATE 0x00800000L
|
||||
#define A_IMMEDIATE_COMPRESS 0x02000000L
|
||||
#define A_FILE_COMPRESSED 0x04000000L
|
||||
#define A_DONT_COMPRESS 0x08000000L
|
||||
#define A_CANT_COMPRESS 0x20000000L
|
||||
#endif
|
||||
|
||||
/* access rights attributes */
|
||||
#ifndef AR_READ_ONLY
|
||||
#define AR_READ 0x0001
|
||||
#define AR_WRITE 0x0002
|
||||
#define AR_READ_ONLY 0x0001
|
||||
#define AR_WRITE_ONLY 0x0002
|
||||
#define AR_DENY_READ 0x0004
|
||||
#define AR_DENY_WRITE 0x0008
|
||||
#define AR_COMPATIBILITY 0x0010
|
||||
#define AR_WRITE_THROUGH 0x0040
|
||||
#define AR_OPEN_COMPRESSED 0x0100
|
||||
#endif
|
||||
|
||||
/* search attributes */
|
||||
#ifndef SA_HIDDEN
|
||||
#define SA_NORMAL 0x0000
|
||||
#define SA_HIDDEN 0x0002
|
||||
#define SA_SYSTEM 0x0004
|
||||
#define SA_SUBDIR_ONLY 0x0010
|
||||
#define SA_SUBDIR_FILES 0x8000
|
||||
#define SA_ALL 0x8006
|
||||
#endif
|
||||
|
||||
#ifndef USE_NW_WILD_MATCH
|
||||
#define USE_NW_WILD_MATCH 0
|
||||
#endif
|
||||
|
||||
#ifndef USE_DOS_WILD_MATCH
|
||||
#define USE_DOS_WILD_MATCH 1
|
||||
#endif
|
||||
|
||||
/* Scope specifiers */
|
||||
#define GLOBAL 0
|
||||
#define PRIVATE 1
|
||||
#define MY_SESSION 2
|
||||
#define ALL_SESSIONS 3
|
||||
|
||||
#endif
|
127
LoginCapture/windows/external/xplatapi/include/nwcalls.h
vendored
Normal file
127
LoginCapture/windows/external/xplatapi/include/nwcalls.h
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwcalls.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:19 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWCALLS_H )
|
||||
#define NWCALLS_H
|
||||
|
||||
#if ! defined ( NWAPIDEF_H )
|
||||
#include "nwapidef.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWALIAS_H )
|
||||
#include "nwalias.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOAFP_INC )
|
||||
#include "nwafp.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOBINDRY_INC )
|
||||
#include "nwbindry.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOCONNECT_INC )
|
||||
#include "nwconnec.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NODEL_INC )
|
||||
#include "nwdel.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NODENTRY_INC )
|
||||
#include "nwdentry.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NODIRECTORY_INC )
|
||||
#include "nwdirect.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NODPATH_INC )
|
||||
#include "nwdpath.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOEA_INC )
|
||||
#include "nwea.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOERROR_INC )
|
||||
#include "nwerror.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOFILES_INC )
|
||||
#include "nwfile.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOMISC_INC )
|
||||
#include "nwmisc.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOMESSAGES_INC )
|
||||
#include "nwmsg.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NONAMSPC_INC )
|
||||
#include "nwnamspc.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOPRINT_INC )
|
||||
#include "nwprint.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOQUEUE_INC )
|
||||
#include "nwqms.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOSERVER_INC )
|
||||
#include "nwserver.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOSYNC_INC )
|
||||
#include "nwsync.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NONTTS_INC )
|
||||
#include "nwtts.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOVOL_INC )
|
||||
#include "nwvol.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOACCT_INC )
|
||||
#include "nwacct.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOFSE_INC )
|
||||
#include "nwfse.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOMIGRATE_INC )
|
||||
#include "nwmigrat.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NOSM_INC )
|
||||
#include "nwsm.h"
|
||||
#endif
|
||||
|
||||
#endif /* NWCALLS_INC */
|
495
LoginCapture/windows/external/xplatapi/include/nwclxcon.h
vendored
Normal file
495
LoginCapture/windows/external/xplatapi/include/nwclxcon.h
vendored
Normal file
@ -0,0 +1,495 @@
|
||||
/****************************************************************************
|
||||
|
||||
%name: nwclxcon.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:21 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#if ! defined ( NWCLXCON_H )
|
||||
#define NWCLXCON_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWAPIDEF_H )
|
||||
#include "nwapidef.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWCALDEF_H ) /* include nwcaldef.h for connection handle */
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
/* Authentication States */
|
||||
#define NWCC_AUTHENT_STATE_NONE 0x0000
|
||||
#define NWCC_AUTHENT_STATE_BIND 0x0001
|
||||
#define NWCC_AUTHENT_STATE_NDS 0x0002
|
||||
|
||||
/* Broadcast States */
|
||||
#define NWCC_BCAST_PERMIT_ALL 0x0000
|
||||
#define NWCC_BCAST_PERMIT_SYSTEM 0x0001
|
||||
#define NWCC_BCAST_PERMIT_NONE 0x0002
|
||||
#define NWCC_BCAST_PERMIT_POLL 0x0003 /* DOS Windows and OS/2 only */
|
||||
|
||||
/* NDS States */
|
||||
#define NWCC_NDS_NOT_CAPABLE 0x0000
|
||||
#define NWCC_NDS_CAPABLE 0x0001
|
||||
|
||||
/* License States */
|
||||
#define NWCC_NOT_LICENSED 0x0000
|
||||
#define NWCC_CONNECTION_LICENSED 0x0001
|
||||
#define NWCC_HANDLE_LICENSED 0x0002
|
||||
|
||||
/* Name Format types */
|
||||
#define NWCC_NAME_FORMAT_NDS 0x0001 /* Unicode full dot format name */
|
||||
#define NWCC_NAME_FORMAT_BIND 0x0002
|
||||
#define NWCC_NAME_FORMAT_NDS_TREE 0x0008
|
||||
#define NWCC_NAME_FORMAT_WILD 0x8000
|
||||
|
||||
/* Transport types */
|
||||
#define NWCC_TRAN_TYPE_IPX 0x00000001
|
||||
#define NWCC_TRAN_TYPE_DDP 0x00000003
|
||||
#define NWCC_TRAN_TYPE_ASP 0x00000004
|
||||
#define NWCC_TRAN_TYPE_UDP 0x00000008
|
||||
#define NWCC_TRAN_TYPE_TCP 0x00000009
|
||||
#define NWCC_TRAN_TYPE_UDP6 0x0000000A
|
||||
#define NWCC_TRAN_TYPE_TCP6 0x0000000B
|
||||
#define NWCC_TRAN_TYPE_WILD 0x00008000
|
||||
|
||||
/* Open States */
|
||||
#define NWCC_OPEN_LICENSED 0x0001
|
||||
#define NWCC_OPEN_UNLICENSED 0x0002
|
||||
#define NWCC_OPEN_PRIVATE 0x0004
|
||||
#define NWCC_OPEN_PUBLIC 0x0008
|
||||
#define NWCC_OPEN_EXISTING_HANDLE 0x0010
|
||||
#define NWCC_OPEN_NEAREST 0x0100
|
||||
#define NWCC_OPEN_IGNORE_CACHE 0x0200
|
||||
|
||||
/* Scan connection information flags (nuint value) */
|
||||
#define NWCC_MATCH_NOT_EQUALS 0x0000
|
||||
#define NWCC_MATCH_EQUALS 0x0001
|
||||
#define NWCC_RETURN_PUBLIC 0x0002
|
||||
#define NWCC_RETURN_PRIVATE 0x0004
|
||||
#define NWCC_RETURN_LICENSED 0x0008
|
||||
#define NWCC_RETURN_UNLICENSED 0x0010
|
||||
|
||||
/* Reserved Value */
|
||||
#define NWCC_RESERVED 0x0000
|
||||
|
||||
/* Values used with Security Flags */
|
||||
/* NOTE:
|
||||
Two previously defined security flags have been redefined in order to be
|
||||
compliant with the ANSI standard maximum length of 31. Here is a list showing
|
||||
what the #define was previously, and what it has been redefined to be.
|
||||
PREVIOUSLY CURRENTLY
|
||||
NWCC_SECURITY_SIGNING_NOT_IN_USE NWCC_SECUR_SIGNING_NOT_IN_USE
|
||||
NWCC_SECURITY_LEVEL_SIGN_HEADERS NWCC_SECUR_LEVEL_SIGN_HEADERS
|
||||
*/
|
||||
#define NWCC_SECURITY_SIGNING_NOT_IN_USE 0x00000000
|
||||
#define NWCC_SECURITY_SIGNING_IN_USE 0x00000001
|
||||
#define NWCC_SECURITY_LEVEL_CHECKSUM 0x00000100
|
||||
#define NWCC_SECURITY_LEVEL_SIGN_HEADERS 0x00000200
|
||||
#define NWCC_SECURITY_LEVEL_SIGN_ALL 0x00000400
|
||||
#define NWCC_SECURITY_LEVEL_ENCRYPT 0x00000800
|
||||
|
||||
/* Feature Codes */
|
||||
#define NWCC_FEAT_PRIV_CONN 0x0001
|
||||
#define NWCC_FEAT_REQ_AUTH 0x0002
|
||||
#define NWCC_FEAT_SECURITY 0x0003
|
||||
#define NWCC_FEAT_NDS 0x0004
|
||||
#define NWCC_FEAT_NDS_MTREE 0x0005
|
||||
#define NWCC_FEAT_PRN_CAPTURE 0x0006
|
||||
|
||||
typedef struct tagNWCCTranAddr
|
||||
{
|
||||
nuint32 type;
|
||||
nuint32 len;
|
||||
pnuint8 buffer;
|
||||
} NWCCTranAddr, N_FAR *pNWCCTranAddr;
|
||||
|
||||
typedef struct tagNWCCVersion
|
||||
{
|
||||
nuint major;
|
||||
nuint minor;
|
||||
nuint revision;
|
||||
}NWCCVersion, N_FAR *pNWCCVersion;
|
||||
|
||||
/* Info Types */
|
||||
#define NWCC_INFO_NONE 0
|
||||
#define NWCC_INFO_AUTHENT_STATE 1
|
||||
#define NWCC_INFO_BCAST_STATE 2
|
||||
#define NWCC_INFO_CONN_REF 3
|
||||
#define NWCC_INFO_TREE_NAME 4
|
||||
#define NWCC_INFO_CONN_NUMBER 5
|
||||
#define NWCC_INFO_USER_ID 6
|
||||
#define NWCC_INFO_SERVER_NAME 7
|
||||
#define NWCC_INFO_NDS_STATE 8
|
||||
#define NWCC_INFO_MAX_PACKET_SIZE 9
|
||||
#define NWCC_INFO_LICENSE_STATE 10
|
||||
#define NWCC_INFO_DISTANCE 11
|
||||
#define NWCC_INFO_SERVER_VERSION 12
|
||||
#define NWCC_INFO_TRAN_ADDR 13 /* Version 2 */
|
||||
#define NWCC_INFO_IDENTITY_HANDLE 14 /* Version 3 */
|
||||
|
||||
#define NWCC_INFO_RETURN_ALL 0xFFFF
|
||||
|
||||
/* Current Info Version */
|
||||
#define NWCC_INFO_VERSION_1 0x0001
|
||||
#define NWCC_INFO_VERSION_2 0x0002
|
||||
#define NWCC_INFO_VERSION_3 0x0003
|
||||
|
||||
/* Should use above definitions instead of this one */
|
||||
#define NWCC_INFO_VERSION NWCC_INFO_VERSION_1
|
||||
|
||||
typedef struct tagNWCCConnInfo
|
||||
{
|
||||
nuint authenticationState;
|
||||
nuint broadcastState;
|
||||
nuint32 connRef;
|
||||
nstr treeName[NW_MAX_TREE_NAME_LEN];
|
||||
nuint connNum;
|
||||
nuint32 userID;
|
||||
nstr serverName[NW_MAX_SERVER_NAME_LEN];
|
||||
nuint NDSState;
|
||||
nuint maxPacketSize;
|
||||
nuint licenseState;
|
||||
nuint distance;
|
||||
NWCCVersion serverVersion;
|
||||
#ifdef NWCC_INFO_VERSION_2
|
||||
pNWCCTranAddr tranAddr;
|
||||
#endif
|
||||
#ifdef NWCC_INFO_VERSION_3
|
||||
nuint32 identityHandle;
|
||||
#endif
|
||||
}NWCCConnInfo, N_FAR *pNWCCConnInfo;
|
||||
|
||||
typedef struct tagNWCCFrag
|
||||
{
|
||||
nptr address;
|
||||
nuint length;
|
||||
}NWCCFrag, N_FAR *pNWCCFrag;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCLXInit
|
||||
(
|
||||
nptr reserved1,
|
||||
nptr reserved2
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCLXTerm
|
||||
(
|
||||
nptr reserved
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( void )
|
||||
NWCCGetCLXVersion
|
||||
(
|
||||
pnuint8 majorVersion,
|
||||
pnuint8 minorVersion,
|
||||
pnuint8 revisionLevel,
|
||||
pnuint8 betaReleaseLevel
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCOpenConnByName
|
||||
(
|
||||
NWCONN_HANDLE startConnHandle, /* in */
|
||||
const nstr8 N_FAR * name, /* in */
|
||||
nuint nameFormat, /* in */
|
||||
nuint openState, /* in */
|
||||
nuint tranType, /* in * use NWCC_RESERVED */
|
||||
pNWCONN_HANDLE pConnHandle /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCOpenConnByAddr
|
||||
(
|
||||
const NWCCTranAddr N_FAR * tranAddr, /* in */
|
||||
nuint openState, /* in */
|
||||
nuint reserved, /* in * use NWCC_RESERVED */
|
||||
pNWCONN_HANDLE pConnHandle /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCOpenConnByRef
|
||||
(
|
||||
nuint32 connRef, /* in */
|
||||
nuint openState, /* in */
|
||||
nuint reserved, /* in * use NWCC_RESERVED */
|
||||
pNWCONN_HANDLE pConnHandle /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCCloseConn
|
||||
(
|
||||
NWCONN_HANDLE connHandle /* in */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCSysCloseConnRef
|
||||
(
|
||||
nuint32 connRef /* in */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCMakeConnPermanent
|
||||
(
|
||||
NWCONN_HANDLE connHandle /* in */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCLicenseConn
|
||||
(
|
||||
NWCONN_HANDLE connHandle /* in */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCUnlicenseConn
|
||||
(
|
||||
NWCONN_HANDLE connHandle /* in */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetConnRef
|
||||
(
|
||||
NWCONN_HANDLE connHandle, /* in */
|
||||
pnuint32 connRef /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetPrefServerName
|
||||
(
|
||||
nuint len, /* in */
|
||||
pnstr prefServer /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCSetPrefServerName
|
||||
(
|
||||
const nstr N_FAR * prefServer /* in */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetPrimConnRef
|
||||
(
|
||||
pnuint32 connRef /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCSetPrimConn
|
||||
(
|
||||
NWCONN_HANDLE connHandle /* in */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCScanConnRefs
|
||||
(
|
||||
pnuint32 scanIterator, /* in/out : initialize to 0 */
|
||||
pnuint32 connRef /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetConnInfo
|
||||
(
|
||||
NWCONN_HANDLE connHandle, /* in */
|
||||
nuint infoType, /* in */
|
||||
nuint len, /* in */
|
||||
nptr buffer /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetConnRefInfo
|
||||
(
|
||||
nuint32 connRef, /* in */
|
||||
nuint infoType, /* in */
|
||||
nuint len, /* in */
|
||||
nptr buffer /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetAllConnInfo
|
||||
(
|
||||
NWCONN_HANDLE connHandle, /* in */
|
||||
/* connInfoVersion should always be set to NWCC_INFO_VERSION
|
||||
or NWCC_INFO_VERSION_n */
|
||||
nuint connInfoVersion, /* in */
|
||||
pNWCCConnInfo connInfoBuffer /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetAllConnRefInfo
|
||||
(
|
||||
nuint32 connRef, /* in */
|
||||
/* connInfoVersion should always be set to NWCC_INFO_VERSION
|
||||
or NWCC_INFO_VERSION_n */
|
||||
nuint connInfoVersion, /* in */
|
||||
pNWCCConnInfo connInfoBuffer /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCScanConnInfo
|
||||
(
|
||||
pnuint32 scanIterator, /* in */
|
||||
nuint scanInfoLevel, /* in */
|
||||
const void N_FAR * scanConnInfo, /* in */
|
||||
nuint scanFlags, /* in */
|
||||
/* connInfoVersion should always be set to NWCC_INFO_VERSION
|
||||
or NWCC_INFO_VERSION_n */
|
||||
nuint connInfoVersion, /* in */
|
||||
nuint returnInfoLevel, /* in */
|
||||
nptr returnConnInfo, /* out */
|
||||
pnuint32 connReference /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetConnAddressLength
|
||||
(
|
||||
NWCONN_HANDLE connHandle, /* in */
|
||||
pnuint32 addrLen /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetConnRefAddressLength
|
||||
(
|
||||
nuint32 connRef, /* in */
|
||||
pnuint32 addrLen /* out */
|
||||
);
|
||||
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetConnAddress
|
||||
(
|
||||
NWCONN_HANDLE connHandle, /* in */
|
||||
nuint32 bufferLen, /* in */
|
||||
pNWCCTranAddr tranAddr /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetConnRefAddress
|
||||
(
|
||||
nuint32 connRef, /* in */
|
||||
nuint32 bufferLen, /* in */
|
||||
pNWCCTranAddr tranAddr /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCOpenConnByPref
|
||||
(
|
||||
nuint tranType, /* in * NWCC_TRAN_TYPE_IPX */
|
||||
nuint openState, /* in */
|
||||
nuint reserved, /* in * use NWCC_RESERVED */
|
||||
pNWCONN_HANDLE pConnHandle /* out */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCQueryFeature
|
||||
(
|
||||
nuint featureCode /* in */
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetNumConns
|
||||
(
|
||||
pnuint maxConns, /* out */
|
||||
pnuint publicConns, /* out */
|
||||
pnuint myPrivateConns /* out */
|
||||
);
|
||||
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCGetSecurityFlags
|
||||
(
|
||||
pnuint32 enabSecurityFlags,
|
||||
pnuint32 prefSecurityFlags,
|
||||
pnuint32 reqSecurityFlags
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCSetSecurityFlags
|
||||
(
|
||||
nuint32 prefSecurityFlags,
|
||||
nuint32 reqSecurityFlags
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCRenegotiateSecurityLevel
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
nuint32 securityFlags
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCResetRequester
|
||||
(
|
||||
pnuint32 keepConnRef,
|
||||
nuint connFlags,
|
||||
pnstr firstLocalAlias
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCRequest
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
nuint function,
|
||||
nuint numReqFrags,
|
||||
const NWCCFrag N_FAR * reqFrags,
|
||||
nuint numReplyFrags,
|
||||
pNWCCFrag replyFrags,
|
||||
pnuint actualReplyLen
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCFragmentRequest
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
nuint function,
|
||||
nuint verb,
|
||||
nuint reserved,
|
||||
nuint numReqFrags,
|
||||
const NWCCFrag N_FAR * reqFrags,
|
||||
nuint numReplyFrags,
|
||||
pNWCCFrag replyFrags,
|
||||
pnuint actualReplyLen
|
||||
);
|
||||
|
||||
/* The following functions are NLM CLIB specific and not supported in the
|
||||
* NLM LibC x-plat libraries. The LibC stddef.h file defines
|
||||
* __NOVELL_LIBC__
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#if !defined(__NOVELL_LIBC__)
|
||||
|
||||
N_EXTERN_LIBRARY( NWRCODE )
|
||||
NWCCSetCurrentConnection
|
||||
(
|
||||
NWCONN_HANDLE connHandle
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif /* NWCLXCON_INC */
|
102
LoginCapture/windows/external/xplatapi/include/nwconfig.h
vendored
Normal file
102
LoginCapture/windows/external/xplatapi/include/nwconfig.h
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwconfig.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:24 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1996 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWCONFIG_H )
|
||||
#define NWCONFIG_H
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
#define T_OPTIONAL 0x80
|
||||
|
||||
#define T_NUMBER 0x01
|
||||
#define T_INDEX 0x02
|
||||
#define T_STRING 0x03
|
||||
#define T_HEX_STRING 0x04
|
||||
#define T_HEX_NUMBER 0x05
|
||||
#define T_LONG_NUMBER 0x06
|
||||
#define T_LONG_HEX 0x07
|
||||
|
||||
#define T_SET_1 0x10
|
||||
#define T_SET_2 0x11
|
||||
#define T_SET_3 0x12
|
||||
#define T_SET_4 0x13
|
||||
#define T_SET_5 0x14
|
||||
#define T_SET_6 0x15
|
||||
#define T_SET_7 0x16
|
||||
#define T_SET_8 0x17
|
||||
#define T_SET_9 0x18
|
||||
#define T_SET_10 0x19
|
||||
#define T_SET_11 0x1A
|
||||
#define T_SET_12 0x1B
|
||||
#define T_SET_13 0x1C
|
||||
#define T_SET_14 0x1D
|
||||
#define T_SET_15 0x1E
|
||||
#define T_SET_16 0x1F
|
||||
|
||||
#define MAX_PARAMETERS 8
|
||||
#define MAX_SECTION_NAME_SIZE 32
|
||||
#define MAX_VALUE_SIZE 80
|
||||
#define MAX_SET_ELEMENTS 20
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int numberOfElements;
|
||||
int *elementCode;
|
||||
char N_FAR * N_FAR *elementName;
|
||||
int N_FAR *elementValue;
|
||||
} SetTableStruct;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int paramType;
|
||||
long defaultValue;
|
||||
} TypeDefaultStruct;
|
||||
|
||||
typedef union
|
||||
{
|
||||
char N_FAR *string;
|
||||
unsigned int number;
|
||||
unsigned long longNumber;
|
||||
} PARAMETER_TABLE_TYPE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int keywordCode;
|
||||
char N_FAR *keyword;
|
||||
void (N_FAR *function)(PARAMETER_TABLE_TYPE N_FAR *);
|
||||
TypeDefaultStruct typeDefault[MAX_PARAMETERS];
|
||||
} GrammarTableStruct;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
N_EXTERN_LIBRARY( int )
|
||||
NWParseConfig(
|
||||
PCHAR configFile,
|
||||
PCHAR sectionName,
|
||||
UINT sectionInstance,
|
||||
UINT grammarTableSize,
|
||||
GrammarTableStruct N_FAR *grammarTable,
|
||||
SetTableStruct N_FAR *setTable);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif
|
159
LoginCapture/windows/external/xplatapi/include/nwconnec.h
vendored
Normal file
159
LoginCapture/windows/external/xplatapi/include/nwconnec.h
vendored
Normal file
@ -0,0 +1,159 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwconnec.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:26 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWCONNECT_H )
|
||||
#define NWCONNECT_H
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
# include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct tNWINET_ADDR
|
||||
{
|
||||
nuint8 networkAddr[4];
|
||||
nuint8 netNodeAddr[6];
|
||||
nuint16 socket;
|
||||
nuint16 connType; /* 3.11 and above only: 0=not in use, 2=NCP over IPX, 4=AFP */
|
||||
} NWINET_ADDR;
|
||||
|
||||
#define CONNECTION_AVAILABLE 0x0001
|
||||
#define CONNECTION_PRIVATE 0x0002 /* obsolete */
|
||||
#define CONNECTION_LOGGED_IN 0x0004
|
||||
#define CONNECTION_LICENSED 0x0004
|
||||
#define CONNECTION_BROADCAST_AVAILABLE 0x0008
|
||||
#define CONNECTION_ABORTED 0x0010
|
||||
#define CONNECTION_REFUSE_GEN_BROADCAST 0x0020
|
||||
#define CONNECTION_BROADCASTS_DISABLED 0x0040
|
||||
#define CONNECTION_PRIMARY 0x0080
|
||||
#define CONNECTION_NDS 0x0100
|
||||
#define CONNECTION_PNW 0x4000 /* obsolete */
|
||||
#define CONNECTION_AUTHENTICATED 0x8000
|
||||
|
||||
|
||||
/* End of new connection model calls. */
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWLockConnection
|
||||
(
|
||||
NWCONN_HANDLE connHandle
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetConnectionInformation
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
nuint16 connNumber,
|
||||
pnstr8 pObjName,
|
||||
pnuint16 pObjType,
|
||||
pnuint32 pObjID,
|
||||
pnuint8 pLoginTime
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetInternetAddress
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
nuint16 connNumber,
|
||||
pnuint8 pInetAddr
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetInetAddr
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
nuint16 connNum,
|
||||
NWINET_ADDR N_FAR * pInetAddr
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWClearConnectionNumber
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
nuint16 connNumber
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDefaultConnRef
|
||||
(
|
||||
pnuint32 pConnReference
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetObjectConnectionNumbers
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
const nstr8 N_FAR * pObjName,
|
||||
nuint16 objType,
|
||||
pnuint16 pNumConns,
|
||||
pnuint16 pConnHandleList,
|
||||
nuint16 maxConns
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetConnListFromObject
|
||||
(
|
||||
NWCONN_HANDLE connHandle,
|
||||
nuint32 objID,
|
||||
nuint32 searchConnNum,
|
||||
pnuint16 pConnListLen,
|
||||
pnuint32 pConnList
|
||||
);
|
||||
|
||||
#ifndef NWOS2
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetPreferredServer
|
||||
(
|
||||
NWCONN_HANDLE N_FAR * pConnHandle
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSetPreferredServer
|
||||
(
|
||||
NWCONN_HANDLE connHandle
|
||||
);
|
||||
|
||||
#else
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWResetConnectionConfig
|
||||
(
|
||||
nuint32 flags
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The NLM LibC x-plat libraries do not support obsolete apis
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#if !defined(__NOVELL_LIBC__)
|
||||
#ifdef INCLUDE_OBSOLETE
|
||||
#include "obsolete/o_connec.h"
|
||||
#endif
|
||||
#endif /* !defined(__NOVELL_LIBC__) */
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif /* NWCONNECT_H */
|
161
LoginCapture/windows/external/xplatapi/include/nwdel.h
vendored
Normal file
161
LoginCapture/windows/external/xplatapi/include/nwdel.h
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwdel.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:28 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWDEL_H )
|
||||
#define NWDEL_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 sequence;
|
||||
nuint32 parent;
|
||||
nuint32 attributes;
|
||||
nuint8 uniqueID;
|
||||
nuint8 flags;
|
||||
nuint8 nameSpace;
|
||||
nuint8 nameLength;
|
||||
nuint8 name [256];
|
||||
nuint32 creationDateAndTime;
|
||||
nuint32 ownerID;
|
||||
nuint32 lastArchiveDateAndTime;
|
||||
nuint32 lastArchiverID;
|
||||
nuint32 updateDateAndTime;
|
||||
nuint32 updatorID;
|
||||
nuint32 fileSize;
|
||||
nuint8 reserved[44];
|
||||
nuint16 inheritedRightsMask;
|
||||
nuint16 lastAccessDate;
|
||||
nuint32 deletedTime;
|
||||
nuint32 deletedDateAndTime;
|
||||
nuint32 deletorID;
|
||||
nuint8 reserved3 [16];
|
||||
} NWDELETED_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 sequence;
|
||||
nuint32 parent;
|
||||
nuint32 attributes;
|
||||
nuint8 uniqueID;
|
||||
nuint8 flags;
|
||||
nuint8 nameSpace;
|
||||
nuint16 nameLength;
|
||||
nuint8 name [766];
|
||||
nuint32 creationDateAndTime;
|
||||
nuint32 ownerID;
|
||||
nuint32 lastArchiveDateAndTime;
|
||||
nuint32 lastArchiverID;
|
||||
nuint32 updateDateAndTime;
|
||||
nuint32 updatorID;
|
||||
nuint32 fileSize;
|
||||
nuint8 reserved[44];
|
||||
nuint16 inheritedRightsMask;
|
||||
nuint16 lastAccessDate;
|
||||
nuint32 deletedTime;
|
||||
nuint32 deletedDateAndTime;
|
||||
nuint32 deletorID;
|
||||
nuint8 reserved3 [16];
|
||||
} NWDELETED_INFO_EXT;
|
||||
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWPurgeDeletedFile
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
nuint32 iterHandle,
|
||||
nuint32 volNum,
|
||||
nuint32 dirBase,
|
||||
const nstr8 N_FAR * fileName
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWRecoverDeletedFile
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
nuint32 iterHandle,
|
||||
nuint32 volNum,
|
||||
nuint32 dirBase,
|
||||
pnstr8 delFileName,
|
||||
pnstr8 rcvrFileName
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWRecoverDeletedFileExt
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
nuint32 iterHandle,
|
||||
nuint32 volNum,
|
||||
nuint32 dirBase,
|
||||
pnstr8 delFileName,
|
||||
pnstr8 rcvrFileName
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWScanForDeletedFiles
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
pnuint32 iterHandle,
|
||||
pnuint32 volNum,
|
||||
pnuint32 dirBase,
|
||||
NWDELETED_INFO N_FAR * entryInfo
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWScanForDeletedFilesExt
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
pnuint32 iterHandle,
|
||||
pnuint32 volNum,
|
||||
pnuint32 dirBase,
|
||||
NWDELETED_INFO_EXT N_FAR * entryInfo
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The NLM LibC x-plat libraries do not support obsolete apis
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#if !defined(__NOVELL_LIBC__)
|
||||
#ifdef INCLUDE_OBSOLETE
|
||||
#include "obsolete/o_del.h"
|
||||
#endif
|
||||
#endif /* !defined(__NOVELL_LIBC__) */
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif /* NWDEL_H */
|
316
LoginCapture/windows/external/xplatapi/include/nwdentry.h
vendored
Normal file
316
LoginCapture/windows/external/xplatapi/include/nwdentry.h
vendored
Normal file
@ -0,0 +1,316 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwdentry.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:30 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWDENTRY_H )
|
||||
#define NWDENTRY_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWDIRECT_H ) /* Needed to define TRUSTEE_INFO */
|
||||
#include "nwdirect.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nstr8 entryName[16];
|
||||
nuint32 creationDateAndTime;
|
||||
nuint32 ownerID;
|
||||
nuint32 sequenceNumber;
|
||||
TRUSTEE_INFO trusteeList[20];
|
||||
} NWET_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nstr8 entryName[16];
|
||||
nuint32 creationDateAndTime;
|
||||
nuint32 ownerID;
|
||||
nuint32 sequenceNumber;
|
||||
TRUSTEE_INFO trusteeList[100];
|
||||
} NWET_INFO_EXT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 updateDateAndTime;
|
||||
nuint32 updatorID;
|
||||
nuint32 fileSize;
|
||||
nuint8 reserved[44];
|
||||
nuint16 inheritedRightsMask;
|
||||
nuint16 lastAccessDate;
|
||||
nuint8 reserved2[28];
|
||||
} NWFILE_INFO;
|
||||
typedef struct
|
||||
{
|
||||
nuint32 lastModifyDateAndTime;
|
||||
nuint32 nextTrusteeEntry;
|
||||
nuint8 reserved[48];
|
||||
nuint32 maximumSpace;
|
||||
nuint16 inheritedRightsMask;
|
||||
nuint8 reserved2[14];
|
||||
nuint32 volObjectID;
|
||||
nuint8 reserved3[8];
|
||||
} NWDIR_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 sequence;
|
||||
nuint32 parent;
|
||||
nuint32 attributes;
|
||||
nuint8 uniqueID;
|
||||
nuint8 flags;
|
||||
nuint8 nameSpace;
|
||||
nuint8 nameLength;
|
||||
nuint8 name[12];
|
||||
nuint32 creationDateAndTime;
|
||||
nuint32 ownerID;
|
||||
nuint32 lastArchiveDateAndTime;
|
||||
nuint32 lastArchiverID;
|
||||
|
||||
union
|
||||
{
|
||||
NWFILE_INFO file;
|
||||
NWDIR_INFO dir;
|
||||
}info;
|
||||
|
||||
} NWENTRY_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 sequence;
|
||||
nuint32 parent;
|
||||
nuint32 attributes;
|
||||
nuint8 uniqueID;
|
||||
nuint8 flags;
|
||||
nuint8 nameSpace;
|
||||
nuint8 nameLength;
|
||||
nuint8 name [12];
|
||||
nuint32 creationDateAndTime;
|
||||
nuint32 ownerID;
|
||||
nuint32 lastArchiveDateAndTime;
|
||||
nuint32 lastArchiverID;
|
||||
nuint32 updateDateAndTime;
|
||||
nuint32 lastUpdatorID;
|
||||
nuint32 dataForkSize; /* file size */
|
||||
nuint32 dataForkFirstFAT;
|
||||
nuint32 nextTrusteeEntry;
|
||||
nuint8 reserved[36];
|
||||
nuint16 inheritedRightsMask;
|
||||
nuint16 lastAccessDate;
|
||||
nuint32 deletedFileTime;
|
||||
nuint32 deletedDateAndTime;
|
||||
nuint32 deletorID;
|
||||
nuint8 reserved2 [16];
|
||||
nuint32 otherForkSize[2];
|
||||
} NW_EXT_FILE_INFO;
|
||||
|
||||
#define TR_NONE 0x0000
|
||||
#define TR_READ 0x0001
|
||||
#define TR_WRITE 0x0002
|
||||
#define TR_OPEN 0x0004
|
||||
#define TR_DIRECTORY 0x0004
|
||||
#define TR_CREATE 0x0008
|
||||
#define TR_DELETE 0x0010
|
||||
#define TR_ERASE 0x0010
|
||||
#define TR_OWNERSHIP 0x0020
|
||||
#define TR_ACCESS_CTRL 0x0020
|
||||
#define TR_FILE_SCAN 0x0040
|
||||
#define TR_SEARCH 0x0040
|
||||
#define TR_FILE_ACCESS 0x0040
|
||||
#define TR_MODIFY 0x0080
|
||||
#define TR_ALL 0x01FB
|
||||
#define TR_SUPERVISOR 0x0100
|
||||
#define TR_NORMAL 0x00FB
|
||||
|
||||
#ifndef MModifyNameBit
|
||||
#define MModifyNameBit 0x0001L
|
||||
#define MFileAttributesBit 0x0002L
|
||||
#define MCreateDateBit 0x0004L
|
||||
#define MCreateTimeBit 0x0008L
|
||||
#define MOwnerIDBit 0x0010L
|
||||
#define MLastArchivedDateBit 0x0020L
|
||||
#define MLastArchivedTimeBit 0x0040L
|
||||
#define MLastArchivedIDBit 0x0080L
|
||||
#define MLastUpdatedDateBit 0x0100L
|
||||
#define MLastUpdatedTimeBit 0x0200L
|
||||
#define MLastUpdatedIDBit 0x0400L
|
||||
#define MLastAccessedDateBit 0x0800L
|
||||
#define MInheritedRightsMaskBit 0x1000L
|
||||
#define MMaximumSpaceBit 0x2000L
|
||||
#endif
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeleteTrustee
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * dirPath,
|
||||
nuint32 objID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeleteTrusteeExt
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * dirPath,
|
||||
nuint32 objID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAddTrustee
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
nuint32 objID,
|
||||
nuint16 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAddTrusteeExt
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
nuint32 objID,
|
||||
nuint16 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWIntScanDirEntryInfo
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
nuint16 attrs,
|
||||
pnuint32 iterHandle,
|
||||
const nuint8 N_FAR * searchPattern,
|
||||
NWENTRY_INFO N_FAR * entryInfo,
|
||||
nuint16 augmentFlag
|
||||
);
|
||||
|
||||
#define NWScanForTrustees(a, b, c, d, e, f) \
|
||||
NWIntScanForTrustees(a, b, c, d, e, f, 0)
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWIntScanForTrustees
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint32 iterHandle,
|
||||
pnuint16 numOfEntries,
|
||||
NWET_INFO N_FAR * entryTrusteeInfo,
|
||||
nuint16 augmentFlag
|
||||
);
|
||||
|
||||
#define NWScanForTrusteesExt(a, b, c, d, e, f) \
|
||||
NWIntScanForTrusteesExt(a, b, c, d, e, f, 0)
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWIntScanForTrusteesExt
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint32 iterHandle,
|
||||
pnuint16 numOfEntries,
|
||||
NWET_INFO_EXT N_FAR * entryTrusteeInfo,
|
||||
nuint16 augmentFlag
|
||||
);
|
||||
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWIntMoveDirEntry
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint8 searchAttrs,
|
||||
NWDIR_HANDLE srcDirHandle,
|
||||
const nstr8 N_FAR * srcPath,
|
||||
NWDIR_HANDLE dstDirHandle,
|
||||
const nstr8 N_FAR * dstPath,
|
||||
nuint16 augmentFlag
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSetDirEntryInfo
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
nuint8 searchAttrs,
|
||||
nuint32 iterHandle,
|
||||
nuint32 changeBits,
|
||||
const NWENTRY_INFO N_FAR * newEntryInfo
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWIntScanExtendedInfo
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
nuint8 attrs,
|
||||
pnuint32 iterHandle,
|
||||
const nstr8 N_FAR * searchPattern,
|
||||
NW_EXT_FILE_INFO N_FAR * entryInfo,
|
||||
nuint16 augmentFlag
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetEffectiveRights
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint16 effectiveRights
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetEffectiveRightsExt
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint16 effectiveRights
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The NLM LibC x-plat libraries do not support obsolete apis
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#if !defined(__NOVELL_LIBC__)
|
||||
#ifdef INCLUDE_OBSOLETE
|
||||
#include "obsolete/o_dentry.h"
|
||||
#endif
|
||||
#endif /* !defined(__NOVELL_LIBC__) */
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif
|
352
LoginCapture/windows/external/xplatapi/include/nwdirect.h
vendored
Normal file
352
LoginCapture/windows/external/xplatapi/include/nwdirect.h
vendored
Normal file
@ -0,0 +1,352 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwdirect.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:32 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWDIRECT_H )
|
||||
#define NWDIRECT_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWAPIDEF_H )
|
||||
#include "nwapidef.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 totalBlocks;
|
||||
nuint32 availableBlocks;
|
||||
|
||||
nuint32 purgeableBlocks; /* set to zero if a dirHandle is present */
|
||||
nuint32 notYetPurgeableBlocks;/*....when the NWGetDIrSpaceInfo() is called */
|
||||
|
||||
nuint32 totalDirEntries;
|
||||
nuint32 availableDirEntries;
|
||||
nuint32 reserved;
|
||||
nuint8 sectorsPerBlock;
|
||||
nuint8 volLen;
|
||||
nuint8 volName[NW_MAX_VOLUME_NAME_LEN];
|
||||
} DIR_SPACE_INFO;
|
||||
|
||||
/* Trustee Access Rights in a network directory */
|
||||
/* NOTE: TA_OPEN is obsolete in 3.x */
|
||||
#ifndef TA_NONE
|
||||
#define TA_NONE 0x00
|
||||
#define TA_READ 0x01
|
||||
#define TA_WRITE 0x02
|
||||
#define TA_OPEN 0x04
|
||||
#define TA_CREATE 0x08
|
||||
#define TA_DELETE 0x10
|
||||
#define TA_OWNERSHIP 0x20
|
||||
#define TA_SEARCH 0x40
|
||||
#define TA_MODIFY 0x80
|
||||
#define TA_ALL 0xFB
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint32 objectID;
|
||||
nuint16 objectRights;
|
||||
} TRUSTEE_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nuint8 numEntries;
|
||||
struct
|
||||
{
|
||||
nuint8 level;
|
||||
nuint32 max;
|
||||
nuint32 current;
|
||||
} list[102];
|
||||
} NW_LIMIT_LIST;
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAddTrusteeToDirectory
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
nuint32 trusteeID,
|
||||
nuint8 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeleteTrusteeFromDirectory
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
nuint32 objID
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetEffectiveDirectoryRights
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint16 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWModifyMaximumRightsMask
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
nuint8 revokeRightsMask,
|
||||
nuint8 grantRightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWScanDirectoryForTrustees
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * searchPath,
|
||||
pnuint16 iterHandle,
|
||||
pnstr8 dirName,
|
||||
pnuint32 dirDateTime,
|
||||
pnuint32 ownerID,
|
||||
pnuint32 trusteeIDs,
|
||||
pnuint8 trusteeRights
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWScanDirectoryForTrustees2
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * searchPath,
|
||||
pnuint32 iterHandle,
|
||||
pnstr8 dirName,
|
||||
pnuint32 dirDateTime,
|
||||
pnuint32 ownerID,
|
||||
TRUSTEE_INFO N_FAR * trusteeList
|
||||
);
|
||||
|
||||
#define NWScanDirectoryInformation(a, b, c, d, e, f, g, h) \
|
||||
NWIntScanDirectoryInformation(a, b, c, d, e, f, g, h, 0)
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWIntScanDirectoryInformation
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * searchPath,
|
||||
pnuint16 iterHandle,
|
||||
pnstr8 dirName,
|
||||
pnuint32 dirDateTime,
|
||||
pnuint32 ownerID,
|
||||
pnuint8 rightsMask,
|
||||
nuint16 augmentFlag
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWIntScanDirectoryInformation2
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * searchPath,
|
||||
pnuint8 sequence,
|
||||
pnstr8 dirName,
|
||||
pnuint32 dirDateTime,
|
||||
pnuint32 ownerID,
|
||||
pnuint8 rightsMask,
|
||||
nuint16 augmentFlag
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSetDirectoryInformation
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * path,
|
||||
nuint32 dirDateTime,
|
||||
nuint32 ownerID,
|
||||
nuint8 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAllocPermanentDirectoryHandle
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * dirPath,
|
||||
NWDIR_HANDLE N_FAR * newDirHandle,
|
||||
pnuint8 effectiveRights
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWAllocTemporaryDirectoryHandle
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * dirPath,
|
||||
NWDIR_HANDLE N_FAR * newDirHandle,
|
||||
pnuint8 rightsMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeallocateDirectoryHandle
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSetDirectoryHandlePath
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE sourceDirHandle,
|
||||
const nstr8 N_FAR * dirPath,
|
||||
NWDIR_HANDLE destDirHandle
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDirectoryHandlePath
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
pnstr8 dirPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWCreateDirectory
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * dirPath,
|
||||
nuint8 accessMask
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeleteDirectory
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * dirPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWRenameDirectory
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * oldName,
|
||||
const nstr8 N_FAR * newName
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSetDirSpaceLimit
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
nuint32 spaceLimit
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDirSpaceLimitList
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
pnuint8 returnBuf
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDirSpaceLimitList2
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
NW_LIMIT_LIST N_FAR * limitList
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDirSpaceInfo
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
nuint16 volNum,
|
||||
DIR_SPACE_INFO N_FAR * spaceInfo
|
||||
);
|
||||
|
||||
#ifndef TF_READ_ONLY
|
||||
#define TF_NORMAL 0x0000
|
||||
#define TF_READ_ONLY 0x0001L
|
||||
#define TF_HIDDEN 0x0002L
|
||||
#define TF_SYSTEM 0x0004L
|
||||
#define TF_EXECUTE_ONLY 0x0008L
|
||||
|
||||
#define TF_DIRECTORY 0x0010L
|
||||
#define TF_NEEDS_ARCHIVED 0x0020L
|
||||
#define TF_EXECUTE_CONFIRM 0X0040L
|
||||
#define TF_SHAREABLE 0x0080L
|
||||
|
||||
#define TF_LOW_SEARCH_BIT 0x0100L
|
||||
#define TF_MID_SEARCH_BIT 0x0200L
|
||||
#define TF_HI_SEARCH_BIT 0x0400L
|
||||
#define TF_PRIVATE 0x0800L
|
||||
|
||||
#define TF_TRANSACTIONAL 0x1000L
|
||||
#define TF_INDEXED 0x2000L
|
||||
#define TF_READ_AUDIT 0x4000L
|
||||
#define TF_WRITE_AUDIT 0x8000L
|
||||
|
||||
#define TF_PURGE 0x10000L
|
||||
#define TF_RENAME_INHIBIT 0x20000L
|
||||
#define TF_DELETE_INHIBIT 0x40000L
|
||||
#define TF_COPY_INHIBIT 0x80000L
|
||||
#define TF_AUDITING_BIT 0x00100000L
|
||||
#endif
|
||||
|
||||
/* DIRECTORY ATTRIBUTES */
|
||||
|
||||
#define TD_HIDDEN TF_HIDDEN
|
||||
#define TD_SYSTEM TF_SYSTEM
|
||||
#define TD_PURGE TF_PURGE
|
||||
#define TD_PRIVATE TF_PRIVATE
|
||||
#define TD_VISIBLE TF_PRIVATE
|
||||
#define TD_RENAME_INHIBIT TF_RENAME_INHIBIT
|
||||
#define TD_DELETE_INHIBIT TF_DELETE_INHIBIT
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The NLM LibC x-plat libraries do not support obsolete apis
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#if !defined(__NOVELL_LIBC__)
|
||||
#ifdef INCLUDE_OBSOLETE
|
||||
#include "obsolete/o_direct.h"
|
||||
#endif
|
||||
#endif /* !defined(__NOVELL_LIBC__) */
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif
|
244
LoginCapture/windows/external/xplatapi/include/nwdpath.h
vendored
Normal file
244
LoginCapture/windows/external/xplatapi/include/nwdpath.h
vendored
Normal file
@ -0,0 +1,244 @@
|
||||
/******************************************************************************
|
||||
|
||||
%name: nwdpath.h %
|
||||
%version: 1 %
|
||||
%date_modified: Mon Aug 08 13:07:35 2005 %
|
||||
$Copyright:
|
||||
|
||||
Copyright (c) 1989-1995 Novell, Inc. All Rights Reserved.
|
||||
|
||||
THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
|
||||
TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED
|
||||
COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED, CONDENSED,
|
||||
EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED OR ADAPTED
|
||||
WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
|
||||
OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
|
||||
CRIMINAL AND CIVIL LIABILITY.$
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#if ! defined ( NWDPATH_H )
|
||||
#define NWDPATH_H
|
||||
|
||||
#if ! defined ( NTYPES_H )
|
||||
#include "ntypes.h"
|
||||
#endif
|
||||
|
||||
#if ! defined ( NWCALDEF_H )
|
||||
#include "nwcaldef.h"
|
||||
#endif
|
||||
|
||||
#include "npackon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* status values for NWGetDriveStatus */
|
||||
#define NW_UNMAPPED_DRIVE 0x0000
|
||||
#define NW_FREE_DRIVE 0x0000
|
||||
#define NW_CDROM_DRIVE 0x0400
|
||||
#define NW_LOCAL_FREE_DRIVE 0x0800
|
||||
#define NW_LOCAL_DRIVE 0x1000
|
||||
#define NW_NETWORK_DRIVE 0x2000
|
||||
#define NW_LITE_DRIVE 0x4000
|
||||
#define NW_PNW_DRIVE 0x4000
|
||||
#define NW_NETWARE_DRIVE 0x8000
|
||||
|
||||
/* return error for NWGetDriveStatus */
|
||||
#define NW_INVALID_DRIVE 15
|
||||
|
||||
/* defined for pathFormat parameter in NWGetDriveStatus */
|
||||
#define NW_FORMAT_NETWARE 0
|
||||
#define NW_FORMAT_SERVER_VOLUME 1
|
||||
#define NW_FORMAT_DRIVE 2
|
||||
#define NW_FORMAT_UNC 3
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSetDriveBase
|
||||
(
|
||||
nuint16 driveNum,
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
const nstr8 N_FAR * dirPath,
|
||||
nuint16 driveScope
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSetInitDrive
|
||||
(
|
||||
NWCONN_HANDLE conn
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWSetSearchDriveVector
|
||||
(
|
||||
pnstr8 vectorBuffer
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetSearchDriveVector
|
||||
(
|
||||
pnstr8 vectorBuffer
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWDeleteDriveBase
|
||||
(
|
||||
nuint16 driveNum,
|
||||
nuint16 driveScope
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetPathFromDirectoryBase /* 3.x & 4.x file servers */
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint8 volNum,
|
||||
nuint32 dirBase,
|
||||
nuint8 namSpc,
|
||||
pnuint8 len,
|
||||
pnstr8 pathName
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetPathFromDirectoryEntry /* 2.x file servers only */
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
nuint8 volNum,
|
||||
nuint16 dirEntry,
|
||||
pnuint8 len,
|
||||
pnstr8 pathName
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDrivePathConnRef
|
||||
(
|
||||
nuint16 driveNum,
|
||||
nuint16 mode,
|
||||
pnuint32 connRef,
|
||||
pnstr8 basePath,
|
||||
pnuint16 driveScope
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDrivePath
|
||||
(
|
||||
nuint16 driveNum,
|
||||
nuint16 mode,
|
||||
NWCONN_HANDLE N_FAR * conn,
|
||||
pnstr8 basePath,
|
||||
pnuint16 driveScope
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDriveInformation
|
||||
(
|
||||
nuint16 driveNum,
|
||||
nuint16 mode,
|
||||
NWCONN_HANDLE N_FAR * conn,
|
||||
NWDIR_HANDLE N_FAR * dirHandle,
|
||||
pnuint16 driveScope,
|
||||
pnstr8 dirPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDriveInfoConnRef
|
||||
(
|
||||
nuint16 driveNum,
|
||||
nuint16 mode,
|
||||
pnuint32 connRef,
|
||||
NWDIR_HANDLE N_FAR * dirHandle,
|
||||
pnuint16 driveScope,
|
||||
pnstr8 dirPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDriveStatus
|
||||
(
|
||||
nuint16 driveNum,
|
||||
nuint16 pathFormat,
|
||||
pnuint16 status,
|
||||
NWCONN_HANDLE N_FAR * conn,
|
||||
pnstr8 rootPath,
|
||||
pnstr8 relPath,
|
||||
pnstr8 fullPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetDriveStatusConnRef
|
||||
(
|
||||
nuint16 driveNum,
|
||||
nuint16 pathFormat,
|
||||
pnuint16 status,
|
||||
pnuint32 connRef,
|
||||
pnstr8 rootPath,
|
||||
pnstr8 relPath,
|
||||
pnstr8 fullPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWGetFirstDrive
|
||||
(
|
||||
pnuint16 firstDrive
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWParseNetWarePath
|
||||
(
|
||||
const nstr8 N_FAR * path,
|
||||
NWCONN_HANDLE N_FAR * conn,
|
||||
NWDIR_HANDLE N_FAR * dirHandle,
|
||||
pnstr8 newPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWParseNetWarePathConnRef
|
||||
(
|
||||
const nstr8 N_FAR * path,
|
||||
pnuint32 connRef,
|
||||
NWDIR_HANDLE N_FAR * dirHandle,
|
||||
pnstr8 newPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWParsePathConnRef
|
||||
(
|
||||
const nstr8 N_FAR * path,
|
||||
pnstr8 serverName,
|
||||
pnuint32 connRef,
|
||||
pnstr8 volName,
|
||||
pnstr8 dirPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWParsePath
|
||||
(
|
||||
const nstr8 N_FAR * path,
|
||||
pnstr8 serverName,
|
||||
NWCONN_HANDLE N_FAR * conn,
|
||||
pnstr8 volName,
|
||||
pnstr8 dirPath
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( pnstr8 )
|
||||
NWStripServerOffPath
|
||||
(
|
||||
const nstr8 N_FAR * path,
|
||||
pnstr8 server
|
||||
);
|
||||
|
||||
N_EXTERN_LIBRARY( NWCCODE )
|
||||
NWCreateUNCPath
|
||||
(
|
||||
NWCONN_HANDLE conn,
|
||||
NWDIR_HANDLE dirHandle,
|
||||
pnstr8 path,
|
||||
pnstr8 UNCPath
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "npackoff.h"
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user