first round if cmake patches

This commit is contained in:
Mario Fetka 2010-01-18 17:43:19 +01:00
parent 00674cde8e
commit 00399f5467
366 changed files with 15646 additions and 40251 deletions

View File

112
CASA/CMakeLists.txt Normal file
View File

@ -0,0 +1,112 @@
project(CASA)
cmake_minimum_required(VERSION 2.6.0)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
enable_language(C CXX CSharp)
SET (VERSION_MAJOR "1")
SET (VERSION_MINOR "7")
SET (VERSION_SUB "0")
SET (VERSION_PATCH "0")
# SET (VERSION_DEVEL "1")
# SET (VERSION_SUFFIX "a")
SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_SUB})
IF (VERSION_PATCH)
SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_SUB}.${VERSION_PATCH})
ENDIF (VERSION_PATCH)
IF (VERSION_DEVEL)
# for snapshot Version Number
find_package(Subversion)
IF (Subversion_FOUND)
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} CASA)
MESSAGE("Current revision is ${CASA_WC_REVISION}")
ENDIF (Subversion_FOUND)
SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_SUB}.${CASA_WC_REVISION})
ENDIF (VERSION_DEVEL)
# Set install locations:
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
set(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Base directory for executables and libraries" FORCE)
set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
set(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/CASA" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX}/apparmor)" FORCE)
set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The bin install dir" FORCE)
set(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" CACHE PATH "The sbin install dir" FORCE)
set(SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Base directory for files which go to share/" FORCE)
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Base directory for files which go to include/" FORCE)
set(DOC_INSTALL_DIR "${SHARE_INSTALL_DIR}/CASA-${VERSION}" CACHE PATH "Base directory for files which go to doc/" FORCE)
set(MAN_INSTALL_DIR "${SHARE_INSTALL_DIR}/man" CACHE PATH "Base directory for files which go to man/" FORCE)
set(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "Base directory for configuration files" FORCE)
set(LIBROOT_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
include(CMakeJavaInformation)
include(CMakeDetermineJavaCompiler)
include(CPack REQUIRED)
find_package( PAM REQUIRED)
find_package( Mono REQUIRED)
find_package( PkgConfig REQUIRED)
find_package( JavaExtended REQUIRED)
find_package( JNI REQUIRED)
pkg_check_modules(GTK-SHARP REQUIRED gtk-sharp-2.0)
pkg_check_modules(GLADE-SHARP REQUIRED glade-sharp-2.0)
pkg_check_modules(GLIB REQUIRED glib)
pkg_check_modules(GNOME-KEYRING REQUIRED gnome-keyring-1)
pkg_check_modules(MONO-NUNIT REQUIRED mono-nunit)
message(STATUS "CASA version: ${VERSION}")
message(STATUS "suffix: ${LIB_SUFFIX}")
message(STATUS "exec pref ${EXEC_INSTALL_PREFIX}")
message(STATUS "bin: ${BIN_INSTALL_DIR}")
message(STATUS "sbin: ${SBIN_INSTALL_DIR}")
message(STATUS "lib: ${LIB_INSTALL_DIR}")
message(STATUS "libroot: ${LIBROOT_INSTALL_DIR}")
message(STATUS "include: ${INCLUDE_INSTALL_DIR}")
message(STATUS "libexec: ${LIBEXEC_INSTALL_DIR}")
message(STATUS "doc: ${DOC_INSTALL_DIR}")
message(STATUS "man: ${MAN_INSTALL_DIR}")
message(STATUS "sysconf: ${SYSCONF_INSTALL_DIR}")
# put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources
# are prefered over the already installed ones
# since cmake 2.4.1
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
add_subdirectory(micasadk)
add_subdirectory(micasad/lib)
add_subdirectory(sharp)
add_subdirectory(policy)
add_subdirectory(adlib)
add_subdirectory(micasad)
add_subdirectory(cli)
add_subdirectory(gui)
add_subdirectory(logincapture)
add_subdirectory(jwrapper)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Common Authentication Service Adapter (CASA).")
SET(CPACK_PACKAGE_VENDOR "http://code.google.com/p/casa-auth/")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_VERSION "${VERSION}")
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_SUFFIX}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CASA-${VERSION}${VERSION_SUFFIX}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "CASA-${VERSION}${VERSION_SUFFIX}")
SET(CPACK_GENERATOR TGZ)
SET(CPACK_SOURCE_GENERATOR TBZ2)
SET(CPACK_SOURCE_IGNORE_FILES CMakeCache.txt CMakeFiles progress.make cmake_install.cmake CPackConfig.cmake CPackSourceConfig.cmake "\\\\.git" "\\\\.svn" "\\\\.swp$" "\\\\.cvs" "\\\\.tar.gz" "\\\\.o")
SET(CPACK_SOURCE_TOPLEVEL_TAG "Linux-Source")
SET(CPACK_STRIP_FILES "")
SET(CPACK_SYSTEM_NAME "Linux")

View File

View File

@ -1,72 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
else
TARGET_CFG = Release
endif
if LINUX
SUBDIRS = micasacache common micasadk micasad/lib sharp \
policy adlib micasad cli gui logincapture jwrapper package
DIST_SUBDIRS = micasacache common micasadk micasad cli sharp \
policy adlib gui logincapture jwrapper package
endif
if WINDOWS
SUBDIRS = package
DIST_SUBDIRS = micasacache common micasadk jwrapper package
endif
EXTRA_DIST = include include/*.h \
doc/internal/*.doc doc/internal/*.xsd \
doc/product/*.pdf doc/product/*.txt \
readme-folder/readme* autogen.sh
CASALIBDIR = $(LIB)
if LIB64
CASABINDIR = bin64
else
CASABINDIR = bin
endif
.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 $(CASALIBDIR)
rm -rf *.suo $(CASABINDIR)
rm -rf BUILT
maintainer-clean-local:
rm -f configure Makefile.in casa-*.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

View File

View File

@ -20,61 +20,61 @@
*
***********************************************************************/
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.CASA.A-D.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.7.*")]
//
// 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("")]
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.CASA.A-D.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.7.*")]
//
// 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("")]

67
CASA/adlib/CMakeLists.txt Normal file
View File

@ -0,0 +1,67 @@
#################################
# Project
##############
project(adlib)
enable_language(CSharp)
IF (UNIX)
add_subdirectory(ad_gk)
add_subdirectory(ad_ff)
add_subdirectory(ad_kw)
ENDIF (UNIX)
#IF (WIN32)
# add_subdirectory(Novell.Casa.MiCasa)
#ENDIF (WIN32)
#################################
# Dependencies
##############
#################################
# Compiler Switches
##############
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
add_definitions( -D_GNU_SOURCE )
#################################
# Source Files
##############
SET(SRC_CS AssemblyInfo.cs
Common.cs
IDataEngine.cs
miCASAEngine.cs
AD_Facade.cs
KWalletEngine.cs
GKEngine.cs
FFEngine.cs
${CMAKE_SOURCE_DIR}/gui/Logger.cs)
#################################
# Linking
##############
SET(CS_FLAGS -r:${CMAKE_BINARY_DIR}/micasad/lib/Novell.CASA.Common.dll
-r:${CMAKE_BINARY_DIR}/sharp/NSSCSWrapper/Novell.CASA.miCASAWrapper.dll
-r:${CMAKE_BINARY_DIR}/policy/Novell.CASA.CASAPolicy.dll
-r:${CMAKE_CURRENT_BINARY_DIR}/ad_gk/Novell.CASA.DataEngines.GnomeKeyring.dll
-r:${CMAKE_CURRENT_BINARY_DIR}/ad_kw/Novell.CASA.DataEngines.KWallet.dll
-r:${CMAKE_CURRENT_BINARY_DIR}/ad_ff/Novell.CASA.DataEngines.FireFox.dll -pkg:gtk-sharp-2.0 /d:LINUX)
#CSHARP_ADD_LIBRARY(Novell.CASA.A-D "${SRC_CS}" REFERENCES Mono.Posix COMPILE_FLAGS /d:LINUX /warn:0 /keyfile:${KEYFILE})
CSHARP_ADD_LIBRARY(Novell.CASA.A-D "${SRC_CS}" REFERENCES Novell.CASA.DataEngines.KWallet Novell.CASA.Common Novell.CASA.miCASAWrapper Novell.CASA.CASAPolicy Novell.CASA.DataEngines.GnomeKeyring Novell.CASA.DataEngines.FireFox COMPILE_FLAGS -pkg:gtk-sharp-2.0 /d:LINUX)
ADD_DEPENDENCIES(Novell.CASA.A-D Novell.CASA.DataEngines.GnomeKeyring Novell.CASA.DataEngines.KWallet Novell.CASA.DataEngines.FireFox.dll)
#################################
# Install Files
##############
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Novell.CASA.A-D.dll DESTINATION ${LIBEXEC_INSTALL_DIR})

View File

@ -20,75 +20,75 @@
*
***********************************************************************/
using System;
namespace Novell.CASA.DataEngines.Common
{
public class ConstStrings
{
// Error codes
public static int CASA_SUCCESS = 0;
public static int CASA_OPERATION_FAILED = 1;
public static int CASA_STORE_NOT_AVAILABLE = 3;
public static int CASA_DATA_UNAVAILABLE = 4;
// Store IDs
public static string miCASA = "miCASA";
public static string KW = "KDE KWallet";
public static string GK = "GNOME Keyring";
public static string PM = "Password Manager";
public static string FF = "Firefox";
//Store Types
public static int CASA_STORE_MICASA = 0;
public static int CASA_STORE_FFOX = 1;
public static int CASA_STORE_KWALLET =3;
public static int CASA_STORE_MOZILLA = 2;
public static int CASA_STORE_GK = 4;
//CCF Tag Names
public static string CCF_ID = "ID";
public static string CCF_GKTAG = "GK";
public static string CCF_KW = "KWallet";
public static string CCF_GKKEYRING = "Keyring";
public static string CCF_SECRET = "Secret";
public static string CCF_TYPE = "Type";
public static string CCF_KEY = "Key";
public static string CCF_VALUE = "Value";
public static string CCF_TIME = "Time";
public static string CCF_CRTIME = "Creation";
public static string CCF_MDTIME = "Modified";
public static string CCF_ACTIME = "Accessed";
public static string CCF_LOCK = "Lock";
public static string CCF_LOCKSTATUS = "LockStatus";
public static string CCF_LOCKHAND = "LockOnIdle";
public static string CCF_LOCKTIME = "LockTimeout";
public static string CCF_WALLET = "Wallet";
public static string CCF_FOLDER = "Folder";
public static string CCF_KEYCHAIN = "Keychain";
public static string CCF_KEYCHAINNAME = "Default";
public static string CCF_ZONE = "Zone";
public static string CCF_SYNCH = "Synch";
public static string CCF_NAME = "Name";
public static string CCF_FFTAG = "FireFox";
public static string CCF_FFPROFILE = "Profile";
public static string CCF_PASSWDSTATUS = "PasswordStatus";
using System;
//Add Operation Types on CCF
namespace Novell.CASA.DataEngines.Common
{
public class ConstStrings
{
// Error codes
public static int CASA_SUCCESS = 0;
public static int CASA_OPERATION_FAILED = 1;
public static int CASA_STORE_NOT_AVAILABLE = 3;
public static int CASA_DATA_UNAVAILABLE = 4;
// Store IDs
public static string miCASA = "miCASA";
public static string KW = "KDE KWallet";
public static string GK = "GNOME Keyring";
public static string PM = "Password Manager";
public static string FF = "Firefox";
//Store Types
public static int CASA_STORE_MICASA = 0;
public static int CASA_STORE_FFOX = 1;
public static int CASA_STORE_KWALLET =3;
public static int CASA_STORE_MOZILLA = 2;
public static int CASA_STORE_GK = 4;
//CCF Tag Names
public static string CCF_ID = "ID";
public static string CCF_GKTAG = "GK";
public static string CCF_KW = "KWallet";
public static string CCF_GKKEYRING = "Keyring";
public static string CCF_SECRET = "Secret";
public static string CCF_TYPE = "Type";
public static string CCF_KEY = "Key";
public static string CCF_VALUE = "Value";
public static string CCF_TIME = "Time";
public static string CCF_CRTIME = "Creation";
public static string CCF_MDTIME = "Modified";
public static string CCF_ACTIME = "Accessed";
public static string CCF_LOCK = "Lock";
public static string CCF_LOCKSTATUS = "LockStatus";
public static string CCF_LOCKHAND = "LockOnIdle";
public static string CCF_LOCKTIME = "LockTimeout";
public static string CCF_WALLET = "Wallet";
public static string CCF_FOLDER = "Folder";
public static string CCF_KEYCHAIN = "Keychain";
public static string CCF_KEYCHAINNAME = "Default";
public static string CCF_ZONE = "Zone";
public static string CCF_SYNCH = "Synch";
public static string CCF_NAME = "Name";
public static string CCF_FFTAG = "FireFox";
public static string CCF_FFPROFILE = "Profile";
public static string CCF_PASSWDSTATUS = "PasswordStatus";
//Add Operation Types on CCF
public static int OPERATION_ADD_SECRET = 0;
public static int OPERATION_DELETE_SECRET = 1;
public static int OPERATION_MODIFY_SECRET = 2;
}
}
public static int OPERATION_DELETE_SECRET = 1;
public static int OPERATION_MODIFY_SECRET = 2;
}
}

View File

@ -20,36 +20,36 @@
*
***********************************************************************/
using System;
using System.Collections;
using System.Xml;
using System.Threading;
namespace Novell.CASA.DataEngines
{
/*
* Defines the interfaces to be implemenetd by all Data Engines.
*/
public interface DataEngine
{
XmlNode Aggregate();
int GetSecret(XmlNode secret);
int SetSecret(XmlNode secret, int opnType);
int SetSecret(XmlNode secret);
int Remove(XmlNode secret);
}
}
using System;
using System.Collections;
using System.Xml;
using System.Threading;
namespace Novell.CASA.DataEngines
{
/*
* Defines the interfaces to be implemenetd by all Data Engines.
*/
public interface DataEngine
{
XmlNode Aggregate();
int GetSecret(XmlNode secret);
int SetSecret(XmlNode secret, int opnType);
int SetSecret(XmlNode secret);
int Remove(XmlNode secret);
}
}

View File

@ -1,119 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
CS_EXTRA_FLAGS = $(CSCFLAGS_DEBUG)
else
TARGET_CFG = Release
endif
SUBDIRS = ad_kw ad_gk ad_ff
DIST_SUBDIRS = ad_kw ad_gk ad_ff
CASAROOT = ..
CASALIBDIR = $(CASAROOT)/$(LIB)
EXTRA_DIST = $(CSFILES)
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME =Novell.CASA.A-D
MODULE_EXT =dll
CSFILES = $(srcdir)/AssemblyInfo.cs \
$(srcdir)/Common.cs \
$(srcdir)/IDataEngine.cs \
$(srcdir)/miCASAEngine.cs \
$(srcdir)/AD_Facade.cs \
$(srcdir)/KWalletEngine.cs \
$(srcdir)/GKEngine.cs \
$(srcdir)/FFEngine.cs \
$(top_srcdir)/gui/Logger.cs
CSFILES_CSC := $(subst /,$(SEP),$(CSFILES))
CS_FLAGS = $(CSC_LIBFLAG) -pkg:gtk-sharp-2.0 /d:LINUX
CS_RESOURCES =
CS_LIBS =$(CASALIBDIR)/$(TARGET_CFG)/Novell.CASA.DataEngines.GnomeKeyring.dll \
$(CASALIBDIR)/$(TARGET_CFG)/Novell.CASA.DataEngines.KWallet.dll \
$(CASALIBDIR)/$(TARGET_CFG)/Novell.CASA.DataEngines.FireFox.dll \
$(CASALIBDIR)/$(TARGET_CFG)/Novell.CASA.CASAPolicy.dll \
$(CASALIBDIR)/$(TARGET_CFG)/Novell.CASA.miCASAWrapper.dll
CS_LIBPATH = $(CASALIBDIR)/$(TARGET_CFG) $(srcdir)/ad_gk/$(TARGET_CFG) $(srcdir)/ad_kw/$(TARGET_CFG) \
$(srcdir)/ad_ff/$(TARGET_CFG)
OBJDIR = ./$(TARGET_CFG)/$(LIB)
#OBJS = $(addprefix $(OBJDIR)/, $(CSFILES:%.dll=%.cs))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cs $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(CSFILES)
$(CSC) $(CS_FLAGS) $(CS_EXTRA_FLAGS) $(CS_LIBPATH:%=-lib:%) $(CS_LIBS:%=/r:%) -out:$@ $(CSFILES_CSC)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
# @echo [======== Linking $@ ========]
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,172 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{25D49F34-F655-4CCF-93F1-449243AF7A32}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>Novell.CASA.DataEngines</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<RootNamespace>Novell.CASA.DataEngines</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE; WIN32</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE; WIN32</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="atk-sharp">
<Name>atk-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\atk-sharp.dll</HintPath>
</Reference>
<Reference Include="gdk-sharp">
<Name>gdk-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\gdk-sharp.dll</HintPath>
</Reference>
<Reference Include="glade-sharp">
<Name>glade-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\glade-sharp.dll</HintPath>
</Reference>
<Reference Include="glib-sharp">
<Name>glib-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\glib-sharp.dll</HintPath>
</Reference>
<Reference Include="gtk-sharp">
<Name>gtk-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\gtk-sharp.dll</HintPath>
</Reference>
<Reference Include="pango-sharp">
<Name>pango-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\pango-sharp.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
<ProjectReference Include="..\micasad\lib\Novell.CASA.Common.csproj">
<Name>Novell.CASA.Common</Name>
<Project>{57CD94A2-5B4A-40C3-8189-CB760FB78357}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\policy\Novell.CASA.CASAPolicy.csproj">
<Name>Novell.CASA.CASAPolicy</Name>
<Project>{636A9D7E-BFB5-4EB9-96F8-51FF85A98826}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\sharp\NSSCSWrapper\Novell.CASA.miCASAWrapper.csproj">
<Name>Novell.CASA.miCASAWrapper</Name>
<Project>{E21DD887-22F4-4935-9851-409715F663B0}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AD_Facade.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ad_ff\FireFox.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ad_gk\GnomeKeyring.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ad_kw\KWalletEnum.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ad_kw\KWalletNative.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Common.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="FFEngine.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GKEngine.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IDataEngine.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="KWalletEngine.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="miCASAEngine.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -1,58 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastOpenVersion>7.10.3077</LastOpenVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ReferencePath>
</ReferencePath>
<CopyProjectDestinationFolder>
</CopyProjectDestinationFolder>
<CopyProjectUncPath>
</CopyProjectUncPath>
<CopyProjectOption>0</CopyProjectOption>
<ProjectView>ProjectFiles</ProjectView>
<ProjectTrust>0</ProjectTrust>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<EnableASPDebugging>false</EnableASPDebugging>
<EnableASPXDebugging>false</EnableASPXDebugging>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>
</StartArguments>
<StartPage>
</StartPage>
<StartProgram>
</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>false</StartWithIE>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<EnableASPDebugging>false</EnableASPDebugging>
<EnableASPXDebugging>false</EnableASPXDebugging>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>
</StartArguments>
<StartPage>
</StartPage>
<StartProgram>
</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>false</StartWithIE>
</PropertyGroup>
</Project>

View File

@ -20,61 +20,61 @@
*
***********************************************************************/
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.CASA.DataEngines.FireFox.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.6.*")]
//
// 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("")]
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.CASA.DataEngines.FireFox.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.7.*")]
//
// 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("")]

View File

@ -0,0 +1,56 @@
#################################
# Project
##############
project(ad_ff)
enable_language(CXX CSharp)
#################################
# Dependencies
##############
#################################
# Compiler Switches
##############
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/native
${GLIB_INCLUDE_DIRS}
${GNOME-KEYRING_INCLUDE_DIRS}
)
add_definitions( -D_GNU_SOURCE )
#################################
# Source Files
##############
add_library(ad_ff SHARED native/Common.cpp
native/CryptManager.cpp
native/DataManager.cpp
native/FirefoxPasswordManager.cpp
native/ProfileManager.cpp
native/SignonManager.cpp)
SET(SRC_CS FireFox.cs AssemblyInfo.cs)
#################################
# Linking
##############
set_target_properties(ad_ff PROPERTIES VERSION 1.1.1 SOVERSION 1)
target_link_libraries(ad_ff ${GLIB_LIBRARIES} ${GNOME-KEYRING_LIBRARIES})
#SET(CS_FLAGS ${GTK-SHARP_LIBRARIES} /d:LINUX /d:MONO)
#CSHARP_ADD_LIBRARY(Novell.CASA.DataEngines.FireFox "${SRC_CS}" REFERENCES Mono.Posix COMPILE_FLAGS /d:LINUX /d:MONO /warn:0 /keyfile:${KEYFILE})
CSHARP_ADD_LIBRARY(Novell.CASA.DataEngines.FireFox "${SRC_CS}")
#ADD_DEPENDENCIES(akonadi kde-dotnet akonadi-sharp smokeakonadi)
#################################
# Install Files
##############
install(TARGETS ad_ff DESTINATION ${LIB_INSTALL_DIR})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Novell.CASA.DataEngines.FireFox.dll DESTINATION ${LIBEXEC_INSTALL_DIR})

View File

@ -1,106 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
CS_EXTRA_FLAGS = $(CSCFLAGS_DEBUG)
else
TARGET_CFG = Release
endif
SUBDIRS = native
DIST_SUBDIRS = native
EXTRA_DIST = $(CSFILES)
CASAROOT = ../..
CASALIBDIR = $(CASAROOT)/$(LIB)
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME =Novell.CASA.DataEngines.FireFox
MODULE_EXT =dll
CSFILES = $(srcdir)/FireFox.cs \
$(srcdir)/AssemblyInfo.cs
CSFILES_CSC := $(subst /,$(SEP),$(CSFILES))
CS_FLAGS = $(CSC_LIBFLAG) -target:library
CS_RESOURCES =
CS_LIBS =
CS_LIBPATH =
OBJDIR = ./$(TARGET_CFG)/$(LIB)
#OBJS = $(addprefix $(OBJDIR)/, $(CSFILES:%.dll=%.cs))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cs $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(CSFILES)
$(CSC) $(CS_FLAGS) $(CS_EXTRA_FLAGS) -out:$@ $(CSFILES_CSC)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
# @echo [======== Linking $@ ========]
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,247 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="ad_firefox_native"
ProjectGUID="{BB304ECF-FCBA-4693-9D47-86749815DDC8}"
RootNamespace="ad_firefox_native"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FIREFOX_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/ad_ff.dll"
LinkIncremental="2"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/firefox.pdb"
SubSystem="2"
ImportLibrary="$(OutDir)/firefox.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FIREFOX_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/ad_ff.dll"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/firefox.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\native\Common.cpp"
>
</File>
<File
RelativePath=".\native\CryptManager.cpp"
>
</File>
<File
RelativePath=".\native\DataManager.cpp"
>
</File>
<File
RelativePath=".\native\FirefoxPasswordManager.cpp"
>
</File>
<File
RelativePath=".\native\ProfileManager.cpp"
>
</File>
<File
RelativePath=".\native\SignonManager.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\native\Common.h"
>
</File>
<File
RelativePath=".\native\CryptManager.h"
>
</File>
<File
RelativePath=".\native\DataManager.h"
>
</File>
<File
RelativePath=".\native\FirefoxPasswordManager.h"
>
</File>
<File
RelativePath=".\native\ProfileManager.h"
>
</File>
<File
RelativePath=".\native\SignonManager.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,75 +1,75 @@
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
#ifndef __FPM_COMMON_H__
#define __FPM_COMMON_H__
// Common structure declarations...
struct Host
{
char *hostName;
struct HostElement *child;
struct Host *next;
};
// Each name/value pair for the Host is represented by HostElement
struct HostElement
{
char *name;
char *value;
char *formUrl;
int isPassword;
struct HostElement *next;
};
struct RejectHost
{
char *hostName;
struct RejectHost *next;
};
// Error codes
#define FPM_PROFILE_NOT_PRESENT -101 // Specified profile does not exist
#define FPM_LIBRARY_LOAD_FAILED -102 // Failed to load the firefox library
#define FPM_LIBRARY_INIT_FAILED -103 // Failed to initialize firefox library
#define FPM_PROFILE_NOT_INITIALIZED -104 // Specified profile not initialized
#define FPM_MASTERPASSWORD_WRONG -105 // Wrong master password is specified
#define FPM_SIGNON_DATASTORE_EMPTY -106 // Internal signon data store is empty
#define FPM_SIGNON_FILE_NOT_PRESENT -107 // Signon file is not present in profile directory
#define FPM_SIGNON_FILE_READ_ERROR -108 // Error in reading signon file
#define FPM_SIGNON_FILE_WRITE_ERROR -109 // Error in writing signon file
#define FPM_SIGNON_FILE_LOCKED -110 // Signon file is locked.
#define FPM_INSUFFICIENT_MEMORY -111 // Insufficient memory.
#define FPM_ILLEGAL_HOSTNAME -112 // Hostname is not in proper form
#define FPM_HOSTNAME_NOT_PRESENT -113 // Specified hostname is not present
#define FPM_NAME_NOT_PRESENT -114 // Specified name is not present
#define FPM_SIGNON_FILE_INVALID_DATA -115 // Invalid data is read from signon file
#define FPM_PROFILE_LIMIT_EXCEEDED -116 // Maximum number of profiles exceeded...
#endif
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
#ifndef __FPM_COMMON_H__
#define __FPM_COMMON_H__
// Common structure declarations...
struct Host
{
char *hostName;
struct HostElement *child;
struct Host *next;
};
// Each name/value pair for the Host is represented by HostElement
struct HostElement
{
char *name;
char *value;
char *formUrl;
int isPassword;
struct HostElement *next;
};
struct RejectHost
{
char *hostName;
struct RejectHost *next;
};
// Error codes
#define FPM_PROFILE_NOT_PRESENT -101 // Specified profile does not exist
#define FPM_LIBRARY_LOAD_FAILED -102 // Failed to load the firefox library
#define FPM_LIBRARY_INIT_FAILED -103 // Failed to initialize firefox library
#define FPM_PROFILE_NOT_INITIALIZED -104 // Specified profile not initialized
#define FPM_MASTERPASSWORD_WRONG -105 // Wrong master password is specified
#define FPM_SIGNON_DATASTORE_EMPTY -106 // Internal signon data store is empty
#define FPM_SIGNON_FILE_NOT_PRESENT -107 // Signon file is not present in profile directory
#define FPM_SIGNON_FILE_READ_ERROR -108 // Error in reading signon file
#define FPM_SIGNON_FILE_WRITE_ERROR -109 // Error in writing signon file
#define FPM_SIGNON_FILE_LOCKED -110 // Signon file is locked.
#define FPM_INSUFFICIENT_MEMORY -111 // Insufficient memory.
#define FPM_ILLEGAL_HOSTNAME -112 // Hostname is not in proper form
#define FPM_HOSTNAME_NOT_PRESENT -113 // Specified hostname is not present
#define FPM_NAME_NOT_PRESENT -114 // Specified name is not present
#define FPM_SIGNON_FILE_INVALID_DATA -115 // Invalid data is read from signon file
#define FPM_PROFILE_LIMIT_EXCEEDED -116 // Maximum number of profiles exceeded...
#endif

View File

@ -1,65 +1,65 @@
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
#ifndef __FPM_DATA_MANAGER_H__
#define __FPM_DATA_MANAGER_H__
#include "FirefoxPasswordManager.h"
#include "Common.h"
class DataManager
{
public:
Host *hostList;
RejectHost *rejectHostList;
DataManager();
virtual ~DataManager();
int AddRejectHost(char *hostName);
int RemoveRejectHost(char *hostName);
void PrintAllRejectHosts();
int AddHost(char *hostName);
int AddHost(Host *host);
int ModifyHost(struct Host *host);
int ModifyHost(char *oldHostName, char *newHostName);
int RemoveHost(char *hostName);
void PrintAllHosts();
int AddHostElement(char *hostName, char *name, char *value, unsigned char isPassword, char *formUrl);
int RemoveHostElement(char *hostName, char *clearValue);
Host* DuplicateHost(Host *host);
int RemoveAllData();
int RemoveAllRejectHosts();
int RemoveAllHosts();
};
#endif
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
#ifndef __FPM_DATA_MANAGER_H__
#define __FPM_DATA_MANAGER_H__
#include "FirefoxPasswordManager.h"
#include "Common.h"
class DataManager
{
public:
Host *hostList;
RejectHost *rejectHostList;
DataManager();
virtual ~DataManager();
int AddRejectHost(char *hostName);
int RemoveRejectHost(char *hostName);
void PrintAllRejectHosts();
int AddHost(char *hostName);
int AddHost(Host *host);
int ModifyHost(struct Host *host);
int ModifyHost(char *oldHostName, char *newHostName);
int RemoveHost(char *hostName);
void PrintAllHosts();
int AddHostElement(char *hostName, char *name, char *value, unsigned char isPassword, char *formUrl);
int RemoveHostElement(char *hostName, char *clearValue);
Host* DuplicateHost(Host *host);
int RemoveAllData();
int RemoveAllRejectHosts();
int RemoveAllHosts();
};
#endif

View File

@ -1,123 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = $(CXXFILES) *.h
CASAROOT = ../../..
CASALIBDIR = $(CASAROOT)/$(LIB)
BUILD_VER = 1.1.1
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
CXX = g++
MODULE_NAME =libad_ff
MODULE_EXT =so
CXXFILES = $(srcdir)/Common.cpp \
$(srcdir)/CryptManager.cpp \
$(srcdir)/FirefoxPasswordManager.cpp \
$(srcdir)/ProfileManager.cpp \
$(srcdir)/SignonManager.cpp \
$(srcdir)/DataManager.cpp
CXXFILES_CXX :=
INCLUDES = -I. -I.. -I$(CASAROOT)/include \
-I/opt/gnome/include/gnome-keyring-1
CXXFLAGS = $(CPP_LIBFLAG) $(INCLUDES)
EXTRA_CXXFLAGS = -fPIC -DPIC -DSSCS_LINUX_PLAT_F -DQT_THREAD_SUPPORT -DQT_CLEAN_NANESPACE \
-DQT_NO_ASCII_CAS -O2 -fmessage-length=0 -Wall -g -D_REENTRANT \
-DALIGNMENT -DN_PLAT_UNIX -DUNIX -DLINUX -DIAPX386
CXX_RESOURCES =
LIBS = -lpthread -ldl -L/opt/kde3/lib
LDFLAGS = -fno-exception -fno-check-new -Wl,-Bsymbolic -shared -pthread -O2 \
-Wl,-soname -Wl,libkwallets_rw.so.1
EXTRA_LDFLAGS = -L/usr/$(LIB) -lqt-mt -L/usr/X11R6/$(LIB) -L/usr/lib/qt3/$(LIB)
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS = $(addprefix $(OBJDIR)/, $(CXXFILES:%.cpp=%.o))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cs $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(EXTRA_CXXFLAGS) -o $@ $<
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER): $(OBJDIR) $(OBJS)
@echo [======== Linking $@ ========]
c++ -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(LIBS)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
ln -sf $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).1
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,78 +1,78 @@
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
// SignonManager.h: interface for the SignonManager class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __FPM_SIGNON_MANAGER_H__
#define __FPM_SIGNON_MANAGER_H__
#include "FirefoxPasswordManager.h"
#include "Common.h"
#include "DataManager.h"
#include "CryptManager.h"
class SignonManager
{
DataManager dataManager;
CryptManager cryptManager;
FILE *signonFile;
public:
SignonManager();
virtual ~SignonManager();
int OpenSignonFile(char *firefoxProfileDir, char *fileName, char *accessType, bool create);
int CloseSignonFile();
int ReadLine(char *buffer, int size);
char ReadChar();
Unichar ReadCharUTF8();
int WriteCharUTF8(Unichar c);
int WriteLine(char *line);
int LoadSignonData(char *firefoxProfileDir);
int WriteSignonData(char *firefoxProfileDir);
int RemoveSignonData();
int AddUser(char *host, char *userName, char *password);
int RemoveHost(char *hostName);
int ModifyHost(struct Host *host);
int AddHost(struct Host *host);
struct Host* GetHostInfo();
void SetupFunctions(void *funList[]);
int CheckSignonPref();
};
#endif
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
// SignonManager.h: interface for the SignonManager class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __FPM_SIGNON_MANAGER_H__
#define __FPM_SIGNON_MANAGER_H__
#include "FirefoxPasswordManager.h"
#include "Common.h"
#include "DataManager.h"
#include "CryptManager.h"
class SignonManager
{
DataManager dataManager;
CryptManager cryptManager;
FILE *signonFile;
public:
SignonManager();
virtual ~SignonManager();
int OpenSignonFile(char *firefoxProfileDir, char *fileName, char *accessType, bool create);
int CloseSignonFile();
int ReadLine(char *buffer, int size);
char ReadChar();
Unichar ReadCharUTF8();
int WriteCharUTF8(Unichar c);
int WriteLine(char *line);
int LoadSignonData(char *firefoxProfileDir);
int WriteSignonData(char *firefoxProfileDir);
int RemoveSignonData();
int AddUser(char *host, char *userName, char *password);
int RemoveHost(char *hostName);
int ModifyHost(struct Host *host);
int AddHost(struct Host *host);
struct Host* GetHostInfo();
void SetupFunctions(void *funList[]);
int CheckSignonPref();
};
#endif

View File

@ -1,5 +0,0 @@
LINK = $(CPP) \
-shared \
-Wl \
-o $(LIBDIR)$(XTRA)/lib$(TARGET).so.$(BLD_VER) \
$(OBJDIR)*.$(O)

View File

@ -1,7 +0,0 @@
OBJS=\
Common.$(O) \
CryptManager.$(O) \
FirefoxPasswordManager.$(O) \
ProfileManager.$(O) \
SignonManager.$(O) \
DataManager.$(O)

View File

@ -1,3 +0,0 @@
OBJS=\
AssembyInfo\
FireFox

View File

@ -1,3 +0,0 @@
SRC=\
AssemblyInfo.cs\
FireFox.cs

View File

@ -20,61 +20,61 @@
*
***********************************************************************/
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.CASA.DataEngines.GnomeKeyring.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.6.*")]
//
// 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("")]
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.CASA.DataEngines.GnomeKeyring.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.7.*")]
//
// 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("")]

View File

@ -0,0 +1,51 @@
#################################
# Project
##############
project(ad_gk)
enable_language(C CSharp)
#################################
# Dependencies
##############
#################################
# Compiler Switches
##############
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/native
${GLIB_INCLUDE_DIRS}
${GNOME-KEYRING_INCLUDE_DIRS}
)
add_definitions( -D_GNU_SOURCE )
#################################
# Source Files
##############
add_library(ad_gk SHARED native/ad_gk.c)
SET(SRC_CS GnomeKeyring.cs AssemblyInfo.cs)
#################################
# Linking
##############
set_target_properties(ad_gk PROPERTIES VERSION 1.1.1 SOVERSION 1)
target_link_libraries(ad_gk ${GLIB_LIBRARIES} ${GNOME-KEYRING_LIBRARIES})
SET(CS_FLAGS ${GTK-SHARP_LIBRARIES})
#CSHARP_ADD_LIBRARY(Novell.CASA.DataEngines.GnomeKeyring "${SRC_CS}" REFERENCES Mono.Posix COMPILE_FLAGS /d:LINUX /d:MONO /warn:0 /keyfile:${KEYFILE})
CSHARP_ADD_LIBRARY(Novell.CASA.DataEngines.GnomeKeyring "${SRC_CS}" COMPILE_FLAGS -pkg:gtk-sharp-2.0)
#ADD_DEPENDENCIES(akonadi kde-dotnet akonadi-sharp smokeakonadi)
#################################
# Install Files
##############
install(TARGETS ad_gk DESTINATION ${LIB_INSTALL_DIR})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Novell.CASA.DataEngines.GnomeKeyring.dll DESTINATION ${LIBEXEC_INSTALL_DIR})

View File

@ -1,105 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
CS_EXTRA_FLAGS = $(CSCFLAGS_DEBUG)
else
TARGET_CFG = Release
endif
SUBDIRS = native
DIST_SUBDIRS = native
EXTRA_DIST = $(CSFILES)
CASAROOT = ../..
CASALIBDIR = $(CASAROOT)/$(LIB)
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME =Novell.CASA.DataEngines.GnomeKeyring
MODULE_EXT =dll
CSFILES = $(srcdir)/GnomeKeyring.cs
CSFILES_CSC := $(subst /,$(SEP),$(CSFILES))
CS_FLAGS = $(CSC_LIBFLAG) /target:library -pkg:gtk-sharp-2.0
CS_RESOURCES =
CS_LIBS =
CS_LIBPATH =
OBJDIR = ./$(TARGET_CFG)/$(LIB)
#OBJS = $(addprefix $(OBJDIR)/, $(CSFILES:%.dll=%.cs))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cs $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(CSFILES)
$(CSC) $(CS_FLAGS) $(CS_EXTRA_FLAGS) -out:$@ $(CSFILES_CSC)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
# @echo [======== Linking $@ ========]
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,131 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = $(CFILES) *.h
CASAROOT = ../../..
CASALIBDIR = $(CASAROOT)/$(LIB)
BUILD_VER = 1.1.1
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME = libad_gk
MODULE_EXT = so
CFILES = $(srcdir)/ad_gk.c
LIBDIR = $(LIB)
CSFILES_CSC :=
INCLUDES = -I. -I.. -I$(CASAROOT)/include \
-I/opt/gnome/include/gnome-keyring-1 \
-I/opt/gnome/include/glib-2.0 \
-I/opt/gnome/$(LIBDIR)/glib-2.0/include \
-I/usr/include/glib-2.0 \
-I/usr/$(LIBDIR)/glib-2.0/include \
-L/opt/gnome/$(LIBDIR) -lglib-2.0
RESOURCES =
EXTRA_CFLAGS =
CFLAGS += $(INCLUDES) $(DEFINES)
LIBS = -lpthread -ldl
LDFLAGS = -fno-exceptions -fno-check-new -Wl,-Bsymbolic -shared -pthread -O2 \
-Wl,-rpath -Wl,/usr/$(LIBDIR) -Wl,-soname -Wl,libad_gk.so.1
EXTRA_LDFLAGS = -L/opt/gnome/$(LIBDIR) -L/usr/include -lglib-2.0 -L/$(CASAROOT)/$(LIBDIR)
OBJDIR = ./$(TARGET_CFG)/$(LIBDIR)
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
EXTRA_DIST = $(CFILES) *.h
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/%.o: %.c
$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $<
$(OBJDIR)/%.o: %.cpp
$(CC) -c $(CFLAGS) -o $@ $<
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
# @echo [======== Linking $@ ========]
# $(LINK) -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(LIBS)
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER): $(OBJDIR) $(OBJS)
@echo [======== Linking $@ ========]
c++ -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(LIBS)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
ln -sf $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).1
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,15 +0,0 @@
LINK = $(CPP) \
-Wl,-Bsymbolic \
-shared \
-pthread\
-O2 -fno-exceptions -fno-check-new\
-Wl,-rpath -Wl,/usr/lib$(ARC) \
-L/usr/lib$(ARC) -lpthread -lc -ldl \
-L/opt/gnome/lib$(ARC) -lglib-2.0 \
-Wl,-soname -Wl,lib$(TARGET).so.$(PROD_NUM) \
-o $(LIBDIR)$(XTRA)/lib$(TARGET).so.$(BLD_VER) \
-L$(LIBDIR)$(XTRA) \
$(OBJDIR)*.$(O)

View File

@ -1,2 +0,0 @@
OBJS=\
ad_gk.$(O)

View File

@ -1,3 +0,0 @@
OBJS=\
AssembyInfo\
GnomeKeyring

View File

@ -1,3 +0,0 @@
SRC=\
AssemblyInfo.cs\
GnomeKeyring.cs

View File

@ -20,61 +20,61 @@
*
***********************************************************************/
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.CASA.DataEngines.KWallet.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.6.*")]
//
// 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("")]
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.CASA.DataEngines.KWallet.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.7.*")]
//
// 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("")]

View File

@ -0,0 +1,51 @@
#################################
# Project
##############
project(kwallets)
enable_language(CXX CSharp)
#################################
# Dependencies
##############
#################################
# Compiler Switches
##############
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/native
${GLIB_INCLUDE_DIRS}
${GNOME-KEYRING_INCLUDE_DIRS}
)
add_definitions( -D_GNU_SOURCE )
#################################
# Source Files
##############
#add_library(kwallets_rw SHARED native/kwallets_rw.cpp)
SET(SRC_CS AssemblyInfo.cs KWalletEnum.cs KWalletNative.cs)
#################################
# Linking
##############
#set_target_properties(kwallets_rw PROPERTIES VERSION 1.1.1 SOVERSION 1)
#target_link_libraries(kwallets_rw ${GLIB_LIBRARIES} ${GNOME-KEYRING_LIBRARIES})
#SET(CS_FLAGS ${GTK-SHARP_LIBRARIES})
#CSHARP_ADD_LIBRARY(Novell.CASA.DataEngines.KWallet "${SRC_CS}" REFERENCES Mono.Posix COMPILE_FLAGS /d:LINUX /d:MONO /warn:0 /keyfile:${KEYFILE})
CSHARP_ADD_LIBRARY(Novell.CASA.DataEngines.KWallet "${SRC_CS}")
#ADD_DEPENDENCIES(akonadi kde-dotnet akonadi-sharp smokeakonadi)
#################################
# Install Files
##############
#install(TARGETS kwallets_rw DESTINATION ${LIB_INSTALL_DIR})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Novell.CASA.DataEngines.KWallet.dll DESTINATION ${LIBEXEC_INSTALL_DIR})

View File

@ -1,107 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
CS_EXTRA_FLAGS = $(CSCFLAGS_DEBUG)
else
TARGET_CFG = Release
endif
#SUBDIRS = native
#DIST_SUBDIRS = native
EXTRA_DIST = $(CSFILES)
CASAROOT = ../..
CASALIBDIR = $(CASAROOT)/$(LIB)
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME =Novell.CASA.DataEngines.KWallet
MODULE_EXT =dll
CSFILES = $(srcdir)/AssemblyInfo.cs \
$(srcdir)/KWalletEnum.cs \
$(srcdir)/KWalletNative.cs
CSFILES_CSC := $(subst /,$(SEP),$(CSFILES))
CS_FLAGS = $(CSC_LIBFLAG)
CS_RESOURCES =
CS_LIBS =
CS_LIBPATH =
OBJDIR = ./$(TARGET_CFG)/$(LIB)
#OBJS = $(addprefix $(OBJDIR)/, $(CSFILES:%.dll=%.cs))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cs $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(CSFILES)
$(CSC) $(CS_FLAGS) $(CS_EXTRA_FLAGS) -out:$@ $(CSFILES_CSC)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
# @echo [======== Linking $@ ========]
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,125 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = $(CXXFILES) $(CXX_MOC_FILES) *.h
CASAROOT = ../../..
CASALIBDIR = $(CASAROOT)/$(LIB)
BUILD_VER = 1.1.1
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
####this needs to be defined in configure.in
MOC = /usr/lib/qt3/bin/moc
CXX = g++
MODULE_NAME =libkwallets_rw
MODULE_EXT =so
CXXFILES = $(srcdir)/kwallets_rw.cpp
CXX_MOC_FILES = kwallets_rw.moc
CXXFILES_CXX :=
INCLUDES = -I. -I.. -I$(CASAROOT)/include \
-I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include -I/opt/gnome/include/gnome-keyring-1/
CXXFLAGS = $(CPP_LIBFLAG) $(INCLUDES)
EXTRA_CXXFLAGS = -fPIC -DPIC -DSSCS_LINUX_PLAT_F -DQT_THREAD_SUPPORT -DQT_CLEAN_NANESPACE \
-DQT_NO_ASCII_CAS -O2 -fmessage-length=0 -Wall -g -D_REENTRANT \
-DALIGNMENT -DN_PLAT_UNIX -DUNIX -DLINUX -DIAPX386
CXX_RESOURCES =
LIBS = -lpthread -ldl
LDFLAGS = -fno-exception -fno-check-new -Wl,-Bsymbolic -shared -pthread -O2 \
-Wl,-soname -Wl,libkwallets_rw.so.1
EXTRA_LDFLAGS = -L/opt/kde3/$(LIB) -lkwalletclient \
-lqt-mt -L/usr/X11R6/$(LIB) -L/usr/lib/qt3/$(LIB) -lqt-mt
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS = $(addprefix $(OBJDIR)/, $(CXXFILES:%.cpp=%.o))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cs $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(CXX_MOC_FILES): kwallets_rw.h
$(MOC) $^ -o $@
$(OBJDIR)/%.o: %.cpp
# $(CXX) -c $(CXXFLAGS) $(EXTRA_CXXFLAGS) -o $@ $<
c++ -c -g $(CXXFLAGS) $(EXTRA_CXXFLAGS) -o $@ $<
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER):$(CXX_MOC_FILES) $(OBJDIR) $(OBJS)
@echo [======== Linking $@ ========]
c++ -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(LIBS)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
ln -sf $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).1
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
if [ -f $(CXX_MOC_FILES) ]; then rm -f $(CXX_MOC_FILES); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,14 +0,0 @@
LINK = $(CPP) \
-Wl,-Bsymbolic \
-shared \
-pthread \
-O2 -fno-exceptions -fno-check-new \
-Wl,-rpath -Wl,/usr/lib$(ARC) \
-L/usr/lib$(ARC) -lpthread -lc -ldl \
-L/opt/kde3/lib$(ARC) -lkwalletclient -lqt-mt \
-L/usr/X11R6/lib$(ARC) \
-L/usr/lib/qt3/lib$(ARC) -lqt-mt \
-Wl,-soname -Wl,lib$(TARGET).so.$(PROD_NUM) \
-o $(LIBDIR)$(XTRA)/lib$(TARGET).so.$(BLD_VER) \
-L$(LIBDIR)$(XTRA) \
$(OBJDIR)*.$(O)

View File

@ -1,2 +0,0 @@
OBJS=\
kwallets_rw.$(O)

View File

@ -1,4 +0,0 @@
OBJS=\
AssemblyInfo\
KWalletEnum\
KWalletNative

View File

@ -1,4 +0,0 @@
SRC=\
AssemblyInfo.cs\
KWalletEnum.cs\
KWalletNative.cs

View File

@ -83,58 +83,58 @@ namespace Novell.CASA.DataEngines
StringEnumerator se = sc.GetEnumerator();
se.Reset();
while (se.MoveNext())
{
try
{
Secret secret = store.GetSecret(se.Current);
NameValueCollection nvc = secret.GetKeyValueCollection();
mi_secret = doc.CreateElement(ConstStrings.CCF_SECRET);
synchAttr = doc.CreateAttribute(ConstStrings.CCF_SYNCH);
//TBD:
synchAttr.Value = "Persistent Secret";
secidAttr = doc.CreateAttribute(ConstStrings.CCF_ID);
secidAttr.Value = se.Current;
mi_secret.SetAttributeNode(secidAttr);
mi_secret.SetAttributeNode(synchAttr);
for (int i = 0; i < nvc.Count; i++)
{
sKey = nvc.GetKey(i);
sValue = nvc.Get(sKey);
//Key
key1 = doc.CreateElement(ConstStrings.CCF_KEY);
Atr = doc.CreateAttribute(ConstStrings.CCF_ID);
Atr.Value = sKey;
key1.SetAttributeNode(Atr);
//Value
value1 = doc.CreateElement(ConstStrings.CCF_VALUE);
value1.InnerText = sValue;
key1.AppendChild(value1);
mi_secret.AppendChild(key1);
}
while (se.MoveNext())
{
try
{
Secret secret = store.GetSecret(se.Current);
NameValueCollection nvc = secret.GetKeyValueCollection();
mi_secret = doc.CreateElement(ConstStrings.CCF_SECRET);
synchAttr = doc.CreateAttribute(ConstStrings.CCF_SYNCH);
//TBD:
synchAttr.Value = "Persistent Secret";
secidAttr = doc.CreateAttribute(ConstStrings.CCF_ID);
secidAttr.Value = se.Current;
mi_secret.SetAttributeNode(secidAttr);
mi_secret.SetAttributeNode(synchAttr);
for (int i = 0; i < nvc.Count; i++)
{
sKey = nvc.GetKey(i);
sValue = nvc.Get(sKey);
//Key
key1 = doc.CreateElement(ConstStrings.CCF_KEY);
Atr = doc.CreateAttribute(ConstStrings.CCF_ID);
Atr.Value = sKey;
key1.SetAttributeNode(Atr);
//Value
value1 = doc.CreateElement(ConstStrings.CCF_VALUE);
value1.InnerText = sValue;
key1.AppendChild(value1);
mi_secret.AppendChild(key1);
}
//Time
XmlElement Time1 = doc.CreateElement(ConstStrings.CCF_TIME);
XmlElement zone1 = doc.CreateElement(ConstStrings.CCF_ZONE);
XmlElement zone1 = doc.CreateElement(ConstStrings.CCF_ZONE);
zone1.InnerText = DateTime.Today.ToString();
XmlElement cr1 = doc.CreateElement(ConstStrings.CCF_CRTIME);
XmlElement cr1 = doc.CreateElement(ConstStrings.CCF_CRTIME);
cr1.InnerText = secret.GetCreateTime().Ticks.ToString();
XmlElement mod1 = doc.CreateElement(ConstStrings.CCF_MDTIME);
XmlElement mod1 = doc.CreateElement(ConstStrings.CCF_MDTIME);
mod1.InnerText = secret.GetModifiedTime().Ticks.ToString();
//XmlElement acc1 = doc.CreateElement(ConstStrings.CCF_ACTIME);
@ -146,14 +146,14 @@ namespace Novell.CASA.DataEngines
//Time1.AppendChild(acc1);
mi_secret.AppendChild(Time1);
//Finally Add Secret to Elem
keychain.AppendChild(mi_secret);
}
catch (Exception)
{
//Console.WriteLine("Secret Not Found: " + se.Current);
//Finally Add Secret to Elem
keychain.AppendChild(mi_secret);
}
catch (Exception)
{
//Console.WriteLine("Secret Not Found: " + se.Current);
}
}
}
@ -189,7 +189,7 @@ namespace Novell.CASA.DataEngines
{
XmlAttributeCollection atcol = secret.Attributes;
String secretid = atcol["ID"].InnerXml;
String secretid = atcol["ID"].InnerXml;
Secret secretVal = store.GetSecret(secretid);
NameValueCollection nvc = secretVal.GetKeyValueCollection();

View File

@ -1,11 +0,0 @@
OBJS=\
AssemblyInfo\
Common\
IDataEngine\
miCASAEngine\
AD_Facade\
KWalletEngine\
GKEngine \
FFEngine \
../c_gui/Logger

View File

@ -1,7 +0,0 @@
OBJS=\
Common\
IDataEngine\
miCASAEngine\
AD_Facade\
..\\c_gui\\Logger.cs

View File

@ -1,10 +0,0 @@
SRC=\
AssemblyInfo.cs\
Common.cs\
IDataEngine.cs\
miCASAEngine.cs\
AD_Facade.cs\
KWalletEngine.cs\
GKEngine.cs \
FFEngine.cs \
../c_gui/Logger.cs

View File

@ -1,6 +0,0 @@
SRC=\
Common.cs\
IDataEngine.cs\
miCASAEngine.cs\
AD_Facade.cs\
..\\c_gui\\Logger.cs

View File

@ -1,130 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=CASA
TEST_TYPE=-f
FILE=include/micasa.h
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.9
ACLOCAL=aclocal-1.9
($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

View File

@ -1,2 +0,0 @@
CASA
targetarch ia64 block!

View File

@ -1,55 +0,0 @@
#!/bin/bash
## creating ENV varaibles
SOURCE_DIR=`pwd`
export BUILD_ROOT=$SOURCE_DIR/../autobuild/BUILD
PACKAGE=CASA
VERSION=1.7.$1
TEMP_DIR=$SOURCE_DIR/SOURCES
BUILT_DIR=$BUILD_ROOT/usr/src/packages/BUILD/CASA-1.7.$1
RPMS_DIR=$BUILD_ROOT/usr/src/packages
##creating tar.gz
rm -rf ../bld_tst
mkdir ../bld_tst
mkdir ../bld_tst/CASA-1.7.$1
cp -R ./* ../bld_tst/CASA-1.7.$1
cd ../bld_tst/CASA-1.7.$1
sed -i "s/\(AM_INIT_AUTOMAKE.*\))/\AM_INIT_AUTOMAKE\(CASA, 1\.7\.$1\)/" ./configure.in
find . -name "*.lux" | xargs dos2unix > /dev/null 2>&1
find . -name "mk*" | xargs dos2unix > /dev/null 2>&1
find . -name "mk*" | xargs chmod +x > /dev/null 2>&1
find . -name "Make*" | xargs dos2unix > /dev/null 2>&1
find . -name "*.c" | xargs dos2unix > /dev/null 2>&1
find . -name "*.cs" | xargs dos2unix > /dev/null 2>&1
find . -name "*.cpp" | xargs dos2unix > /dev/null 2>&1
find . -name "*.h" | xargs dos2unix > /dev/null 2>&1
find . -name "link*" | xargs dos2unix > /dev/null 2>&1
find . -name ".svn" | xargs rm -rf > /dev/null 2>&1
find . -name "*.sh" | xargs dos2unix > /dev/null 2>&1
find . -name "*.sh" | xargs chmod +x > /dev/null 2>&1
find . -name "*ver.txt" | xargs dos2unix > /dev/null 2>&1
find . -name "*build.txt" | xargs dos2unix > /dev/null 2>&1
find . -name "*.mak" | xargs dos2unix > /dev/null 2>&1
cd ..
tar cjf ../CASA-1.7.$1.tar.bz2 ./CASA-1.7.$1
#creating spec file
cd $SOURCE_DIR
mkdir --parents $PRODUCTS_DIR $TEMP_DIR
cp ../CASA-1.7.$1.tar.bz2 $TEMP_DIR
cp $SOURCE_DIR/package/linux/CASA.spec.in $TEMP_DIR/CASA.spec
sed -i "s/@VERSION@/1.7.$1/" $TEMP_DIR/CASA.spec
sed -i "s/@PACKAGE@/CASA/" $TEMP_DIR/CASA.spec
cp $SOURCE_DIR/CASA.changes $TEMP_DIR
cd $TEMP_DIR
##call autobuild
. /opt/SuSE/bin/.profile
sudo build --clean
##copy rpms to temp directoy
cp -rf $RPMS_DIR/RPMS $TEMP_DIR
cp -rf $RPMS_DIR/SRPMS $TEMP_DIR

View File

@ -1,56 +0,0 @@
#!/bin/bash
## creating ENV varaibles
SOURCE_DIR=`pwd`
export BUILD_ROOT=$SOURCE_DIR/../autobuild/BUILD
PACKAGE=CASA
VERSION=1.7.$1
TEMP_DIR=$SOURCE_DIR/SOURCES
BUILT_DIR=$BUILD_ROOT/usr/src/packages/BUILD/CASA-1.7.$1
RPMS_DIR=$BUILD_ROOT/usr/src/packages
##creating tar.gz
rm -rf ../bld_tst
mkdir ../bld_tst
mkdir ../bld_tst/CASA-1.7.$1
cp -R ./* ../bld_tst/CASA-1.7.$1
cd ../bld_tst/CASA-1.7.$1
sed -i "s/\(AM_INIT_AUTOMAKE.*\))/\AM_INIT_AUTOMAKE\(CASA, 1\.7\.$1\)/" ./configure.in
find . -name "*.lux" | xargs dos2unix > /dev/null 2>&1
find . -name "mk*" | xargs dos2unix > /dev/null 2>&1
find . -name "mk*" | xargs chmod +x > /dev/null 2>&1
find . -name "Make*" | xargs dos2unix > /dev/null 2>&1
find . -name "*.c" | xargs dos2unix > /dev/null 2>&1
find . -name "*.cs" | xargs dos2unix > /dev/null 2>&1
find . -name "*.cpp" | xargs dos2unix > /dev/null 2>&1
find . -name "*.h" | xargs dos2unix > /dev/null 2>&1
find . -name "link*" | xargs dos2unix > /dev/null 2>&1
find . -name ".svn" | xargs rm -rf > /dev/null 2>&1
find . -name "*.sh" | xargs dos2unix > /dev/null 2>&1
find . -name "*.sh" | xargs chmod +x > /dev/null 2>&1
find . -name "*ver.txt" | xargs dos2unix > /dev/null 2>&1
find . -name "*build.txt" | xargs dos2unix > /dev/null 2>&1
find . -name "*.mak" | xargs dos2unix > /dev/null 2>&1
cd ..
tar cjf ../CASA-1.7.$1.tar.bz2 ./CASA-1.7.$1
#creating spec file
cd $SOURCE_DIR
mkdir --parents $PRODUCTS_DIR $TEMP_DIR
cp ../CASA-1.7.$1.tar.bz2 $TEMP_DIR
cp $SOURCE_DIR/package/linux/CASA.spec.in $TEMP_DIR/CASA.spec
sed -i "s/@VERSION@/1.7.$1/" $TEMP_DIR/CASA.spec
sed -i "s/@PACKAGE@/CASA/" $TEMP_DIR/CASA.spec
sed -i "s/BuildRequires: /BuildRequires: novell-filesystem /" $TEMP_DIR/CASA.spec
cp $SOURCE_DIR/CASA.changes $TEMP_DIR
cd $TEMP_DIR
##call autobuild
. /opt/SuSE/bin/.profile
sudo build --clean
##copy rpms to temp directoy
cp -rf $RPMS_DIR/RPMS $TEMP_DIR
cp -rf $RPMS_DIR/SRPMS $TEMP_DIR

View File

@ -1,57 +0,0 @@
#!/bin/bash
## creating ENV varaibles
SOURCE_DIR=`pwd`
export BUILD_ROOT=$SOURCE_DIR/../autobuild/BUILD
PACKAGE=CASA
VERSION=1.7.$1
TEMP_DIR=$SOURCE_DIR/SOURCES
BUILT_DIR=$BUILD_ROOT/usr/src/packages/BUILD/CASA-1.7.$1
RPMS_DIR=$BUILD_ROOT/usr/src/packages
##creating tar.gz
rm -rf ../bld_tst
mkdir ../bld_tst
mkdir ../bld_tst/CASA-1.7.$1
cp -R ./* ../bld_tst/CASA-1.7.$1
cd ../bld_tst/CASA-1.7.$1
sed -i "s/\(AM_INIT_AUTOMAKE.*\))/\AM_INIT_AUTOMAKE\(CASA, 1\.7\.$1\)/" ./configure.in
find . -name "*.lux" | xargs dos2unix > /dev/null 2>&1
find . -name "mk*" | xargs dos2unix > /dev/null 2>&1
find . -name "mk*" | xargs chmod +x > /dev/null 2>&1
find . -name "Make*" | xargs dos2unix > /dev/null 2>&1
find . -name "*.c" | xargs dos2unix > /dev/null 2>&1
find . -name "*.cs" | xargs dos2unix > /dev/null 2>&1
find . -name "*.cpp" | xargs dos2unix > /dev/null 2>&1
find . -name "*.h" | xargs dos2unix > /dev/null 2>&1
find . -name "link*" | xargs dos2unix > /dev/null 2>&1
find . -name ".svn" | xargs rm -rf > /dev/null 2>&1
find . -name "*.sh" | xargs dos2unix > /dev/null 2>&1
find . -name "*.sh" | xargs chmod +x > /dev/null 2>&1
find . -name "*ver.txt" | xargs dos2unix > /dev/null 2>&1
find . -name "*build.txt" | xargs dos2unix > /dev/null 2>&1
find . -name "*.mak" | xargs dos2unix > /dev/null 2>&1
cd ..
tar cjf ../CASA-1.7.$1.tar.bz2 ./CASA-1.7.$1
#creating spec file
cd $SOURCE_DIR
mkdir --parents $PRODUCTS_DIR $TEMP_DIR
cp ../CASA-1.7.$1.tar.bz2 $TEMP_DIR
cp $SOURCE_DIR/package/linux/CASA.spec.in $TEMP_DIR/CASA.spec
sed -i "s/@VERSION@/1.7.$1/" $TEMP_DIR/CASA.spec
sed -i "s/@PACKAGE@/CASA/" $TEMP_DIR/CASA.spec
sed -i "s/BuildRequires: /BuildRequires: novell-filesystem /" $TEMP_DIR/CASA.spec
cp $SOURCE_DIR/CASA.changes $TEMP_DIR
cp $SOURCE_DIR/baselibs.conf $TEMP_DIR
cd $TEMP_DIR
##call autobuild
. /opt/SuSE/bin/.profile
sudo linux32 build --clean -baselibs
##copy rpms to temp directoy
cp -rf $RPMS_DIR/RPMS $TEMP_DIR
cp -rf $RPMS_DIR/SRPMS $TEMP_DIR

View File

@ -1,18 +0,0 @@
#!/bin/bash
# setup for calling "builduser.cmd and buildkernel.cmd" via cygwin's rsh
# since ssh is having trouble. This is a hack, but we don't any other way
# to solve this at the moment.
echo "============================================="
echo " START - Build casa"
echo "============================================="
/usr/bin/rsh -n -d -l nds_cm localhost "set SVN_REVISION=$SVN_REVISION&& cd /d c:\cygwin\home\nds_cm\build_win\casa~1.7\CASA\ && build_config\win64\builduser.cmd"
echo "Status: $?"
echo "============================================="
echo " END - Build casa"
echo "============================================="

View File

@ -1,27 +0,0 @@
@echo on
rem setup for calling nmake
rem setlocal
set SVN_REVISION=%1%
set casa_root_dir=%cd%
rem Do a free (retail) build
setlocal
mkdir TEMP
set TEMP=%cd%\TEMP
set TMP=%cd%\TEMP
call "F:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
echo "%SVN_REVISION%"
cd /d %casa_root_dir%
cd package\windows\vs_solutions\CASA32-msi
..\..\..\..\tools\w32\VersionVDProj\bin\VersionVDProj.exe -msi CASA.vdproj version=1.7.%SVN_REVISION%
..\..\..\..\tools\w32\VersionVDProj\bin\VersionVDProj.exe -msi ..\CASA_sdk\CASA_sdk.vdproj version=1.7.%SVN_REVISION%
cd /d %casa_root_dir%
cd package\windows\vs_solutions\CASA64-msi
..\..\..\..\tools\w32\VersionVDProj\bin\VersionVDProj.exe -msi CASA64.vdproj version=1.7.%SVN_REVISION%
..\..\..\..\tools\w32\VersionVDProj\bin\VersionVDProj.exe -msi ..\CASA_sdk_x64\CASA_sdk_x64.vdproj version=1.7.%SVN_REVISION%
devenv /rebuild Release CASA-64-32.sln /out build.log
endlocal

View File

@ -1,11 +0,0 @@
#!/bin/sh
HOST_ARCH=`uname -a | grep -c x86_64`
if [ $HOST_ARCH -gt 0 ]
then ARCH_LIB=64
else
ARCH_LIB=
fi
export MONO_PATH=/usr/lib$ARCH_LIB/
mono /usr/bin/CASAcli.exe $1 $2 $3 $4 $5 $6 $7 $8 $9

View File

@ -1,208 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="CASAcli"
ProjectGUID="{4AFEB4A4-C9D7-4EAD-BCE4-BA84E00ACA23}"
RootNamespace="CASAcli"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Debug/sshtst.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib micasa.lib"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\micasadk\Release"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="micasa.lib odbc32.lib odbccp32.lib"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\micasadk\Release"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
>
<File
RelativePath=".\casacli.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

45
CASA/cli/CMakeLists.txt Normal file
View File

@ -0,0 +1,45 @@
#################################
# Project
##############
project(CASAcli)
#################################
# Dependencies
##############
#################################
# Compiler Switches
##############
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/include
)
link_directories(
${CMAKE_BINARY_DIR}/micasadk
)
add_definitions( -DSSCS_LINUX_PLAT_F -O2 -D_REENTRANT -DALIGNMENT -DN_PLAT_UNIX -DUNIX -DLINUX -DIAPX38 )
#################################
# Source Files
##############
IF(UNIX)
add_executable(CASAcli casacli.c)
ENDIF(UNIX)
#################################
# Linking
##############
target_link_libraries(CASAcli micasa)
#################################
# Install Files
##############
install(TARGETS CASAcli DESTINATION ${BIN_INSTALL_DIR})

View File

@ -1,119 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = $(CFILES)
CASAROOT = ..
CASALIBDIR = $(CASAROOT)/$(LIB)
if LIB64
CASABINDIR = $(CASAROOT)/bin64
else
CASABINDIR = $(CASAROOT)/bin
endif
OBJDIR = $(TARGET_CFG)/$(LIB)
BUILD_VER = 1.1.1
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR = ..
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME = CASAcli
MODULE_EXT =
CFILES = casacli.c
CSFILES_CSC :=
INCLUDES = -I. -I.. -I$(CASAROOT)/include
EXTRA_CFLAGS =
RESOURCES =
CFLAGS += $(EXTRA_CFLAGS) $(INCLUDES) $(DEFINES)
LIBS = -L$(CASALIBDIR)/$(TARGET_CFG)
LDFLAGS = -lmicasa
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
#COMMON_OBJS = -L/../../c_common/linux/$(OBJDIR) ../../c_common/linux/$(OBJDIR)/sscs_ll.o
COMMON_OBJS = $(OBJDIR)/sscs_ll.o
CUR_DIR := $(shell pwd)
#all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
all: $(OBJDIR)/$(MODULE_NAME)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o: %.cpp
$(CC) -c $(CFLAGS) -o $@ $<
$(OBJDIR)/$(MODULE_NAME): $(OBJDIR) $(OBJS)
@echo [======== Linking $@ ========]
cc $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
cp -f $(OBJDIR)/$(MODULE_NAME) $(CASABINDIR)/$(TARGET_CFG)/$(MODULE_NAME)
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,33 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("CASAManagerCLI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASAManagerCLI")]
[assembly: AssemblyCopyright("Copyright © Novell, Inc 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("dc4be258-86ca-4284-bbe1-23b64a01e197")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -39,23 +39,23 @@
#include <sscs_cache.h>
/*
* Global data
*/
int optErr = 1; // if error message should be printed
int optIdx = 1; // index into parent argv vector
int optionString = 1; // character checked for validity
char *optArg = NULL; // argument associated with option
char *credName = NULL;
char *value = NULL;
char *keyName = NULL;
char *uid = NULL;
int iAction = 0;
int iUseSessionKeyChain = 0;
#define BADCHAR (int)'?'
/*
* Global data
*/
int optErr = 1; // if error message should be printed
int optIdx = 1; // index into parent argv vector
int optionString = 1; // character checked for validity
char *optArg = NULL; // argument associated with option
char *credName = NULL;
char *value = NULL;
char *keyName = NULL;
char *uid = NULL;
int iAction = 0;
int iUseSessionKeyChain = 0;
#define BADCHAR (int)'?'
#define ERRMSG ""
#define SETCRED 1
#define GETCRED 2
@ -74,41 +74,41 @@ void Pause()
} /* end of Pause */
void CloseStore(void *context)
{
miCASACloseSecretStoreCache(context, 0, NULL);
}
void* OpenStore(SSCS_KEYCHAIN_ID_T *kc)
{
SSCS_SECRETSTORE_T store = {0};
void *context = 0;
// open secretStore
sscs_Utf8Strcpy(store.ssName, SSCS_DEFAULT_SECRETSTORE_ID);
store.version = 1;
context = miCASAOpenSecretStoreCache(&store, 0, NULL);
if (context == NULL)
{
printf("Could not open miCASA store\r\n");
return NULL; // NSSCS_E_SYSTEM_FAILURE;
}
if (iUseSessionKeyChain)
{
sscs_Utf8Strcpy(kc->keychainID, SSCS_SESSION_KEY_CHAIN_ID);
kc->len = SSCS_S_KC_ID_CHARS;
}
else
{
sscs_Utf8Strcpy(kc->keychainID, SSCS_SERVER_KEY_CHAIN_ID);
kc->len = SSCS_S_KC_ID_SERVER_CHARS;
}
return context;
}
void CloseStore(void *context)
{
miCASACloseSecretStoreCache(context, 0, NULL);
}
void* OpenStore(SSCS_KEYCHAIN_ID_T *kc)
{
SSCS_SECRETSTORE_T store = {0};
void *context = 0;
// open secretStore
sscs_Utf8Strcpy(store.ssName, SSCS_DEFAULT_SECRETSTORE_ID);
store.version = 1;
context = miCASAOpenSecretStoreCache(&store, 0, NULL);
if (context == NULL)
{
printf("Could not open miCASA store\r\n");
return NULL; // NSSCS_E_SYSTEM_FAILURE;
}
if (iUseSessionKeyChain)
{
sscs_Utf8Strcpy(kc->keychainID, SSCS_SESSION_KEY_CHAIN_ID);
kc->len = SSCS_S_KC_ID_CHARS;
}
else
{
sscs_Utf8Strcpy(kc->keychainID, SSCS_SERVER_KEY_CHAIN_ID);
kc->len = SSCS_S_KC_ID_SERVER_CHARS;
}
return context;
}
#ifdef LINUX
void SetUID(int targetUID)
@ -194,55 +194,55 @@ void DisplaySecretEx(void *context,
}
void ListCredentials()
{
int rcode = 0;
int i = 0;
SSCS_SECRETSTORE_T store = {0};
SSCS_SECRET_ID_T appSecretId = {0};
SSCS_SECRET_ID_T sharedSecretId = {0};
void *context;
SSCS_KEYCHAIN_ID_T kc = {0};
SSCS_SH_SECRET_ID_LIST_T secretIDList = {0};
context = OpenStore(&kc);
if (context == NULL)
{
printf("Could not open miCASA store\r\n");
return; // NSSCS_E_SYSTEM_FAILURE;
}
secretIDList.secIDList = malloc(128 * sizeof(SSCS_SH_SECRET_ID_T));
if (secretIDList.secIDList == NULL)
{
printf("Memory failure\r\n");
return;
}
// set size of buffer
secretIDList.enumHandle = 0;
secretIDList.returnedIDs = 128;
rcode = miCASAEnumerateSecretIDs(context,
&kc, //SSCS_KEYCHAIN_ID_T * keyChainID,
0, //uint32_t ssFlags,
NULL, //SSCS_SRCH_KEY_T * searchKey,
&secretIDList, //SSCS_SH_SECRET_ID_LIST_T * secretIDList,
NULL //SSCS_EXT_T * ext
);
if (rcode)
{
printf("Enumerate secretIDs returned %x\r\n", rcode);
}
else
{
printf("Found %d credential sets\r\n", secretIDList.returnedIDs);
for (i=0; i<secretIDList.returnedIDs; i++)
{
//printf("%s\r\n", secretIDList.secIDList[i].name);
DisplaySecretEx(context, &kc, &secretIDList.secIDList[i]);
void ListCredentials()
{
int rcode = 0;
int i = 0;
SSCS_SECRETSTORE_T store = {0};
SSCS_SECRET_ID_T appSecretId = {0};
SSCS_SECRET_ID_T sharedSecretId = {0};
void *context;
SSCS_KEYCHAIN_ID_T kc = {0};
SSCS_SH_SECRET_ID_LIST_T secretIDList = {0};
context = OpenStore(&kc);
if (context == NULL)
{
printf("Could not open miCASA store\r\n");
return; // NSSCS_E_SYSTEM_FAILURE;
}
secretIDList.secIDList = malloc(128 * sizeof(SSCS_SH_SECRET_ID_T));
if (secretIDList.secIDList == NULL)
{
printf("Memory failure\r\n");
return;
}
// set size of buffer
secretIDList.enumHandle = 0;
secretIDList.returnedIDs = 128;
rcode = miCASAEnumerateSecretIDs(context,
&kc, //SSCS_KEYCHAIN_ID_T * keyChainID,
0, //uint32_t ssFlags,
NULL, //SSCS_SRCH_KEY_T * searchKey,
&secretIDList, //SSCS_SH_SECRET_ID_LIST_T * secretIDList,
NULL //SSCS_EXT_T * ext
);
if (rcode)
{
printf("Enumerate secretIDs returned %x\r\n", rcode);
}
else
{
printf("Found %d credential sets\r\n", secretIDList.returnedIDs);
for (i=0; i<secretIDList.returnedIDs; i++)
{
//printf("%s\r\n", secretIDList.secIDList[i].name);
DisplaySecretEx(context, &kc, &secretIDList.secIDList[i]);
}
}
@ -304,16 +304,16 @@ void DeleteAllCredentials()
printf("Deleting %s\r\n", secretIDList.secIDList[i].name);
//DisplaySecretEx(context, &kc, &secretIDList.secIDList[i]);
miCASARemoveSecret(context, &kc, 0, &secretIDList.secIDList[i], NULL, NULL);
}
}
if (secretIDList.secIDList)
free(secretIDList.secIDList);
// close it
CloseStore(context);
}
}
}
if (secretIDList.secIDList)
free(secretIDList.secIDList);
// close it
CloseStore(context);
}
void WriteKey(char* keyvalue)
{
@ -333,8 +333,8 @@ void WriteKey(char* keyvalue)
return; // NSSCS_E_SYSTEM_FAILURE;
}
appSecretId.len = sscs_Utf8Strlen(credName) + 1;
sscs_Utf8Strcpy(appSecretId.id, credName);
appSecretId.len = sscs_Utf8Strlen(credName) + 1;
sscs_Utf8Strcpy(appSecretId.id, credName);
value = keyvalue;
@ -374,98 +374,98 @@ void DisplaySecret(SSCS_SH_SECRET_ID_T *secret)
void RemoveSecret(SSCS_SH_SECRET_ID_T *secret)
{
void *context = 0;
int32_t rcode = 0;
SSCS_KEYCHAIN_ID_T kc;
context = OpenStore(&kc);
if (context != NULL)
{
miCASARemoveSecret(context, &kc, 0, secret, NULL, NULL);
void *context = 0;
int32_t rcode = 0;
SSCS_KEYCHAIN_ID_T kc;
context = OpenStore(&kc);
if (context != NULL)
{
miCASARemoveSecret(context, &kc, 0, secret, NULL, NULL);
CloseStore(context);
}
}
/* */
/*
* NAME - sss_GetOpt
*
* DESCRIPTION
* An implementation of the Unix getopt() function.
*
*/
int sss_GetOpt( int nArgc, char **nArgv, char *optStr )
{ /* beginning of the call */
/* ########################## DECLARATIONS START HERE ######################### */
static char *place = ERRMSG;
char *nxtOpt;
/* ############################## CODE STARTS HERE ############################ */
if(!*place)
{
if((optIdx >= nArgc) ||
((*(place = nArgv[optIdx]) != '-')
&& (*(place = nArgv[optIdx]) != '/')) ||
(!*++place))
{
return(-1);
}
if((*place == '-') || (*place == '/'))
{
++optIdx;
return(-1);
}
}
if((optionString = (int)*place++) == (int)'=' ||
!(nxtOpt = strchr(optStr, optionString)))
{
if(!*place)
{
++optIdx;
}
return(BADCHAR);
}
if(*++nxtOpt != '=')
{
optArg = NULL;
if(!*place)
{
++optIdx;
}
}
else
{
if(*place)
{
optArg = place + 1;
}
else if(nArgc <= ++optIdx)
{
place = ERRMSG;
return(BADCHAR);
}
else
{
optArg = nArgv[optIdx];
}
place = ERRMSG;
++optIdx;
}
//printf("option string %d\r\n", optionString);
return(optionString);
/* ########################## CODE ENDS HERE ######################### */
/* */
/*
* NAME - sss_GetOpt
*
* DESCRIPTION
* An implementation of the Unix getopt() function.
*
*/
int sss_GetOpt( int nArgc, char **nArgv, char *optStr )
{ /* beginning of the call */
/* ########################## DECLARATIONS START HERE ######################### */
static char *place = ERRMSG;
char *nxtOpt;
/* ############################## CODE STARTS HERE ############################ */
if(!*place)
{
if((optIdx >= nArgc) ||
((*(place = nArgv[optIdx]) != '-')
&& (*(place = nArgv[optIdx]) != '/')) ||
(!*++place))
{
return(-1);
}
if((*place == '-') || (*place == '/'))
{
++optIdx;
return(-1);
}
}
if((optionString = (int)*place++) == (int)'=' ||
!(nxtOpt = strchr(optStr, optionString)))
{
if(!*place)
{
++optIdx;
}
return(BADCHAR);
}
if(*++nxtOpt != '=')
{
optArg = NULL;
if(!*place)
{
++optIdx;
}
}
else
{
if(*place)
{
optArg = place + 1;
}
else if(nArgc <= ++optIdx)
{
place = ERRMSG;
return(BADCHAR);
}
else
{
optArg = nArgv[optIdx];
}
place = ERRMSG;
++optIdx;
}
//printf("option string %d\r\n", optionString);
return(optionString);
/* ########################## CODE ENDS HERE ######################### */
} /* end of GetOPt */
@ -501,20 +501,20 @@ int main
printf("Try 'CASAcli -h' for more infomation\r\n");
return 0;
}
#ifdef WIN32
while ((c = sss_GetOpt(argc, argv, "lLoOhHsSgGdDrRn=N=k=K=u=U=v=V=")) != -1)
#endif
#ifdef LINUX
while ((c = sss_GetOpt(argc, argv, "lLoOhHsSgGdDrRn=N=k=K=u=U=")) != -1)
#endif
{
//printf("processing arg \r\n");
switch(c)
{
case 'l':
case 'L':
iAction = LISTCREDS;
//ListCredentials();
#ifdef WIN32
while ((c = sss_GetOpt(argc, argv, "lLoOhHsSgGdDrRn=N=k=K=u=U=v=V=")) != -1)
#endif
#ifdef LINUX
while ((c = sss_GetOpt(argc, argv, "lLoOhHsSgGdDrRn=N=k=K=u=U=")) != -1)
#endif
{
//printf("processing arg \r\n");
switch(c)
{
case 'l':
case 'L':
iAction = LISTCREDS;
//ListCredentials();
break;
case 'o':
@ -525,102 +525,102 @@ int main
case 'r':
case 'R':
iAction = REMOVECREDS;
break;
case 's':
case 'S':
iAction = SETCRED;
break;
case 'g':
case 'G':
iAction = GETCRED;
break;
case 'd':
case 'D':
iAction = DELCRED;
break;
case 'n':
case 'N':
credName = optArg;
break;
case 'k':
case 'K':
keyName = optArg;
break;
#ifdef WIN32
case 'v':
case 'V':
value = optArg;
break;
#endif
case 'u':
case 'U':
uid = optArg;
printf("UID: %s\r\n", uid);
break;
default:
printf("\r\n");
#ifdef WIN32
printf(" Description:\r\n");
printf(" This program is a simple utility to display, set, and delete\r\n");
printf(" credentials used by services on this computer. Because credentials\r\n");
printf(" are scoped by the LUID of the running process, you must run\r\n");
printf(" this utility as the same LUID as the service being configured.\r\n");
#endif
#ifdef LINUX
printf(" Description:\r\n");
printf(" This program is a simple utility to display, set, and delete\r\n");
printf(" credentials used by services on this computer. Because credentials\r\n");
printf(" are scoped by the UID of the running process, you must run\r\n");
printf(" this utility as the same UID as the service being configured.\r\n");
#endif
printf("\r\n");
printf(" Usage: CASAcli [OPTIONS]\r\n");
printf(" Options\r\n");
printf(" -l List all credentials, keys, and values used by services\r\n");
printf(" -h Displays this help screen\r\n");
printf("\r\n");
printf(" -s Sets the key and value of the named credential\r\n");
printf(" -g Gets and displays the keys and values of the named credential\r\n");
printf(" -d Delete all keys and values of the named credential\r\n");
break;
case 's':
case 'S':
iAction = SETCRED;
break;
case 'g':
case 'G':
iAction = GETCRED;
break;
case 'd':
case 'D':
iAction = DELCRED;
break;
case 'n':
case 'N':
credName = optArg;
break;
case 'k':
case 'K':
keyName = optArg;
break;
#ifdef WIN32
case 'v':
case 'V':
value = optArg;
break;
#endif
case 'u':
case 'U':
uid = optArg;
printf("UID: %s\r\n", uid);
break;
default:
printf("\r\n");
#ifdef WIN32
printf(" Description:\r\n");
printf(" This program is a simple utility to display, set, and delete\r\n");
printf(" credentials used by services on this computer. Because credentials\r\n");
printf(" are scoped by the LUID of the running process, you must run\r\n");
printf(" this utility as the same LUID as the service being configured.\r\n");
#endif
#ifdef LINUX
printf(" Description:\r\n");
printf(" This program is a simple utility to display, set, and delete\r\n");
printf(" credentials used by services on this computer. Because credentials\r\n");
printf(" are scoped by the UID of the running process, you must run\r\n");
printf(" this utility as the same UID as the service being configured.\r\n");
#endif
printf("\r\n");
printf(" Usage: CASAcli [OPTIONS]\r\n");
printf(" Options\r\n");
printf(" -l List all credentials, keys, and values used by services\r\n");
printf(" -h Displays this help screen\r\n");
printf("\r\n");
printf(" -s Sets the key and value of the named credential\r\n");
printf(" -g Gets and displays the keys and values of the named credential\r\n");
printf(" -d Delete all keys and values of the named credential\r\n");
printf(" -r Removes all credentials scoped for named UID, or UID of this process\r\n");
printf("\r\n");
printf(" -n [name] Specify the credential name\r\n");
printf(" -k [key] Specify the key name to set\r\n");
#ifdef WIN32
printf(" -v [value] Specify the value for this key being set\r\n");
#endif
#ifdef LINUX
printf(" -u [uid] Specify the UID of the process\r\n");
#endif
printf("\r\n");
printf(" -o Override services keychain and use current user(UID) keychain for operation\r\n");
printf("\r\n");
printf(" Examples\r\n");
printf(" CASAcli -g -n MyCredential\r\n");
printf(" CASAcli -d -n MyCredential\r\n");
#ifdef WIN32
printf(" CASAcli -s -n MyCredential -k CN -v admin\r\n");
printf(" CASAcli -s -n MyCredential -k Password -v thepassword\r\n");
#endif
#ifdef LINUX
printf(" KEYVALUE=admin CASAcli -s -n MyCredential -k CN\r\n");
printf(" KEYVALUE=password CASAcli -s -n MyCredential -k Password\r\n");
#endif
printf("\r\n");
exit(0);
}
printf("\r\n");
printf(" -n [name] Specify the credential name\r\n");
printf(" -k [key] Specify the key name to set\r\n");
#ifdef WIN32
printf(" -v [value] Specify the value for this key being set\r\n");
#endif
#ifdef LINUX
printf(" -u [uid] Specify the UID of the process\r\n");
#endif
printf("\r\n");
printf(" -o Override services keychain and use current user(UID) keychain for operation\r\n");
printf("\r\n");
printf(" Examples\r\n");
printf(" CASAcli -g -n MyCredential\r\n");
printf(" CASAcli -d -n MyCredential\r\n");
#ifdef WIN32
printf(" CASAcli -s -n MyCredential -k CN -v admin\r\n");
printf(" CASAcli -s -n MyCredential -k Password -v thepassword\r\n");
#endif
#ifdef LINUX
printf(" KEYVALUE=admin CASAcli -s -n MyCredential -k CN\r\n");
printf(" KEYVALUE=password CASAcli -s -n MyCredential -k Password\r\n");
#endif
printf("\r\n");
exit(0);
}
}
// set the UID if there is one
@ -715,16 +715,16 @@ int main
case DELCRED:
{
printf("Deleting %s\r\n", credName);
tempSecret.type = 2;
tempSecret.len = sscs_Utf8Strlen(credName) + 1;
if (tempSecret.len < NSSCS_MAX_SECRET_ID_LEN)
{
sscs_Utf8Strncpy(tempSecret.name, credName, tempSecret.len);
RemoveSecret(&tempSecret);
}
else
{
printf("Credential name too long\r\n");
tempSecret.type = 2;
tempSecret.len = sscs_Utf8Strlen(credName) + 1;
if (tempSecret.len < NSSCS_MAX_SECRET_ID_LEN)
{
sscs_Utf8Strncpy(tempSecret.name, credName, tempSecret.len);
RemoveSecret(&tempSecret);
}
else
{
printf("Credential name too long\r\n");
}
break;
}

View File

@ -0,0 +1,7 @@
set(CMAKE_CSharp_COMPILER "@CMAKE_CSharp_COMPILER@")
set(CMAKE_CSharp_COMPILER_LOADED @CMAKE_CSharp_COMPILER_LOADED@)
set(GAC_DIR @GAC_DIR@)
set(_csc_default_lib_path @_csc_default_lib_path@ CACHE INTERNAL "")
set(CMAKE_CSharp_COMPILER_ENV_VAR "CSC")

View File

@ -0,0 +1,321 @@
# copyright (c) 2007, 2009 Arno Rehn arno@arnorehn.de
# copyright (c) 2008 Helio castro helio@kde.org
#
# Redistribution and use is allowed according to the terms of the GPL license.
# This file adds support for the C# language to cmake.
#
# It adds the following functions:
#
# csharp_add_executable (<name> <source files> [UNSAFE] [WINEXE] [REFERENCES <references>]
# [COMPILE_FLAGS <flags to be passed to the compiler>]
# [COMPILE_DEFINITIONS <additional definitions>] )
#
# csharp_add_library (<name> <source files> [UNSAFE] [REFERENCES <references>]
# [COMPILE_FLAGS <flags to be passed to the compiler>]
# [COMPILE_DEFINITIONS <additional definitions>] )
#
# install_assembly (<target name> DESTINATION <assembly destination directory>
# [PACKAGE <package name>] )
# The assembly destination directory is only used if we compile with Visual C# and thus can't use gacutil.
# If a package is specified and a file called <target>.pc.cmake exists in the current source directory,
# this function will configure the template file. All occurences of @assembly@ will be replaced with
# the path to the assembly. The resulting <target>.pc file will be installed to
# <CMAKE_INSTALL_PREFIX>/lib/pkgconfig/ . If you want to have a different basename for the template file,
# set the 'pkg-config_template_basename' property of the target with set_property.
#
# Example:
# ------------------------------
# cmake code:
# ------------------------------
# csharp_add_library(foo foo.cs)
# install_assembly(foo DESTINATION lib)
#
# ------------------------------
# contents of foo.pc.cmake file:
# ------------------------------
# Name: Foo
# Description: Foo library
# Version: 1.0
# Libs: -r:@assembly@
# ----- support macros -----
macro(GET_LIBRARY_OUTPUT_DIR var)
if (NOT LIBRARY_OUTPUT_PATH)
set(${var} ${CMAKE_CURRENT_BINARY_DIR})
else (NOT LIBRARY_OUTPUT_PATH)
set(${var} ${LIBRARY_OUTPUT_PATH})
endif (NOT LIBRARY_OUTPUT_PATH)
endmacro(GET_LIBRARY_OUTPUT_DIR)
macro(GET_EXECUTABLE_OUTPUT_DIR var)
if (NOT EXECUTABLE_OUTPUT_PATH)
set(${var} ${CMAKE_CURRENT_BINARY_DIR})
else (NOT EXECUTABLE_OUTPUT_PATH)
set(${var} ${EXECUTABLE_OUTPUT_PATH})
endif (NOT EXECUTABLE_OUTPUT_PATH)
endmacro(GET_EXECUTABLE_OUTPUT_DIR)
# This does just not always work... why?!
# macro(MAKE_PROPER_FILE_LIST var)
# foreach(file ${ARGN})
# if (IS_ABSOLUTE "${file}")
# file(GLOB globbed "${file}")
# else (IS_ABSOLUTE "${file}")
# file(GLOB globbed "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
# endif (IS_ABSOLUTE "${file}")
#
# foreach (glob ${globbed})
# file(TO_NATIVE_PATH "${glob}" native)
# list(APPEND proper_file_list "${native}")
# endforeach (glob ${globbed})
# endforeach(file ${ARGN})
# endmacro(MAKE_PROPER_FILE_LIST)
# ----- actual functions -----
# ----- add an executable -----
function(csharp_add_executable target)
set(current "s")
set(dotnet_target "exe")
foreach (arg ${ARGN})
file(TO_NATIVE_PATH ${arg} native_path)
if (arg STREQUAL "UNSAFE")
set (unsafe "/unsafe")
elseif (arg STREQUAL "WINEXE")
set (dotnet_target "winexe")
elseif (arg STREQUAL "REFERENCES")
set (current "r")
elseif (arg STREQUAL "COMPILE_FLAGS")
set (current "flags")
elseif (arg STREQUAL "COMPILE_DEFINITIONS")
set (current "defs")
else (arg STREQUAL "UNSAFE")
if (current STREQUAL "s")
# source file
list(APPEND sources ${native_path})
elseif (current STREQUAL "r")
# reference
if (TARGET ${arg})
# this is an existing target - get the target assembly
get_property(prop TARGET ${arg} PROPERTY _assembly)
list(APPEND references "/r:${prop}")
list(APPEND deps ${arg})
else (TARGET ${arg})
# something different (e.g. assembly name in the gac)
list(APPEND references "/r:${native_path}")
endif (TARGET ${arg})
elseif (current STREQUAL "flags")
list(APPEND _csc_opts "${arg}")
elseif (current STREQUAL "defs")
list(APPEND _csc_opts "/define:${arg}")
endif (current STREQUAL "s")
endif (arg STREQUAL "UNSAFE")
endforeach (arg ${ARGN})
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND _csc_opts "/define:DEBUG")
list(APPEND _csc_opts "/debug")
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
get_executable_output_dir(outdir)
if (NOT IS_ABSOLUTE "${outdir}")
message(FATAL_ERROR "Directory \"${outdir}\" is not an absolute path!")
endif (NOT IS_ABSOLUTE "${outdir}")
file(RELATIVE_PATH relative_path "${CMAKE_BINARY_DIR}" "${outdir}/${target}.exe")
file(TO_NATIVE_PATH "${outdir}/${target}" native_target)
# inlined - this doesn't work as a macro :(
foreach(file ${sources})
file(TO_CMAKE_PATH "${file}" cmake_file)
if (IS_ABSOLUTE "${cmake_file}")
file(GLOB globbed "${cmake_file}")
else (IS_ABSOLUTE "${cmake_file}")
file(GLOB globbed "${CMAKE_CURRENT_SOURCE_DIR}/${cmake_file}")
endif (IS_ABSOLUTE "${cmake_file}")
foreach (glob ${globbed})
file(TO_CMAKE_PATH "${glob}" cmake_path)
list(APPEND cmake_file_list "${cmake_path}")
endforeach (glob ${globbed})
if (NOT globbed)
list(APPEND cmake_file_list "${cmake_file}")
endif (NOT globbed)
list(APPEND compiler_file_list ${file})
endforeach(file ${sources})
get_directory_property(compile_definitions COMPILE_DEFINITIONS)
foreach (def ${compile_definitions})
# macros with values aren't supported by C#
if (NOT def MATCHES ".*=.*")
list(APPEND _csc_opts "/define:${def}")
endif (NOT def MATCHES ".*=.*")
endforeach (def ${compile_definitions})
get_directory_property(link_dirs LINK_DIRECTORIES)
foreach (dir ${link_dirs})
list(APPEND _csc_opts "/lib:${dir}")
endforeach (dir ${link_dirs})
add_custom_command(OUTPUT "${outdir}/${target}.stubexe"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${outdir}" # create the output dir
COMMAND "${CMAKE_CSharp_COMPILER}" /nologo /target:${dotnet_target} "/out:${native_target}.exe" # build the executable
${_csc_opts} ${unsafe} ${references} ${compiler_file_list}
COMMAND "${CMAKE_COMMAND}" -E touch "${outdir}/${target}.stubexe" # create the stub so that DEPENDS will work
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" # working directory is the source directory, so we don't have to care about relative paths
DEPENDS ${cmake_file_list}
COMMENT "Building ${relative_path}" VERBATIM) # nice comment
add_custom_target(${target} ALL DEPENDS "${outdir}/${target}.stubexe" SOURCES ${cmake_file_list}) # create the actual target
if (deps)
add_dependencies(${target} ${deps})
endif(deps)
endfunction(csharp_add_executable)
# ----- add a library -----
function(csharp_add_library target)
set(current "s")
foreach (arg ${ARGN})
file(TO_NATIVE_PATH ${arg} native_path)
if (arg STREQUAL "UNSAFE")
set (unsafe "/unsafe")
elseif (arg STREQUAL "REFERENCES")
set (current "r")
elseif (arg STREQUAL "COMPILE_FLAGS")
set (current "flags")
elseif (arg STREQUAL "COMPILE_DEFINITIONS")
set (current "defs")
else (arg STREQUAL "UNSAFE")
if (current STREQUAL "s")
# source file
list(APPEND sources ${native_path})
elseif (current STREQUAL "r")
# reference
if (TARGET ${arg})
# this is an existing target - get the target assembly
get_property(prop TARGET ${arg} PROPERTY _assembly)
list(APPEND references "/r:${prop}")
list(APPEND deps ${arg})
else (TARGET ${arg})
# something different (e.g. assembly name in the gac)
list(APPEND references "/r:${native_path}")
endif (TARGET ${arg})
elseif (current STREQUAL "flags")
list(APPEND _csc_opts "${arg}")
elseif (current STREQUAL "defs")
list(APPEND _csc_opts "/define:${arg}")
endif (current STREQUAL "s")
endif (arg STREQUAL "UNSAFE")
endforeach (arg ${ARGN})
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND _csc_opts "/define:DEBUG")
list(APPEND _csc_opts "/debug")
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
get_library_output_dir(outdir)
if (NOT IS_ABSOLUTE "${outdir}")
message(FATAL_ERROR "Directory \"${outdir}\" is not an absolute path!")
endif (NOT IS_ABSOLUTE "${outdir}")
file(RELATIVE_PATH relative_path "${CMAKE_BINARY_DIR}" "${outdir}/${target}.dll")
file(TO_NATIVE_PATH "${outdir}/${target}" native_target)
# inlined - this doesn't work as a macro :(
foreach(file ${sources})
file(TO_CMAKE_PATH "${file}" cmake_file)
if (IS_ABSOLUTE "${cmake_file}")
file(GLOB globbed "${cmake_file}")
else (IS_ABSOLUTE "${cmake_file}")
file(GLOB globbed "${CMAKE_CURRENT_SOURCE_DIR}/${cmake_file}")
endif (IS_ABSOLUTE "${cmake_file}")
foreach (glob ${globbed})
file(TO_CMAKE_PATH "${glob}" cmake_path)
list(APPEND cmake_file_list "${cmake_path}")
endforeach (glob ${globbed})
if (NOT globbed)
list(APPEND cmake_file_list "${cmake_file}")
endif (NOT globbed)
list(APPEND compiler_file_list ${file})
endforeach(file ${sources})
# message("CMake File List for target ${target}: ${cmake_file_list}")
get_directory_property(compile_definitions COMPILE_DEFINITIONS)
foreach (def ${compile_definitions})
# macros with values aren't supported by C#
if (NOT def MATCHES ".*=.*")
list(APPEND _csc_opts "/define:${def}")
endif (NOT def MATCHES ".*=.*")
endforeach (def ${compile_definitions})
get_directory_property(link_dirs LINK_DIRECTORIES)
foreach (dir ${link_dirs})
list(APPEND _csc_opts "/lib:${dir}")
endforeach (dir ${link_dirs})
add_custom_command(OUTPUT "${outdir}/${target}.dll"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${outdir}" # create the output dir
COMMAND "${CMAKE_CSharp_COMPILER}" /nologo /target:library "/out:${native_target}.dll" # build the executable
${_csc_opts} ${unsafe} ${references} ${compiler_file_list}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" # working directory is the source directory, so we don't have to care about relative paths
DEPENDS ${cmake_file_list}
COMMENT "Building ${relative_path}" VERBATIM) # nice comment
add_custom_target(${target} ALL DEPENDS "${outdir}/${target}.dll" SOURCES ${cmake_file_list}) # create the actual target
set_property(TARGET ${target} PROPERTY _assembly "${native_target}.dll")
if (deps)
add_dependencies(${target} ${deps})
endif(deps)
endfunction(csharp_add_library)
# ----- install a library assembly -----
function(install_assembly target DESTINATION destination_dir)
# retrieve the absolute path of the generated assembly
get_property(filename TARGET ${target} PROPERTY _assembly)
get_property(pc_file TARGET ${target} PROPERTY pkg-config_template_basename)
if (NOT pc_file)
set (pc_file ${target})
endif (NOT pc_file)
if (NOT filename)
message(FATAL_ERROR "Couldn't retrieve the assembly filename for target ${target}! Are you sure the target is a .NET library assembly?")
endif (NOT filename)
if (NOT MONO_FOUND)
install(FILES "${filename}" DESTINATION ${destination_dir})
if (EXISTS "${filename}.config")
install(FILES "${filename}.config" DESTINATION ${destination_dir})
endif (EXISTS "${filename}.config")
return()
endif (NOT MONO_FOUND)
if (ARGV3 STREQUAL "PACKAGE" AND ARGV4)
set (package_option "-package ${ARGV4}")
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${pc_file}.pc.cmake")
set(assembly "${GAC_DIR}/${ARGV4}/${target}.dll")
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/${pc_file}.pc.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${pc_file}.pc")
if (NOT LIB_INSTALL_DIR)
set (LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
endif (NOT LIB_INSTALL_DIR)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${pc_file}.pc" DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
endif (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${pc_file}.pc.cmake")
endif (ARGV3 STREQUAL "PACKAGE" AND ARGV4)
# So we have the mono runtime and we can use gacutil (it has the -root option, which the MS version doesn't have).
install(CODE "execute_process(COMMAND ${GACUTIL_EXECUTABLE} -i ${filename} ${package_option} -root ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac)")
file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac/mono)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac/mono)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tmp_gac/mono/ DESTINATION ${GAC_DIR} )
endfunction(install_assembly)
set(CMAKE_CSharp_INFORMATION_LOADED 1)

View File

@ -0,0 +1,85 @@
# copyright (c) 2007, 2009 Arno Rehn arno@arnorehn.de
# copyright (c) 2008 Helio castro helio@kde.org
#
# Redistribution and use is allowed according to the terms of the GPL license.
# determine the compiler to use for C# programs
# NOTE, a generator may set CMAKE_CSharp_COMPILER before
# loading this file to force a compiler.
if(NOT CMAKE_CSharp_COMPILER)
# prefer the environment variable CSC
if($ENV{CSC} MATCHES ".+")
if (EXISTS $ENV{CSC})
message(STATUS "Found compiler set in environment variable CSC: $ENV{CSC}.")
set(CMAKE_CSharp_COMPILER $ENV{CSC})
else (EXISTS $ENV{CSC})
message(SEND_ERROR "Could not find compiler set in environment variable CSC:\n$ENV{CSC}.")
endif (EXISTS $ENV{CSC})
endif($ENV{CSC} MATCHES ".+")
# if no compiler has been specified yet, then look for one
if (NOT CMAKE_CSharp_COMPILER)
find_package(Mono)
set (CMAKE_CSharp_COMPILER "${GMCS_EXECUTABLE}")
# still not found, try csc.exe
if (NOT CMAKE_CSharp_COMPILER)
get_filename_component(dotnet_path "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\.NETFramework;InstallRoot]" PATH)
find_program(CMAKE_CSharp_COMPILER NAMES csc PATHS "${dotnet_path}/Framework/v2.0.50727")
file(TO_NATIVE_PATH "${dotnet_path}/Framework/v2.0.50727" native_path)
message(STATUS "Looking for csc: ${CMAKE_CSharp_COMPILER}")
# give up
if (NOT CMAKE_CSharp_COMPILER)
message (STATUS "Couldn't find a valid C# compiler. Set either CMake_CSharp_COMPILER or the CSC environment variable to a valid path.")
endif (NOT CMAKE_CSharp_COMPILER)
endif (NOT CMAKE_CSharp_COMPILER)
endif (NOT CMAKE_CSharp_COMPILER)
endif(NOT CMAKE_CSharp_COMPILER)
# now try to find the gac location
if (CMAKE_CSharp_COMPILER AND NOT GAC_DIR AND MONO_FOUND)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_search_module(MONO_CECIL mono-cecil)
if(MONO_CECIL_FOUND)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} mono-cecil --variable=assemblies_dir OUTPUT_VARIABLE GAC_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
endif(MONO_CECIL_FOUND)
pkg_search_module(CECIL cecil)
if(CECIL_FOUND)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} cecil --variable=assemblies_dir OUTPUT_VARIABLE GAC_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
endif(CECIL_FOUND)
if (NOT GAC_DIR)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} mono --variable=libdir OUTPUT_VARIABLE MONO_LIB_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
if (MONO_LIB_DIR)
set (GAC_DIR "${MONO_LIB_DIR}/mono")
message (STATUS "Could not find cecil, guessing GAC dir from mono prefix: ${GAC_DIR}")
endif (MONO_LIB_DIR)
endif (NOT GAC_DIR)
endif (PKG_CONFIG_FOUND)
if (NOT GAC_DIR)
set (GAC_DIR "/usr/lib/mono")
message(STATUS "Could not find cecil or mono. Using default GAC dir: ${GAC_DIR}")
endif (NOT GAC_DIR)
endif (CMAKE_CSharp_COMPILER AND NOT GAC_DIR AND MONO_FOUND)
# Create a cache entry so the user can modify this.
set(GAC_DIR "${GAC_DIR}" CACHE PATH "Location of the GAC")
message(STATUS "Using GAC dir: ${GAC_DIR}")
mark_as_advanced(CMAKE_CSharp_COMPILER)
if (CMAKE_CSharp_COMPILER)
set (CMAKE_CSharp_COMPILER_LOADED 1)
endif (CMAKE_CSharp_COMPILER)
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/CMakeCSharpCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCSharpCompiler.cmake IMMEDIATE @ONLY)
set(CMAKE_CSharp_COMPILER_ENV_VAR "CSC")

View File

@ -0,0 +1 @@
SET(CMAKE_CSharp_COMPILER_WORKS 1 CACHE INTERNAL "")

View File

@ -0,0 +1,41 @@
# - Find Java Header Compiler
# This module finds if Java is installed and determines where the
# include files and libraries are. This code sets the following
# variables:
#
# JAVA_HEADER_COMPILE = the full path to the Java Header compiler
#
# Call cmake default version
FIND_PACKAGE( Java )
SET(JAVA_BIN_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.9;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.7;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.6;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin"
$ENV{JAVA_HOME}/bin
/usr/bin
/usr/lib/java/bin
/usr/share/java/bin
/usr/local/bin
/usr/local/java/bin
/usr/local/java/share/bin
/usr/java/j2sdk1.4.2_04
/usr/lib/j2sdk1.4-sun/bin
/usr/java/j2sdk1.4.2_09/bin
/usr/lib/j2sdk1.5-sun/bin
/opt/sun-jdk-1.5.0.04/bin
)
FIND_PROGRAM(JAVA_HEADER_COMPILE
NAMES javah
PATHS ${JAVA_BIN_PATH}
)
MARK_AS_ADVANCED(
JAVA_HEADER_COMPILE
)

View File

@ -0,0 +1,36 @@
# - Try to find the mono, mcs, gmcs and gacutil
#
# defines
#
# MONO_FOUND - system has mono, mcs, gmcs and gacutil
# MONO_PATH - where to find 'mono'
# GMCS_PATH - where to find 'gmcs'
# GACUTIL_PATH - where to find 'gacutil'
#
# copyright (c) 2007 Arno Rehn arno@arnorehn.de
#
# Redistribution and use is allowed according to the terms of the GPL license.
FIND_PROGRAM (MONO_EXECUTABLE mono)
FIND_PROGRAM (GMCS_EXECUTABLE gmcs)
FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil)
SET (MONO_FOUND FALSE CACHE INTERNAL "")
IF (MONO_EXECUTABLE AND GMCS_EXECUTABLE AND GACUTIL_EXECUTABLE)
SET (MONO_FOUND TRUE CACHE INTERNAL "")
ENDIF (MONO_EXECUTABLE AND GMCS_EXECUTABLE AND GACUTIL_EXECUTABLE)
IF (NOT Mono_FIND_QUIETLY)
MESSAGE(STATUS "Path of mono: ${MONO_EXECUTABLE}")
MESSAGE(STATUS "Path of gmcs: ${GMCS_EXECUTABLE}")
MESSAGE(STATUS "Path of gacutil: ${GACUTIL_EXECUTABLE}")
ENDIF (NOT Mono_FIND_QUIETLY)
IF (NOT MONO_FOUND)
IF (Mono_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find one or more of the following programs: mono, gmcs, gacutil")
ENDIF (Mono_FIND_REQUIRED)
ENDIF (NOT MONO_FOUND)
MARK_AS_ADVANCED(MONO_EXECUTABLE GMCS_EXECUTABLE GACUTIL_EXECUTABLE)

View File

@ -0,0 +1,74 @@
# - Try to find the PAM libraries
# Once done this will define
#
# PAM_FOUND - system has pam
# PAM_INCLUDE_DIR - the pam include directory
# PAM_LIBRARIES - libpam library
if (PAM_INCLUDE_DIR AND PAM_LIBRARY)
# Already in cache, be silent
set(PAM_FIND_QUIETLY TRUE)
endif (PAM_INCLUDE_DIR AND PAM_LIBRARY)
find_path(PAM_INCLUDE_DIR NAMES security/pam_appl.h pam/pam_appl.h)
find_library(PAM_LIBRARY pam)
find_library(DL_LIBRARY dl)
if (PAM_INCLUDE_DIR AND PAM_LIBRARY)
set(PAM_FOUND TRUE)
if (DL_LIBRARY)
set(PAM_LIBRARIES ${PAM_LIBRARY} ${DL_LIBRARY})
else (DL_LIBRARY)
set(PAM_LIBRARIES ${PAM_LIBRARY})
endif (DL_LIBRARY)
if (EXISTS ${PAM_INCLUDE_DIR}/pam/pam_appl.h)
# darwin claims to be something special
set(HAVE_PAM_PAM_APPL_H 1)
endif (EXISTS ${PAM_INCLUDE_DIR}/pam/pam_appl.h)
if (NOT DEFINED PAM_MESSAGE_CONST)
include(CheckCXXSourceCompiles)
# XXX does this work with plain c?
check_cxx_source_compiles("
#if ${HAVE_PAM_PAM_APPL_H}+0
# include <pam/pam_appl.h>
#else
# include <security/pam_appl.h>
#endif
static int PAM_conv(
int num_msg,
const struct pam_message **msg, /* this is the culprit */
struct pam_response **resp,
void *ctx)
{
return 0;
}
int main(void)
{
struct pam_conv PAM_conversation = {
&PAM_conv, /* this bombs out if the above does not match */
0
};
return 0;
}
" PAM_MESSAGE_CONST)
endif (NOT DEFINED PAM_MESSAGE_CONST)
set(PAM_MESSAGE_CONST ${PAM_MESSAGE_CONST} CACHE BOOL "PAM expects a conversation function with const pam_message")
endif (PAM_INCLUDE_DIR AND PAM_LIBRARY)
if (PAM_FOUND)
if (NOT PAM_FIND_QUIETLY)
message(STATUS "Found PAM: ${PAM_LIBRARIES}")
endif (NOT PAM_FIND_QUIETLY)
else (PAM_FOUND)
if (PAM_FIND_REQUIRED)
message(FATAL_ERROR "PAM was not found")
endif(PAM_FIND_REQUIRED)
endif (PAM_FOUND)
mark_as_advanced(PAM_INCLUDE_DIR PAM_LIBRARY DL_LIBRARY PAM_MESSAGE_CONST)

View File

@ -0,0 +1,94 @@
# - Convert XML docBook files to various formats
# This will convert XML docBook files to various formats like:
# man html txt dvi ps pdf
# macro XMLTO(outfiles infiles... MODES modes...)
set ( XMLTO_FOUND false )
find_program ( XMLTO_EXECUTABLE
NAMES xmlto
DOC "path to the xmlto docbook xslt frontend"
)
mark_as_advanced ( XMLTO_EXECUTABLE )
if ( XMLTO_EXECUTABLE )
set ( XMLTO_FOUND true )
endif ( XMLTO_EXECUTABLE )
if ( NOT XMLTO_FIND_QUIETLY )
if ( XMLTO_FIND_REQUIRED )
MESSAGE(FATAL_ERROR "xmlto not found" )
endif ( XMLTO_FIND_REQUIRED )
endif ( NOT XMLTO_FIND_QUIETLY )
macro ( _XMLTO_FILE outfiles mode)
#special settings
set ( XMLTO_FILEEXT_man 1 )
set ( XMLTO_MODE_html xhtml-nochunks )
if ( NOT XMLTO_MODE_${mode})
set ( XMLTO_MODE_${mode} ${mode} )
endif ( NOT XMLTO_MODE_${mode} )
if ( NOT XMLTO_FILEEXT_${mode} )
set ( XMLTO_FILEEXT_${mode} ${mode} )
endif ( NOT XMLTO_FILEEXT_${mode} )
foreach ( dbFile ${ARGN} )
if ( "${mode}" STREQUAL "man" )
file ( READ "${dbFile}" _DB_FILE_CONTENTS )
string ( REGEX MATCH "<manvolnum>[^<]*" XMLTO_FILEEXT_${mode} "${_DB_FILE_CONTENTS}" )
string ( REGEX REPLACE "^<manvolnum>" "" XMLTO_FILEEXT_${mode} "${XMLTO_FILEEXT_${mode}}" )
string ( REGEX REPLACE "[[:space:]]" "" XMLTO_FILEEXT_${mode} "${XMLTO_FILEEXT_${mode}}" )
endif ( "${mode}" STREQUAL "man" )
get_filename_component ( dbFilePath ${CMAKE_CURRENT_BINARY_DIR}/${dbFile} PATH )
get_filename_component ( dbFileWE ${dbFile} NAME_WE )
get_filename_component ( dbFileAbsWE ${dbFilePath}/${dbFileWE} ABSOLUTE )
add_custom_command (
OUTPUT ${dbFileAbsWE}.${XMLTO_FILEEXT_${mode}}
COMMAND ${XMLTO_EXECUTABLE} ${XMLTO_COMMAND_ARGS} -o ${CMAKE_CURRENT_BINARY_DIR}
${XMLTO_MODE_${mode}} "${dbFile}"
MAIN_DEPENDENCY ${dbFile}
VERBATIM
)
list ( APPEND ${outfiles}
${dbFileAbsWE}.${XMLTO_FILEEXT_${mode}}
)
endforeach ( dbFile )
endmacro ( _XMLTO_FILE outfiles )
macro ( XMLTO )
set ( XMLTO_MODES )
set ( XMLTO_FILES )
set ( XMLTO_HAS_MODES false )
set ( XMLTO_ADD_DEFAULT "" )
foreach ( arg ${ARGN} )
if ( ${arg} STREQUAL "MODES" )
set ( XMLTO_HAS_MODES true )
elseif ( ${arg} STREQUAL "ALL" )
set ( XMLTO_ADD_DEFAULT ALL )
else ( ${arg} STREQUAL "MODES" )
if ( XMLTO_HAS_MODES )
list ( APPEND XMLTO_MODES ${arg} )
else ( XMLTO_HAS_MODES )
list ( APPEND XMLTO_FILES ${arg} )
endif ( XMLTO_HAS_MODES )
endif ( ${arg} STREQUAL "MODES" )
endforeach ( arg ${ARGN} )
if ( NOT XMLTO_MODES )
set ( XMLTO_MODES html )
endif ( NOT XMLTO_MODES )
foreach ( mode ${XMLTO_MODES} )
_xmlto_file ( XMLTO_FILES_${mode} ${mode} ${XMLTO_FILES} )
add_custom_target ( ${mode} ${XMLTO_ADD_DEFAULT}
DEPENDS ${XMLTO_FILES_${mode}}
VERBATIM
)
endforeach ( mode )
set ( XMLTO_MODES )
set ( XMLTO_FILES )
endmacro ( XMLTO )

View File

@ -0,0 +1,22 @@
IF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"")
ENDIF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
FILE(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
STRING(REGEX REPLACE "\n" ";" files "${files}")
FOREACH(file ${files})
MESSAGE(STATUS "Uninstalling \"${file}\"")
IF(EXISTS "${file}")
EXEC_PROGRAM(
"@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
IF("${rm_retval}" STREQUAL 0)
ELSE("${rm_retval}" STREQUAL 0)
MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
ENDIF("${rm_retval}" STREQUAL 0)
ELSE(EXISTS "${file}")
MESSAGE(STATUS "File \"${file}\" does not exist.")
ENDIF(EXISTS "${file}")
ENDFOREACH(file)

View File

@ -1,36 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
SUBDIRS = $(TARGET_OS)
DIST_SUBDIRS = linux windows
CFILES =
EXTRA_DIST = $(CFILES)
.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

View File

@ -1,114 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = $(CFILES)
CASAROOT = ../..
CASALIBDIR = $(CASAROOT)/$(LIB)
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR = ..
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME =sscs_ll
MODULE_EXT =o
CFILES = ../sscs_ll.c
CSFILES_CSC :=
INCLUDES = -I. -I.. -I$(CASAROOT)/include -I/opt/gnome/include/gnome-keyring-1/
EXTRA_CFLAGS =
RESOURCES =
CFLAGS += $(EXTRA_CFLAGS) $(INCLUDES) $(DEFINES)
LIBS = -lpthread -ldl
LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT)
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o: %.cpp
$(CC) -c $(CFLAGS) -o $@ $<
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
# @echo [======== Linking $@ ========]
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT):
@echo [======== Creating symlink $@ ========]
ln -f $(CFILES) $(CASAROOT)/micasadk
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,114 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
else
TARGET_CFG = Release
endif
SUBDIRS =
DIST_SUBDIRS =
EXTRA_DIST = $(CFILES)
CASAROOT = ../..
CASALIBDIR = $(CASAROOT)/$(LIB)
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR = ..
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME =sscs_ll
MODULE_EXT =o
CFILES = ../sscs_ll.c
CSFILES_CSC :=
INCLUDES = -I. -I.. -I$(CASAROOT)/include -I/opt/gnome/include/gnome-keyring-1/
EXTRA_CFLAGS =
RESOURCES =
CFLAGS += $(EXTRA_CFLAGS) $(INCLUDES) $(DEFINES)
LIBS = -lpthread -ldl
LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT)
OBJDIR = ./$(TARGET_CFG)/$(LIB)
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o: %.cpp
$(CC) -c $(CFLAGS) -o $@ $<
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
# @echo [======== Linking $@ ========]
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT):
@echo [======== Creating symlink $@ ========]
ln -f $(CFILES) $(CASAROOT)/micasadk
$(OBJDIR):
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/
uninstall-local:
cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
rmdir $(DESTDIR)$(libdir)
#installcheck-local: install
# $(mkinstalldirs) $(DESTDIR)$(libdir)
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
# cd $(DESTDIR)$(libdir); $(MONO)
clean-local:
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
distclean-local:
maintainer-clean-local:
rm -f Makefile.in

View File

@ -1,11 +0,0 @@
#!/bin/sh
# Convert the batch files to dos format
cd $BUILD_LOCATION/$NAME~$VERSION/$NAME
find . -name "*.bat" | xargs unix2dos
rsh $BUILD_CLIENT "cd /d c:\\ccm_wa\\security\\$NAME~$VERSION\\$NAME && config\\build.cmd"
# Doesn't work because this project uses the P: drive...
#ssh $BUILD_CLIENT "cmd /c 'cd /d d:\\$VERSION\\$PROJECT_NAME~$VERSION\\$PROJECT_NAME && config\\build.cmd'"

View File

@ -1,22 +0,0 @@
@echo on
setlocal
rem Set some compiler specific options
set MSC=p:/Tools/msc7.00/Vc7/
set WATCOM=p:/Tools/WCC/v11.0/
set TMP=%CCM_WORK_AREA%
call getpath.bat .
set CURRENT_DIR=%CWD%
cd ..
call %CURRENT_DIR%\getpath.bat .
set CCM_WORK_AREA=%CWD%
cd %CURRENT_DIR%
rem add path to some dll files in the MS compiler
set PATH=%PATH%;.;%MSC%../Common7/IDE;%MSC%../SDK/v1.1/Bin/
c:\cygwin\bin\bash mk-cai-all
endlocal

View File

@ -1,9 +0,0 @@
#!/bin/sh
if [ "$PLATFORM" = "AIX" ]; then
NEW_PATH=/usr/local/bin:/usr/ccs/lib
fi
ssh $BUILD_CLIENT "cd ccm_wa/security/$NAME~$VERSION/$NAME; export PATH=.:$NEW_PATH:\$PATH; echo PATH=\$PATH; mk-cai-all;"

View File

@ -1,10 +0,0 @@
#!/bin/sh
#
# Script %name: clean %
# Instance: security_1
# %version: 1 %
# Description:
# %created_by: nds_cm %
# %date_created: Fri Apr 01 16:29:28 2005 %

View File

@ -1,329 +0,0 @@
#######################################################################
#
# Copyright (C) 2006 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.
#
#
#######################################################################
AC_INIT(include/micasa.h)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(CASA, 1.6.1137)
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])
#
# Check for valid C# compiler in linux
#
case $host_os in
cygwin*)
;;
*)
AC_CHECK_PROG(CSC, csc, csc)
test -z "$CSC" && AC_CHECK_PROG(CSC, gmcs, gmcs)
test -z "$CSC" && AC_MSG_ERROR([no acceptable C Sharp compiler found in \$PATH])
;;
esac
case $CSC in
#
# Mono-specific configuration
#
gmcs)
CSC_EXEFLAG=/target:exe
CSC_LIBFLAG=/target:library
CSC_EXEFLAG=/target:exe
CSC_WINEXEFLAG=/target:winexe
CSCFLAGS='/d:MONO /warn:4 /d:TRACE -d:LINUX'
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(CSCFLAGS_DEBUG)
AC_SUBST(MONO)
AC_SUBST(MONO_PATH)
AC_SUBST(SYSTEM_XML)
SRCDIR='$(top_srcdir)'
DOCDIR="$SRCDIR/doc"
TOOLDIR='$(top_srcdir)/tools'
AC_SUBST(SRCDIR)
AC_SUBST(DOCDIR)
AC_SUBST(TOOLDIR)
EMPTY=
SPACE='$(EMPTY) $(EMPTY)'
AC_SUBST(EMPTY)
AC_SUBST(SPACE)
#
# Check for operating system and set TARGET_OS
#
case $host_os in
cygwin*)
TARGET_OS='windows'
;;
*)
TARGET_OS='linux'
;;
esac
AC_SUBST(TARGET_OS)
AM_CONDITIONAL(LINUX, test "$TARGET_OS" = "linux")
AM_CONDITIONAL(WINDOWS, test "$TARGET_OS" = "windows")
#
# Check for architecture and set TARGET_ARCH
# ia64 needs to be treated as non64.
case $target_cpu in
x86_64*|p*pc64|s390x)
LIB=lib64
;;
*ia64|*)
LIB=lib
;;
esac
#Check for architecture in cygwin
#check for PROCESSOR_IDENTIFIER for 64bit architecture
case $host_os in
cygwin*)
if test "`echo $PROCESSOR_IDENTIFIER | grep 64`"; then
LIB="lib64"
fi
;;
*)
;;
esac
AC_SUBST(LIB)
AM_CONDITIONAL(LIB64, test "$LIB" = lib64)
#
#
# 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='/'
LINK=gcc
;;
#
# 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)'
LINK=link.exe
;;
esac
AC_SUBST(COMMON_CLEAN_FILES)
AC_SUBST(ICON_EXT)
AC_SUBST(ICON_FLAG)
AC_SUBST(PLATFORM_SUBDIRS)
AC_SUBST(SEP)
AC_SUBST(LINK)
#
# Run standard macros
#
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_HEADER_STDC
#######
#
# set CFLAGS
#
case $host_os in
linux*)
CFLAGS="$CFLAGS"
;;
cygwin*)
CC=cl.exe
CFLAGS="-D WIN32 -D SSCS_WIN32_PLAT_F -D N_PLAT_CLIENT -MT -Ox"
;;
esac
#
# 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 -DDBG -DDEBUG"
CFLAGS="$CFLAGS_DEBUG $CFLAGS -g -DDBG -DDEBUG \
-fPIC -DPIC -DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall \
-D_REENTRANT -DALIGNMENT -DN_PLAT_UNIX \
-DUNIX -DLINUX -DIAPX38"
CSCFLAGS="$CSCFLAGS_DEBUG $CSCFLAGS"
CXXFLAGS="$CXXFLAGS_DEBUG $CXXFLAGS"
DEVENV_CONFIGURATION=Debug
MONO=$MONO_DEBUG
else
# Build optimized version.
CFLAGS="$CFLAGS_OPTIMIZE $CFLAGS -g -fPIC -DPIC \
-DSSCS_LINUX_PLAT_F -O2 -fmessage-length=0 -Wall \
-D_REENTRANT -DALIGNMENT -DN_PLAT_UNIX \
-DUNIX -DLINUX -DIAPX38"
CSCFLAGS="$CSCFLAGS_OPTIMIZE $CSCFLAGS"
CXXFLAGS="$CXXFLAGS_OPTIMIZE $CXXFLAGS"
DEVENV_CONFIGURATION=Release
fi
AC_SUBST(CSCFLAGS)
AC_SUBST(DEVENV_CONFIGURATION)
##comment out due to build failure
# Check for GCC version to add fstack-protector flag
#
#GCC_VER="`gcc -dumpversion`"
#case "$GCC_VER" in
# 3*)
# ;;
# 4*)
# CFLAGS="$CFLAGS -fstack-protector"
# ;;
# *)
# ;;
#esac
#AC_SUBST(GCC_VER)
# Check for WIN PLATFORM by $PROCESSOR_IDENTIFIER
#case $host_os in
# cygwin*)
# WIN_VER="` echo $PROCESSOR_IDENTIFIER | cut -d ' ' -f1 `"
# WIN_VER=` echo $PROCESSOR_IDENTIFIER | cut -d " " -f1 |\[sed -e 's/[^0-9]*//'] | \[sed -e 's/[^0-9].*//']`
# ;;
# *)
# ;;
#esac
#AC_SUBST(WIN_VER)
#
# 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
micasacache/Makefile
micasacache/linux/Makefile
micasacache/windows/Makefile
common/Makefile
common/linux/Makefile
common/windows/Makefile
micasadk/Makefile
micasadk/linux/Makefile
micasadk/windows/Makefile
micasad/lib/Makefile
micasad/lib/common/Makefile
micasad/lib/communication/Makefile
micasad/startup/Makefile
sharp/Makefile
sharp/NSSCSWrapper/Makefile
micasad/Makefile
cli/Makefile
policy/Makefile
adlib/ad_kw/Makefile
adlib/ad_gk/native/Makefile
adlib/ad_gk/Makefile
adlib/ad_ff/native/Makefile
adlib/ad_ff/Makefile
adlib/Makefile
gui/Makefile
logincapture/Makefile
logincapture/linux/Makefile
logincapture/windows/Makefile
logincapture/linux/PAM/Makefile
logincapture/linux/PAM/linux/Makefile
jwrapper/Makefile
jwrapper/src/Makefile
jwrapper/jnsscs/Makefile
jwrapper/jnsscs/linux/Makefile
jwrapper/jnsscs/windows/Makefile
package/Makefile
package/linux/Makefile
package/windows/Makefile
package/windows/vs_solutions/Makefile
package/windows/vs_solutions/CASA32-msi/Makefile
package/windows/vs_solutions/CASA64-msi/Makefile
package/linux/CASA.spec
])

Binary file not shown.

View File

@ -1,143 +0,0 @@
To provide full compatibility with all Unix flavors the project scripts were converted to use
cygwin Bourne shell product by Redhat Inc. instead of MKS. Mortis Kern Korn Shell is expensive
and requires a license per machine. Cygwin is available for download from www.cywin.com for
free.
To install CYGWIN you have to use the Internet Explorer and go to "www.cygwin.com" and
install the Latest cygwin from the web ("http://www.cygwin.com/setup.exe"). Follow the
instruchtions and just accept all of the defaults and that should install cygwin in
c:\cygwin directory.
Once the installation is complete
copy the "profile" shell script file from \dependencies\cygwin to your c:\cygwin\etc.
To make the drive mappings match your project directory structure you would need to define
the following SYSTEM VARIABLES in your environment by right clicking on "My Computer" Icon on your desktop
and following order:
My Computer -> Properties -> Advanced -> Environment Variables -> New...
OPTIONAL SHORT HAND PARAMETERS
==============================
The parameters DEVDRV_* below are short hand parameters for substituing the long directory
structure names in CCM. The build woks fine as long as you go to the root directory of your
project and run mk-ca-all or mk-cai-all or from the root change dir to shrc and use individual
build scripts for building the components.
[/cygwin/c] cd dev/SecretStore~security#IndiaRO/SecretStore/SecretStore_src
[/cygwin/c/dev/SecretStore~security#IndiaRO/SecretStore/SecretStore_src> mk-ca-all
or
[/cygwin/c] cd dev/SecretStore~security#IndiaRO/SecretStore/SecretStore_src
[/cygwin/c/dev/SecretStore~security#IndiaRO/SecretStore/SecretStore_src] cd shsrc
[/cygwin/c/dev/SecretStore~security#IndiaRO/SecretStore/SecretStore_src] mk-sss-dw clean all
To use the short hand drives and avoid having to
type long names to go the project root the following parameters in your environment should be
set to the root of the projects you have. You can use up to 5 drives by default. For more drives
you would need to edit the "/etc/profile" shell script and add more DEVDRV_* parameters to satisfy
your needs. If you have less than 5 drives just set as many parameters as you need.
define the following parameters as it applies to your environment like the example below:
DEVDRV_I = c:/dev/SecretStore~security#IndiaRO/SecretStore/SecretStore_src
DEVDRV_J = c:/dev/SecretStore_src~cameron3/SecretStore_src
DEVDRV_K = c:/dev/SecretStore_src~cameron2/SecretStore_src
DEVDRV_L = c:/dev/SecretStore_doc~cameron_ss20/SecretStore_doc
DEVDRV_M = c:/dev/SecretStore_doc~cameron/SecretStore_doc
After defining your project directory variables run cygwin shell and your drives will automatically
be mapped to your build environment. Then, from the root of the project or shsrc directory under the
root of the project "cygwin/j" or "cygwin/j/shsrc" run the script as it was explained above. Use the
build scripts to build components.
The example above will become the following.
[/cygwin/j] mk-ca-all
or
cd c:/dev/SecretStore~security#IndiaRO/SecretStore/SecretStore_src
[/cygwin/j] cd shsrc
[/cygwin/j] mk-sss-dw clean all
This shell also allows for ssh sessions to Unix and Linux servers for build and development
using our Unix build scripts.
LOOK AT THE LIST OF PROJECT VARIABLES BELOW
*********** NOTE ABOUT GNU DIRECTORY UNDER CYGWIN *********************
SecretStore project uses GNU Make for building components. GNU Make is a component of
cygwin but it is not downloaded by default so we supply a copy of it here in the gnu direcotry
under cygwin. If so desired during installation you can add extra components such as GNU Make
to be downloaded with cygwin. This would require a download from web site and install from local
cygwin directory will only supply the default components of the Bourn Shell.
cvpackz.exe is not a components of the cygwin product but it is required for
NetWare builds so it is supplied here.
Paths to cvpackz.exe and GNU make.exe should be defined thru environment variables as described
in \make\tools.mak.
(variable is GNU and by default it should be set to "j:/dependencies/cygwin/gnu/" assuming that
j:/ is the project root directory).
#
# Path to the Continuus configuration management tool (necessary for build
# manager builds only).
# example: CONTINUUS=c:/ccm51/bin/
#
CONTINUUS
#
# Path to the configuration management build area (necessary for build
# manager builds only). Defaults to build manager's machine.
# example: CCM_WORK_AREA=c:/SecretStore_main~PREP/SecretStore_main/
#
CCM_WORK_AREA
#
# Path to the tools directory where WATCOM and MSVC compilers
# are installed.
# example: TOOLS=c:/tools/
#
TOOLS
#
# Path to the open source gnu make utility and cvpackz.
# example: GNU=j:/dependencies/cygwin/gnu/
#
GNU
#
# Path to Microsoft's Visual C++ compiler main directory.
# example: MSC=$(TOOLS)msc6.00/vc/
#
MSC
#
# Path to Microsoft's Visual Studio common components directory. On the
# network (hence, on many developer's machines) this has been copied to
# the same location as the Visual C++ executables. However, Microsoft's
# installation puts it in the Visual Studio common components directory
# structure. Either way you installed it, it should still work.
# example: MSVS = $(MSC)
#
MSVS
#
# Path to Watcom's C/C++ compiler for building NLMs.
# example: WATCOM=$(TOOLS)wcc/v11.0a/
#
WATCOM
Updated by: Cameron Mashayekhi
On: 1/28/2002

View File

@ -1,6 +0,0 @@
cvpackz.exe and gnumake.exe are not components of the cygwin product but they are required for
NetWare and Windows builds.
Paths to cvpackz.exe and gnumake.exe should be defined thru environment variables as described
in \make\tools.mak.

View File

@ -1,71 +0,0 @@
PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
USER="`id -un`"
# The following is the standard idiom for processing ENVIRON in
# *interactive* shells only.
export ENV='${ENVIRON[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}'
# The following is a simple definition that will process ENVIRON in
# *all* shells.
export ENV="$ENVIRON"
# Set up USER's home directory
if [ -z "$HOME" ]; then
HOME="/home/$USER"
fi
if [ ! -d "$HOME" ]; then
mkdir -p "$HOME"
fi
export HOME USER
for i in /etc/profile.d/*.sh ; do
if [ -f $i ]; then
. $i
fi
done
export MAKE_MODE=unix
export PS1='\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
#cd "$HOME"
# Automated form using the environment variables
# set the development paths in the original form and the script will
# automatically pick them up.
subst i: $DEVDRV_I> /dev/null 2>&1
subst j: $DEVDRV_J> /dev/null 2>&1
subst k: $DEVDRV_K> /dev/null 2>&1
subst l: $DEVDRV_L> /dev/null 2>&1
subst m: $DEVDRV_M> /dev/null 2>&1
# The original form
#subst k: c:/dev/SecretStore~security#IndiaRO/SecretStore/SecretStore_src> /dev/null 2>&1
#subst j: c:/dev/SecretStore_src~cameron3/SecretStore_src> /dev/null 2>&1
#subst i: c:/dev/SecretStore_src~cameron2/SecretStore_src> /dev/null 2>&1
#subst l: c:/dev/SecretStore_doc~cameron_ss20/SecretStore_doc> /dev/null 2>&1
#subst m: c:/dev/SecretStore_doc~cameron/SecretStore_doc> /dev/null 2>&1
test -f ./.bashrc && . ./.bashrc
alias a:="cd a:" b:="cd b:" c:="cd c:" d:="cd d:" e:="cd e:" j:="cd j:"
alias md=mkdir rd=rmdir i:="cd i:" h:="cd h:" f:="cd f:" k:="cd k:" "n:=cd n:"
alias "o:=cd o:"
export SWITCHAR=${SWITCHAR:=/} # if not already defined
export COMSPEC="${COMSPEC:=$ComSpec}"
export TOOLS="c:/tools/"
for arg in cls copy del dir erase move path ren type ver verify vol
do
alias $arg="'${COMSPEC}' ${SWITCHAR}c $arg"
done
PS1='[$PWD] '
set -o emacs
cd j:

View File

@ -20,61 +20,61 @@
*
***********************************************************************/
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("CASAManager.exe")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.7.*")]
//
// 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("")]
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("CASAManager.exe")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Novell, Inc")]
[assembly: AssemblyProduct("CASA")]
[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.7.*")]
//
// 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("")]

View File

@ -1,247 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A1A805D0-B400-4D11-A772-348CE13F1046}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>CASAManager</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>WinExe</OutputType>
<RootNamespace>
</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>Debug\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>W32</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>Release\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>W32</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="atk-sharp">
<Name>atk-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\atk-sharp.dll</HintPath>
<AssemblyFolderKey>hklm\dn\gtk-sharp-2.0</AssemblyFolderKey>
</Reference>
<Reference Include="gdk-sharp">
<Name>gdk-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\gdk-sharp.dll</HintPath>
<AssemblyFolderKey>hklm\dn\gtk-sharp-2.0</AssemblyFolderKey>
</Reference>
<Reference Include="glade-sharp">
<Name>glade-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\glade-sharp.dll</HintPath>
<AssemblyFolderKey>hklm\dn\gtk-sharp-2.0</AssemblyFolderKey>
</Reference>
<Reference Include="glib-sharp">
<Name>glib-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\glib-sharp.dll</HintPath>
<AssemblyFolderKey>hklm\dn\gtk-sharp-2.0</AssemblyFolderKey>
</Reference>
<Reference Include="gnome-sharp">
<Name>gnome-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\gnome-sharp.dll</HintPath>
<AssemblyFolderKey>hklm\dn\gtk-sharp-2.0</AssemblyFolderKey>
</Reference>
<Reference Include="gtk-sharp">
<Name>gtk-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\gtk-sharp.dll</HintPath>
<AssemblyFolderKey>hklm\dn\gtk-sharp-2.0</AssemblyFolderKey>
</Reference>
<Reference Include="pango-sharp">
<Name>pango-sharp</Name>
<HintPath>F:\Program Files\Mono-2.0.1\lib\mono\gtk-sharp-2.0\pango-sharp.dll</HintPath>
<AssemblyFolderKey>hklm\dn\gtk-sharp-2.0</AssemblyFolderKey>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Drawing">
<Name>System.Drawing</Name>
</Reference>
<Reference Include="System.Windows.Forms">
<Name>System.Windows.Forms</Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
<ProjectReference Include="..\adlib\Novell.CASA.A-D.csproj">
<Name>Novell.CASA.A-D</Name>
<Project>{25D49F34-F655-4CCF-93F1-449243AF7A32}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\micasad\lib\Novell.CASA.Common.csproj">
<Name>Novell.CASA.Common</Name>
<Project>{57CD94A2-5B4A-40C3-8189-CB760FB78357}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\policy\Novell.CASA.CASAPolicy.csproj">
<Name>Novell.CASA.CASAPolicy</Name>
<Project>{636A9D7E-BFB5-4EB9-96F8-51FF85A98826}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\sharp\NSSCSWrapper\Novell.CASA.miCASAWrapper.csproj">
<Name>Novell.CASA.miCASAWrapper</Name>
<Project>{E21DD887-22F4-4935-9851-409715F663B0}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="CasaMain.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="CasaTray.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Common.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="CommonGUI.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Config.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="CopySecret.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DbgFileChooser.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ExportSecrets.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="FileChooser.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="FindAndReplace.cs" />
<Compile Include="Firefox.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GnomeKeyring.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ImportSecrets.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="KdeWallet.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Logger.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="MiCasa.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Mozilla.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="PersistentPolicyDialog.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SingleApplication.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Store.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="StoreDataInterface.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="StorePolicyInterface.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="windows\NoGTKSharpForm.cs">
<SubType>Form</SubType>
</Compile>
<Content Include="images\casa-logo.png" />
<Content Include="images\CASA.bmp" />
<Content Include="images\CASAiconsLocked.ico" />
<Content Include="images\CASA_16.png" />
<Content Include="images\CASA_32.png" />
<Content Include="images\CASA_48.png" />
<Content Include="images\firefox-logo.png" />
<Content Include="images\folder.png" />
<Content Include="images\keyring-logo.png" />
<Content Include="images\kwallet-logo.png" />
<Content Include="images\micasa-logo.png" />
<Content Include="images\mozilla-logo.png" />
<Content Include="images\novell-logo.png" />
<None Include="images\casa.glade" />
<None Include="images\casa.gladep" />
<EmbeddedResource Include="windows\NoGTKSharpForm.resx">
<DependentUpon>NoGTKSharpForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -1,57 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastOpenVersion>7.10.3077</LastOpenVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ReferencePath>
</ReferencePath>
<CopyProjectDestinationFolder>
</CopyProjectDestinationFolder>
<CopyProjectUncPath>
</CopyProjectUncPath>
<CopyProjectOption>0</CopyProjectOption>
<ProjectView>ProjectFiles</ProjectView>
<ProjectTrust>0</ProjectTrust>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<EnableASPDebugging>false</EnableASPDebugging>
<EnableASPXDebugging>false</EnableASPXDebugging>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>-debug</StartArguments>
<StartPage>
</StartPage>
<StartProgram>
</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>true</StartWithIE>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<EnableASPDebugging>false</EnableASPDebugging>
<EnableASPXDebugging>false</EnableASPXDebugging>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>
</StartArguments>
<StartPage>
</StartPage>
<StartProgram>
</StartProgram>
<StartURL>
</StartURL>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartWithIE>true</StartWithIE>
</PropertyGroup>
</Project>

View File

@ -1,11 +0,0 @@
#!/bin/sh
HOST_ARCH=`uname -a | grep -c x86_64`
if [ $HOST_ARCH -gt 0 ]
then ARCH_LIB=64
else
ARCH_LIB=
fi
export MONO_PATH=/usr/lib$ARCH_LIB/
mono /usr/bin/CASAManager.exe $1 $2 $3 $4

View File

@ -0,0 +1,3 @@
#!/bin/sh
export MONO_PATH=@LIBEXEC_INSTALL_DIR@
mono @LIBEXEC_INSTALL_DIR@/CASAManager.exe $1 $2 $3 $4

88
CASA/gui/CMakeLists.txt Normal file
View File

@ -0,0 +1,88 @@
#################################
# Project
##############
project(CASAManager)
enable_language(CSharp)
#################################
# Dependencies
##############
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/CASAManager.sh.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/CASAManager"
IMMEDIATE @ONLY)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/Common.cs.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/Common.cs"
IMMEDIATE @ONLY)
#################################
# Compiler Switches
##############
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
add_definitions( -D_GNU_SOURCE )
#################################
# Source Files
##############
SET(SRC_CS AssemblyInfo.cs
CasaMain.cs
CasaTray.cs
CopySecret.cs
DbgFileChooser.cs
TrayLib.cs
ExportSecrets.cs
FileChooser.cs
ImportSecrets.cs
FindAndReplace.cs
Firefox.cs
GnomeKeyring.cs
KdeWallet.cs
Logger.cs
MiCasa.cs
Mozilla.cs
Store.cs
StoreDataInterface.cs
StorePolicyInterface.cs
CommonGUI.cs
${CMAKE_CURRENT_BINARY_DIR}/Common.cs
PersistentPolicyDialog.cs
Config.cs)
#################################
# Linking
##############
SET(CS_FLAGS -r:${CMAKE_BINARY_DIR}/micasad/lib/Novell.CASA.Common.dll
-r:${CMAKE_BINARY_DIR}/sharp/NSSCSWrapper/Novell.CASA.miCASAWrapper.dll
-r:${CMAKE_BINARY_DIR}/policy/Novell.CASA.CASAPolicy.dll
-r:${CMAKE_BINARY_DIR}/adlib/Novell.CASA.A-D.dll
${GLADE-SHARP_LIBRARIES} -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -d:LINUX -nowarn:169)
#CSHARP_ADD_LIBRARY(CASAManager "${SRC_CS}" REFERENCES Mono.Posix COMPILE_FLAGS /d:LINUX /warn:0 /keyfile:${KEYFILE})
CSHARP_ADD_EXECUTABLE(CASAManager "${SRC_CS}" REFERENCES Novell.CASA.Common Novell.CASA.miCASAWrapper Mono.Posix System.Security
Novell.CASA.CASAPolicy Novell.CASA.A-D COMPILE_FLAGS -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -d:LINUX -nowarn:169)
ADD_DEPENDENCIES(CASAManager Novell.CASA.Common Novell.CASA.miCASAWrapper Novell.CASA.CASAPolicy Novell.CASA.A-D)
#################################
# Install Files
##############
FILE(GLOB help_files "${CMAKE_CURRENT_SOURCE_DIR}/help/en/*")
INSTALL(FILES ${help_files} DESTINATION ${LIBEXEC_INSTALL_DIR}/help/en/)
FILE(GLOB images_files "${CMAKE_CURRENT_SOURCE_DIR}/images/*")
INSTALL(FILES ${images_files} DESTINATION ${LIBEXEC_INSTALL_DIR}/images/)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/CASAManager.exe.config DESTINATION ${LIBEXEC_INSTALL_DIR})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/CASAManager.exe DESTINATION ${LIBEXEC_INSTALL_DIR})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/CASAManager DESTINATION ${BIN_INSTALL_DIR})

View File

@ -42,13 +42,13 @@ namespace Novell.CASA.GUI
public static System.Drawing.Icon m_iconNormal;
public static System.Drawing.Icon m_iconLocked;
private System.Windows.Forms.ToolStripMenuItem cmOpen;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem cmLock;
private System.Windows.Forms.ToolStripMenuItem cmUnlock;
private System.Windows.Forms.ToolStripMenuItem cmDestroySecrets;
private System.Windows.Forms.ToolStripMenuItem cmOpen;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem cmLock;
private System.Windows.Forms.ToolStripMenuItem cmUnlock;
private System.Windows.Forms.ToolStripMenuItem cmDestroySecrets;
private System.Windows.Forms.ToolStripMenuItem cmExit;
#endif
#if LINUX
@ -152,99 +152,99 @@ namespace Novell.CASA.GUI
icon.ShowAll();
#endif
}
#if W32
private void ShowContextMenu()
{
try
{
System.Windows.Forms.ContextMenuStrip cm = new System.Windows.Forms.ContextMenuStrip();
notifyIcon.ContextMenuStrip = cm;
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
cmOpen = new System.Windows.Forms.ToolStripMenuItem("Manage Secrets");
cmLock = new System.Windows.Forms.ToolStripMenuItem("Lock Secrets");
cmUnlock = new System.Windows.Forms.ToolStripMenuItem("Unlock Secrets");
cmDestroySecrets = new System.Windows.Forms.ToolStripMenuItem("Destroy Secrets");
cmExit = new System.Windows.Forms.ToolStripMenuItem("Exit");
cmOpen.Click += new EventHandler(cmOpen_Click);
cmLock.Click += new EventHandler(cmLock_Click);
cmUnlock.Click += new EventHandler(cmUnlock_Click);
cmDestroySecrets.Click += new EventHandler(cmDestroySecrets_Click);
cmExit.Click += new EventHandler(cmExit_Click);
cmUnlock.Enabled = false;
cm.Items.AddRange(new System.Windows.Forms.ToolStripItem[]
{
cmOpen,
toolStripSeparator1,
cmLock,
cmUnlock,
toolStripSeparator2,
cmDestroySecrets,
toolStripSeparator3,
cmExit});
cm.Name = "contextMenuStripNotify";
cm.ShowImageMargin = false;
cm.Size = new System.Drawing.Size(143, 104);
if (MiCASAStore.IsLocked())
{
cmDestroySecrets.Enabled = false;
cmLock.Enabled = false;
cmUnlock.Enabled = true;
}
else
{
cmDestroySecrets.Enabled = true;
cmLock.Enabled = true;
cmUnlock.Enabled = false;
}
}
catch (Exception e)
{
Logger.DbgLog(e.ToString());
}
}
void cmOpen_Click(object sender, EventArgs e)
{
menuLaunchGUI_Activated(null, null);
}
void cmLock_Click(object sender, EventArgs e)
{
menuLockMiCasa_Activated(null, null);
}
void cmUnlock_Click(object sender, EventArgs e)
{
menuLockMiCasa_Activated(null, null);
}
void cmDestroySecrets_Click(object sender, EventArgs e)
{
menuDestroyMiCasa_Activated(null, null);
}
void cmExit_Click(object sender, EventArgs e)
{
OnPopupClick(sender, e);
}
}
#if W32
private void ShowContextMenu()
{
try
{
System.Windows.Forms.ContextMenuStrip cm = new System.Windows.Forms.ContextMenuStrip();
notifyIcon.ContextMenuStrip = cm;
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
cmOpen = new System.Windows.Forms.ToolStripMenuItem("Manage Secrets");
cmLock = new System.Windows.Forms.ToolStripMenuItem("Lock Secrets");
cmUnlock = new System.Windows.Forms.ToolStripMenuItem("Unlock Secrets");
cmDestroySecrets = new System.Windows.Forms.ToolStripMenuItem("Destroy Secrets");
cmExit = new System.Windows.Forms.ToolStripMenuItem("Exit");
cmOpen.Click += new EventHandler(cmOpen_Click);
cmLock.Click += new EventHandler(cmLock_Click);
cmUnlock.Click += new EventHandler(cmUnlock_Click);
cmDestroySecrets.Click += new EventHandler(cmDestroySecrets_Click);
cmExit.Click += new EventHandler(cmExit_Click);
cmUnlock.Enabled = false;
cm.Items.AddRange(new System.Windows.Forms.ToolStripItem[]
{
cmOpen,
toolStripSeparator1,
cmLock,
cmUnlock,
toolStripSeparator2,
cmDestroySecrets,
toolStripSeparator3,
cmExit});
cm.Name = "contextMenuStripNotify";
cm.ShowImageMargin = false;
cm.Size = new System.Drawing.Size(143, 104);
if (MiCASAStore.IsLocked())
{
cmDestroySecrets.Enabled = false;
cmLock.Enabled = false;
cmUnlock.Enabled = true;
}
else
{
cmDestroySecrets.Enabled = true;
cmLock.Enabled = true;
cmUnlock.Enabled = false;
}
}
catch (Exception e)
{
Logger.DbgLog(e.ToString());
}
}
void cmOpen_Click(object sender, EventArgs e)
{
menuLaunchGUI_Activated(null, null);
}
void cmLock_Click(object sender, EventArgs e)
{
menuLockMiCasa_Activated(null, null);
}
void cmUnlock_Click(object sender, EventArgs e)
{
menuLockMiCasa_Activated(null, null);
}
void cmDestroySecrets_Click(object sender, EventArgs e)
{
menuDestroyMiCasa_Activated(null, null);
}
void cmExit_Click(object sender, EventArgs e)
{
OnPopupClick(sender, e);
}
#else
private void ShowContextMenu()
@ -336,10 +336,10 @@ namespace Novell.CASA.GUI
ShowContextMenu();
}
if (args.Event.Button == 1)
{
{
if (m_config.GetConfigSetting(Common.CONFIG_DISPLAY_CASA_MANAGER, true))
menuLaunchGUI_Activated(null, null);
else
else
menuLockMiCasa_Activated(null, null);
}
}
@ -353,11 +353,11 @@ namespace Novell.CASA.GUI
Application.Quit(); // quits the application when the users clicks the popup menu
}
#if W32
private void notifyIcon_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
private void notifyIcon_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Right)
ShowContextMenu();
ShowContextMenu();
}
#endif
@ -474,6 +474,6 @@ namespace Novell.CASA.GUI
#endif
Application.Quit();
}
}
}
}

View File

@ -125,25 +125,25 @@ public class Common
INDEX_NATIVEINFO_WALLETLASTACCESSEDTIME = 7;
public static string LINUX_HELP_PATH = "file:///usr/share/doc/packages/CASA/help/";
public static string LINUX_HELP_PATH = "file://@LIBEXEC_INSTALL_DIR@/help/";
public static string WINDOWS_HELP_PATH = "..\\help\\";
#if W32
public static string IMAGE_PATH = "..\\images\\";
#else
public static string IMAGE_PATH = "/usr/share/doc/packages/CASA/images/";
public static string IMAGE_PATH = "@LIBEXEC_INSTALL_DIR@/images/";
#endif
///##############################################################
/// ARG CONSTANTS
///
public const string ARG_NO_TRAY_ICON = "-notray";
public const string ARG_DEBUG = "-debug";
public const string ARG_MINIMIZE_ON_START = "-min";
public const string ARG_HELP = "-help";
public static bool bArgShowTrayIcon = true;
public static bool bArgDebug = false;
public const string ARG_DEBUG = "-debug";
public const string ARG_MINIMIZE_ON_START = "-min";
public const string ARG_HELP = "-help";
public static bool bArgShowTrayIcon = true;
public static bool bArgDebug = false;
public static bool bArgStartMinimized = false;
// config settings
@ -162,7 +162,7 @@ public class Common
public static string CASAICONS = "../images/CASAicons.ico";
#endif
#if LINUX
public static string CASAICONS = "/usr/share/doc/packages/CASA/images/CASAicons.ico";
public static string CASAICONS = "@LIBEXEC_INSTALL_DIR@/images/CASAicons.ico";
#endif
///##############################################################
@ -217,7 +217,7 @@ public class Common
if ( (128 == platform) || (4 == platform) )
{
IS_LINUX = true;
GladeFile = "/usr/share/doc/packages/CASA/images/casa.glade";
GladeFile = "@LIBEXEC_INSTALL_DIR@/images/casa.glade";
if( !File.Exists(GladeFile) )
{
@ -335,40 +335,40 @@ public class Common
return true;
else
return false;
}
public static void ParseArgs(string[] args)
{
foreach (string arg in args)
{
switch (arg)
{
case Common.ARG_NO_TRAY_ICON:
bArgShowTrayIcon = false;
break;
case Common.ARG_DEBUG:
bArgDebug = true;
break;
case Common.ARG_MINIMIZE_ON_START:
bArgStartMinimized = true;
break;
case Common.ARG_HELP:
Console.WriteLine("Usage options");
Console.WriteLine(Common.ARG_NO_TRAY_ICON + " do not show tray icon");
Console.WriteLine(Common.ARG_MINIMIZE_ON_START + " start minimized");
Console.WriteLine(Common.ARG_HELP + " show help options");
Application.Quit();
break;
//default:
Console.WriteLine("Unsupported argument {0}", arg);
}
}
}
public static void ParseArgs(string[] args)
{
foreach (string arg in args)
{
switch (arg)
{
case Common.ARG_NO_TRAY_ICON:
bArgShowTrayIcon = false;
break;
case Common.ARG_DEBUG:
bArgDebug = true;
break;
case Common.ARG_MINIMIZE_ON_START:
bArgStartMinimized = true;
break;
case Common.ARG_HELP:
Console.WriteLine("Usage options");
Console.WriteLine(Common.ARG_NO_TRAY_ICON + " do not show tray icon");
Console.WriteLine(Common.ARG_MINIMIZE_ON_START + " start minimized");
Console.WriteLine(Common.ARG_HELP + " show help options");
Application.Quit();
break;
//default:
Console.WriteLine("Unsupported argument {0}", arg);
}
}
}
private static string GetLocale()
@ -466,14 +466,14 @@ public class Common
}
internal static string GetUserName()
{
if (Common.IS_LINUX)
{
return Environment.GetEnvironmentVariable("USER");
}
else
{
return Environment.GetEnvironmentVariable("USERNAME");
{
if (Common.IS_LINUX)
{
return Environment.GetEnvironmentVariable("USER");
}
else
{
return Environment.GetEnvironmentVariable("USERNAME");
}
}

View File

@ -20,7 +20,7 @@
*
***********************************************************************/
using System;
using System;
using System.Threading;
using Gtk;
@ -41,9 +41,9 @@ namespace Novell.CASA.GUI
public class CommonGUI
{
public static string HINT_DIR = "Export Directory";
public static string HINT_DIR = "Export Directory";
public static string HINT_FILENAME = "Export Filename";
public static string REMEMBER_SETTING = "Remember_Master_Password_Time";
public static string REMEMBER_SETTING = "Remember_Master_Password_Time";
private static string CASA_REG_KEY = "SOFTWARE\\Novell\\CASA";
[Glade.Widget]
@ -90,20 +90,20 @@ namespace Novell.CASA.GUI
gxmlTemp.Autoconnect (this);
dialogLogin.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
if (CommonGUI.UseMasterPassword())
{
dialogLogin.Title = "CASA - Master Password";
label85.Markup = "<b>Master Password Authentication</b>";
label86.Text = "Enter your Master Password to unlock your secrets.";
label87.Text = "Master Password:";
}
else
{
dialogLogin.Title = "CASA - Desktop Password";
label85.Markup = "<b>Password Authentication</b>";
label86.Text = "Enter your Desktop Password to unlock your secrets.";
label87.Text = "Desktop Password:";
dialogLogin.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
if (CommonGUI.UseMasterPassword())
{
dialogLogin.Title = "CASA - Master Password";
label85.Markup = "<b>Master Password Authentication</b>";
label86.Text = "Enter your Master Password to unlock your secrets.";
label87.Text = "Master Password:";
}
else
{
dialogLogin.Title = "CASA - Desktop Password";
label85.Markup = "<b>Password Authentication</b>";
label86.Text = "Enter your Desktop Password to unlock your secrets.";
label87.Text = "Desktop Password:";
}
entryMasterPassword3.Text="";
@ -167,64 +167,64 @@ namespace Novell.CASA.GUI
}
public void okbuttonLogin_clicked(object abj, EventArgs args)
{
if (CommonGUI.UseMasterPassword())
{
if (0 == miCASA.SetMasterPassword(0, entryMasterPassword3.Text))
{
// unlock it
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text);
m_bPasswordVerified = true;
dialogLogin.Destroy();
//signal now
m_bIsVerifing = false;
}
else
{
// prompt user
MessageDialog md = new MessageDialog(
mainWindow, Gtk.DialogFlags.Modal,
Gtk.MessageType.Warning,
Gtk.ButtonsType.Ok,
"Master Password entered is incorrect");
md.Response += new ResponseHandler(md_Response2);
md.SetPosition(Gtk.WindowPosition.CenterOnParent);
md.Modal = true;
md.SetIconFromFile(Common.CASAICONS);
md.Show();
}
}
else
{
if (Novell.CASA.miCASA.ValidateDesktopPwd(entryMasterPassword3.Text))
{
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text);
m_bPasswordVerified = true;
dialogLogin.Destroy();
//signal now
m_bIsVerifing = false;
}
else
{
// prompt user
MessageDialog md = new MessageDialog(
mainWindow, Gtk.DialogFlags.Modal,
Gtk.MessageType.Warning,
Gtk.ButtonsType.Ok,
"Password entered is incorrect");
md.Response += new ResponseHandler(md_Response2);
md.SetPosition(Gtk.WindowPosition.CenterOnParent);
md.Modal = true;
md.SetIconFromFile(Common.CASAICONS);
md.Show();
}
{
if (CommonGUI.UseMasterPassword())
{
if (0 == miCASA.SetMasterPassword(0, entryMasterPassword3.Text))
{
// unlock it
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text);
m_bPasswordVerified = true;
dialogLogin.Destroy();
//signal now
m_bIsVerifing = false;
}
else
{
// prompt user
MessageDialog md = new MessageDialog(
mainWindow, Gtk.DialogFlags.Modal,
Gtk.MessageType.Warning,
Gtk.ButtonsType.Ok,
"Master Password entered is incorrect");
md.Response += new ResponseHandler(md_Response2);
md.SetPosition(Gtk.WindowPosition.CenterOnParent);
md.Modal = true;
md.SetIconFromFile(Common.CASAICONS);
md.Show();
}
}
else
{
if (Novell.CASA.miCASA.ValidateDesktopPwd(entryMasterPassword3.Text))
{
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text);
m_bPasswordVerified = true;
dialogLogin.Destroy();
//signal now
m_bIsVerifing = false;
}
else
{
// prompt user
MessageDialog md = new MessageDialog(
mainWindow, Gtk.DialogFlags.Modal,
Gtk.MessageType.Warning,
Gtk.ButtonsType.Ok,
"Password entered is incorrect");
md.Response += new ResponseHandler(md_Response2);
md.SetPosition(Gtk.WindowPosition.CenterOnParent);
md.Modal = true;
md.SetIconFromFile(Common.CASAICONS);
md.Show();
}
}
}
@ -270,8 +270,8 @@ namespace Novell.CASA.GUI
mTrayInstance.UpdateTrayIcon(true);
else
mTrayInstance.UpdateTrayIcon(false);
}
}
m_bIsVerifing = false;
}
@ -289,52 +289,52 @@ namespace Novell.CASA.GUI
#if GTK2x
public static string FileChooser(FileChooserAction action, String sWindowTitle, String sCurrentFolder, String sHintFileName)
{
FileChooserDialog chooser = new FileChooserDialog (sWindowTitle,
null,
action);
if (sCurrentFolder != null)
chooser.SetCurrentFolder(sCurrentFolder);
if (sHintFileName != null)
chooser.SetFilename(sCurrentFolder+sHintFileName);
// set location
chooser.SetPosition(Gtk.WindowPosition.CenterAlways);
chooser.AddButton (Stock.Cancel, ResponseType.Cancel);
if (action == FileChooserAction.Open)
chooser.AddButton (Stock.Open, ResponseType.Ok);
else
chooser.AddButton(Stock.Save, ResponseType.Ok);
int response = chooser.Run ();
string ret = null;
if ((ResponseType) response == ResponseType.Ok)
{
ret = chooser.Uri;
}
/*
// if the action is SAVE, and the file that is choosen exists, prompt the user for overwrite
if (action == FileChooserAction.Save)
{
string sFilename = ret.Substring(8);
if (System.IO.File.Exists(sFilename))
{
// prompt user for overwrite
}
}
*/
chooser.Destroy();
return ret;
public static string FileChooser(FileChooserAction action, String sWindowTitle, String sCurrentFolder, String sHintFileName)
{
FileChooserDialog chooser = new FileChooserDialog (sWindowTitle,
null,
action);
if (sCurrentFolder != null)
chooser.SetCurrentFolder(sCurrentFolder);
if (sHintFileName != null)
chooser.SetFilename(sCurrentFolder+sHintFileName);
// set location
chooser.SetPosition(Gtk.WindowPosition.CenterAlways);
chooser.AddButton (Stock.Cancel, ResponseType.Cancel);
if (action == FileChooserAction.Open)
chooser.AddButton (Stock.Open, ResponseType.Ok);
else
chooser.AddButton(Stock.Save, ResponseType.Ok);
int response = chooser.Run ();
string ret = null;
if ((ResponseType) response == ResponseType.Ok)
{
ret = chooser.Uri;
}
/*
// if the action is SAVE, and the file that is choosen exists, prompt the user for overwrite
if (action == FileChooserAction.Save)
{
string sFilename = ret.Substring(8);
if (System.IO.File.Exists(sFilename))
{
// prompt user for overwrite
}
}
*/
chooser.Destroy();
return ret;
}
#endif
/// <summary>
@ -346,41 +346,41 @@ namespace Novell.CASA.GUI
private bool m_bIsVerifing = true;
public bool VerifyMasterPasswordWithUser()
{
if (UseMasterPassword())
{
//Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned false");
#if W32
Glade.XML gxmlTemp = new Glade.XML("../images/casa.glade", "dialogLogin", null);
#endif
{
if (UseMasterPassword())
{
//Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned false");
#if W32
Glade.XML gxmlTemp = new Glade.XML("../images/casa.glade", "dialogLogin", null);
#endif
#if LINUX
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLogin", null);
#endif
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain"); ;
label86.Text = "Enter your Master Password to continue.";
entryMasterPassword3.Text = "";
label88.Hide();
entryMasterPassword4.Hide();
//dialogLogin.SetPosition(Gtk.WindowPosition.Center);
dialogLogin.Destroyed += new EventHandler(dialogLogin_Destroyed);
dialogLogin.Modal = true;
dialogLogin.Show();
while (m_bIsVerifing)
{
// Flush pending events to keep the GUI reponsive
while (Gtk.Application.EventsPending())
Gtk.Application.RunIteration();
Thread.Sleep(100);
}
return m_bPasswordVerified;
}
else
{
return true;
#endif
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain"); ;
label86.Text = "Enter your Master Password to continue.";
entryMasterPassword3.Text = "";
label88.Hide();
entryMasterPassword4.Hide();
//dialogLogin.SetPosition(Gtk.WindowPosition.Center);
dialogLogin.Destroyed += new EventHandler(dialogLogin_Destroyed);
dialogLogin.Modal = true;
dialogLogin.Show();
while (m_bIsVerifing)
{
// Flush pending events to keep the GUI reponsive
while (Gtk.Application.EventsPending())
Gtk.Application.RunIteration();
Thread.Sleep(100);
}
return m_bPasswordVerified;
}
else
{
return true;
}
}
@ -405,62 +405,62 @@ namespace Novell.CASA.GUI
{
md.Destroy();
}
}
internal static bool UseMasterPassword()
{
string sSettingValue;
sSettingValue = GetGlobalConfSetting("UseMasterPassword", "false");
if (sSettingValue.Equals("true"))
{
return true;
}
else
{
return false;
}
}
internal static string GetGlobalConfSetting(string sSettingName, string sDefaultValue)
{
string sSettingValue = null;
if (sSettingName != null)
{
sSettingValue = (string)MiCasaRequestReply.Send(MiCasaRequestReply.VERB_GET_GLOBAL_SETTING, null, null, null, sSettingName);
}
if ((sSettingValue == null) && (sDefaultValue != null))
{
sSettingValue = sDefaultValue;
}
return sSettingValue;
}
internal static bool UseMasterPassword()
{
string sSettingValue;
sSettingValue = GetGlobalConfSetting("UseMasterPassword", "false");
if (sSettingValue.Equals("true"))
{
return true;
}
else
{
return false;
}
}
internal static string GetGlobalConfSetting(string sSettingName, string sDefaultValue)
{
string sSettingValue = null;
if (sSettingName != null)
{
sSettingValue = (string)MiCasaRequestReply.Send(MiCasaRequestReply.VERB_GET_GLOBAL_SETTING, null, null, null, sSettingName);
}
if ((sSettingValue == null) && (sDefaultValue != null))
{
sSettingValue = sDefaultValue;
}
return sSettingValue;
}
#if W32
private static bool IsRegKeySet(string sPath, string sValue)
{
Microsoft.Win32.RegistryKey key;
try
{
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(sPath);
string sTemp = (string)key.GetValue(sValue);
key.Close();
if (sTemp.Equals("true"))
{
return true;
}
}
catch (Exception e)
{
}
return false;
#if W32
private static bool IsRegKeySet(string sPath, string sValue)
{
Microsoft.Win32.RegistryKey key;
try
{
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(sPath);
string sTemp = (string)key.GetValue(sValue);
key.Close();
if (sTemp.Equals("true"))
{
return true;
}
}
catch (Exception e)
{
}
return false;
}
public static bool IsGTKSharpInstalled()

View File

@ -1,76 +1,76 @@
using System;
using Novell.CASA.CASAPolicy;
namespace Novell.CASA.GUI
{
/// <summary>
/// Summary description for Config.
/// </summary>
public class Config
{
private UIPol uiPolicy = null;
public Config()
{
if (uiPolicy == null)
{
uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL);
}
// if there is no uiPolicy, create one
if (uiPolicy == null)
{
uiPolicy = new UIPol(false, false, false, "", null);
ICASAPol.SetPolicy(uiPolicy);
}
}
public void SetConfigSetting(string sName, bool bValue)
{
if (bValue)
SetConfigSetting(sName, "1");
else
SetConfigSetting(sName, "0");
}
public void SetConfigSetting(string sName, string sValue)
{
uiPolicy.SetConfigSetting(sName, sValue);
}
public bool GetConfigSetting(string sName, bool bDefaultValue)
{
string sDefault = "0";
if (bDefaultValue)
sDefault = "1";
string sValue = GetConfigSetting(sName, sDefault);
{
if (sValue != null)
{
if (sValue.Equals("1"))
return true;
else
return false;
}
else
return bDefaultValue;
}
}
public string GetConfigSetting(string sName, string sDefaultValue)
{
string sValue = uiPolicy.GetConfigSetting(sName);
if (sValue == null)
return sDefaultValue;
else
return sValue;
}
// used to write current configsettings to disk.
public void WriteConfig()
{
uiPolicy.WriteConfig();
}
}
}
using System;
using Novell.CASA.CASAPolicy;
namespace Novell.CASA.GUI
{
/// <summary>
/// Summary description for Config.
/// </summary>
public class Config
{
private UIPol uiPolicy = null;
public Config()
{
if (uiPolicy == null)
{
uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL);
}
// if there is no uiPolicy, create one
if (uiPolicy == null)
{
uiPolicy = new UIPol(false, false, false, "", null);
ICASAPol.SetPolicy(uiPolicy);
}
}
public void SetConfigSetting(string sName, bool bValue)
{
if (bValue)
SetConfigSetting(sName, "1");
else
SetConfigSetting(sName, "0");
}
public void SetConfigSetting(string sName, string sValue)
{
uiPolicy.SetConfigSetting(sName, sValue);
}
public bool GetConfigSetting(string sName, bool bDefaultValue)
{
string sDefault = "0";
if (bDefaultValue)
sDefault = "1";
string sValue = GetConfigSetting(sName, sDefault);
{
if (sValue != null)
{
if (sValue.Equals("1"))
return true;
else
return false;
}
else
return bDefaultValue;
}
}
public string GetConfigSetting(string sName, string sDefaultValue)
{
string sValue = uiPolicy.GetConfigSetting(sName);
if (sValue == null)
return sDefaultValue;
else
return sValue;
}
// used to write current configsettings to disk.
public void WriteConfig()
{
uiPolicy.WriteConfig();
}
}
}

View File

@ -1,118 +1,118 @@
using System;
using System.Text;
using System.Collections;
using System;
using System.Text;
using System.Collections;
using Gtk;
using Glade;
namespace Novell.CASA.GUI
{
/// <summary>
/// Summary description for CopySecret.
/// </summary>
public class CopySecret
{
#region Glade Widgets
using Glade;
namespace Novell.CASA.GUI
{
/// <summary>
/// Summary description for CopySecret.
/// </summary>
public class CopySecret
{
#region Glade Widgets
[Glade.Widget]
Gtk.Dialog dialogCopySecret;
[Glade.Widget]
Gtk.CheckButton checkbuttonMiCASA,
checkbuttonFPM,
checkbuttonMPM,
checkbuttonKDE,
checkbuttonGNOME;
[Glade.Widget]
Gtk.Entry
entryMiCASA,
entryFPM,
entryMPM,
entryKDE,
entryGNOME;
[Glade.Widget]
Gtk.Label
labelMiCASA,
labelFPM,
labelMPM,
labelKDE,
labelGNOME;
#endregion
private string m_sSecretID = "http://www.novell.com";
private string[] m_saKeys;
private string[] m_saValues;
public CopySecret(string sSrcSecretID, string[] saKeys, string[] saValues)
{
m_sSecretID = sSrcSecretID;
m_saKeys = saKeys;
m_saValues = saValues;
}
public void Show()
{
Gtk.Dialog dialogCopySecret;
[Glade.Widget]
Gtk.CheckButton checkbuttonMiCASA,
checkbuttonFPM,
checkbuttonMPM,
checkbuttonKDE,
checkbuttonGNOME;
[Glade.Widget]
Gtk.Entry
entryMiCASA,
entryFPM,
entryMPM,
entryKDE,
entryGNOME;
[Glade.Widget]
Gtk.Label
labelMiCASA,
labelFPM,
labelMPM,
labelKDE,
labelGNOME;
#endregion
private string m_sSecretID = "http://www.novell.com";
private string[] m_saKeys;
private string[] m_saValues;
public CopySecret(string sSrcSecretID, string[] saKeys, string[] saValues)
{
m_sSecretID = sSrcSecretID;
m_saKeys = saKeys;
m_saValues = saValues;
}
public void Show()
{
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogCopySecret", null);
gxmlTemp.Autoconnect (this);
InitDialog();
dialogCopySecret.Show();
}
private void InitDialog()
{
if (Common.IS_MICASA)
{
checkbuttonMiCASA.Visible = checkbuttonMiCASA.Sensitive = Common.IS_MICASA_AVAILABLE;
checkbuttonMiCASA.Toggled += new EventHandler(checkbuttonMiCASA_Toggled);
labelMiCASA.Visible = entryMiCASA.Visible = Common.IS_MICASA_AVAILABLE;
if (m_sSecretID.StartsWith("http:"))
entryMiCASA.Text = m_sSecretID.Substring(7);
else
entryMiCASA.Text = m_sSecretID;
}
if (Common.IS_FIREFOX)
{
checkbuttonFPM.Visible = checkbuttonFPM.Sensitive = Common.IS_FIREFOX_AVAILABLE;
checkbuttonFPM.Toggled += new EventHandler(checkbuttonFPM_Toggled);
labelFPM.Visible = entryFPM.Visible = Common.IS_FIREFOX_AVAILABLE;
if (!m_sSecretID.StartsWith("http:"))
entryFPM.Text = "http://"+m_sSecretID;
else
entryFPM.Text = m_sSecretID;
}
if (Common.IS_MOZILLA)
{
checkbuttonMPM.Visible = checkbuttonMPM.Sensitive = Common.IS_MOZILLA_AVAILABLE;
checkbuttonMPM.Toggled += new EventHandler(checkbuttonMPM_Toggled);
labelMPM.Visible = entryMPM.Visible = Common.IS_MOZILLA_AVAILABLE;
entryMPM.Text = m_sSecretID;
}
if (Common.IS_KDEWALLET)
{
checkbuttonKDE.Visible = checkbuttonKDE.Sensitive = Common.IS_KDEWALLET_AVAILABLE;
checkbuttonKDE.Toggled += new EventHandler(checkbuttonKDE_Toggled);
labelKDE.Visible = entryKDE.Visible = Common.IS_KDEWALLET_AVAILABLE;
entryKDE.Text = m_sSecretID;
}
if (Common.IS_GNOMEKEYRING)
{
checkbuttonGNOME.Visible = checkbuttonGNOME.Sensitive = Common.IS_GNOMEKEYRING_AVAILABLE;
checkbuttonGNOME.Toggled += new EventHandler(checkbuttonGNOME_Toggled);
labelGNOME.Visible = entryGNOME.Visible = Common.IS_GNOMEKEYRING_AVAILABLE;
entryGNOME.Text = m_sSecretID;
}
}
gxmlTemp.Autoconnect (this);
InitDialog();
dialogCopySecret.Show();
}
private void InitDialog()
{
if (Common.IS_MICASA)
{
checkbuttonMiCASA.Visible = checkbuttonMiCASA.Sensitive = Common.IS_MICASA_AVAILABLE;
checkbuttonMiCASA.Toggled += new EventHandler(checkbuttonMiCASA_Toggled);
labelMiCASA.Visible = entryMiCASA.Visible = Common.IS_MICASA_AVAILABLE;
if (m_sSecretID.StartsWith("http:"))
entryMiCASA.Text = m_sSecretID.Substring(7);
else
entryMiCASA.Text = m_sSecretID;
}
if (Common.IS_FIREFOX)
{
checkbuttonFPM.Visible = checkbuttonFPM.Sensitive = Common.IS_FIREFOX_AVAILABLE;
checkbuttonFPM.Toggled += new EventHandler(checkbuttonFPM_Toggled);
labelFPM.Visible = entryFPM.Visible = Common.IS_FIREFOX_AVAILABLE;
if (!m_sSecretID.StartsWith("http:"))
entryFPM.Text = "http://"+m_sSecretID;
else
entryFPM.Text = m_sSecretID;
}
if (Common.IS_MOZILLA)
{
checkbuttonMPM.Visible = checkbuttonMPM.Sensitive = Common.IS_MOZILLA_AVAILABLE;
checkbuttonMPM.Toggled += new EventHandler(checkbuttonMPM_Toggled);
labelMPM.Visible = entryMPM.Visible = Common.IS_MOZILLA_AVAILABLE;
entryMPM.Text = m_sSecretID;
}
if (Common.IS_KDEWALLET)
{
checkbuttonKDE.Visible = checkbuttonKDE.Sensitive = Common.IS_KDEWALLET_AVAILABLE;
checkbuttonKDE.Toggled += new EventHandler(checkbuttonKDE_Toggled);
labelKDE.Visible = entryKDE.Visible = Common.IS_KDEWALLET_AVAILABLE;
entryKDE.Text = m_sSecretID;
}
if (Common.IS_GNOMEKEYRING)
{
checkbuttonGNOME.Visible = checkbuttonGNOME.Sensitive = Common.IS_GNOMEKEYRING_AVAILABLE;
checkbuttonGNOME.Toggled += new EventHandler(checkbuttonGNOME_Toggled);
labelGNOME.Visible = entryGNOME.Visible = Common.IS_GNOMEKEYRING_AVAILABLE;
entryGNOME.Text = m_sSecretID;
}
}
public void on_buttonCopyCancel_clicked(object obj, EventArgs args)
{
if (dialogCopySecret != null)
@ -175,114 +175,114 @@ namespace Novell.CASA.GUI
dialogCopySecret.Destroy();
}
}
private void checkbuttonMiCASA_Toggled(object sender, EventArgs e)
{
entryMiCASA.Sensitive = checkbuttonMiCASA.Active;
}
private void checkbuttonFPM_Toggled(object sender, EventArgs e)
{
entryFPM.Sensitive = checkbuttonFPM.Active;
}
private void checkbuttonMPM_Toggled(object sender, EventArgs e)
{
entryMPM.Sensitive = checkbuttonMPM.Active;
}
private void checkbuttonKDE_Toggled(object sender, EventArgs e)
{
entryKDE.Sensitive = checkbuttonKDE.Active;
}
private void checkbuttonGNOME_Toggled(object sender, EventArgs e)
{
entryGNOME.Sensitive = checkbuttonGNOME.Active;
}
}
private string DoCopy(string sNewSecretName, int iTargetStore)
{
Logger.DbgLog("GUI:CopySecret.DoCopy() - BEGIN");
TreeModel model;
TreeIter iter;
TreeModel modelSecret;
TreeIter iterSecret, iterKey;
string[] NativeKeys = null,
NativeValues = null;
try
{
NativeKeys = new string[Common.MAX_NATIVE_ELEMENTS];
NativeValues = new string[Common.MAX_NATIVE_ELEMENTS];
NativeKeys[Common.INDEX_NATIVEINFO_FOLDERNAME] = Common.NATIVEINFO_FOLDERNAME;
NativeKeys[Common.INDEX_NATIVEINFO_TYPEID] = Common.NATIVEINFO_TYPEID;
NativeKeys[Common.INDEX_NATIVEINFO_SYNC] = Common.NATIVEINFO_SYNC;
NativeKeys[Common.INDEX_NATIVEINFO_SYNCTYPE] = Common.NATIVEINFO_SYNCTYPE;
NativeKeys[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = Common.NATIVEINFO_MODIFIEDTIME;
NativeValues[Common.INDEX_NATIVEINFO_FOLDERNAME] = null;
if (iTargetStore == Common.STORE_FIREFOX)
{
NativeValues[Common.INDEX_NATIVEINFO_TYPEID] = "Signon";
}
else if (iTargetStore == Common.STORE_GNOMEKEYRING)
{
NativeValues[Common.INDEX_NATIVEINFO_TYPEID] = "Network Password";
}
else
{
NativeValues[Common.INDEX_NATIVEINFO_TYPEID] = null;
}
NativeValues[Common.INDEX_NATIVEINFO_SYNC] = null;
NativeValues[Common.INDEX_NATIVEINFO_SYNCTYPE] = null;
NativeValues[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = null;
TreeStore tsTargetSecret;
TreeView tvTargetSecret = new TreeView();
if (iTargetStore == Common.STORE_FIREFOX)
{
ArrayList arrIsPassword = new ArrayList();
for (int i=0; i<m_saKeys.Length; i++)
{
if (m_saKeys[i].ToLower().IndexOf("pass") > -1)
arrIsPassword.Add(true);
else
arrIsPassword.Add(false);
}
bool[] IsPassword = (bool[])arrIsPassword.ToArray(typeof(bool));
tsTargetSecret = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[]), typeof(bool[]));
iterSecret = tsTargetSecret.AppendValues(sNewSecretName, m_saKeys, m_saValues, DataEngines.AD.GetDefaultProfileName(Common.STORE_FIREFOX), NativeKeys, NativeValues, IsPassword);
}
else
{
tsTargetSecret = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[]));
iterSecret = tsTargetSecret.AppendValues(sNewSecretName, m_saKeys, m_saValues, "Default", NativeKeys, NativeValues);
}
modelSecret = tvTargetSecret.Model = tsTargetSecret;
if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(iTargetStore, Common.OPERATION_ADD_SECRET, "", "", ref modelSecret, ref iterSecret) )
{
return Common.saStoreNameList[iTargetStore] + " Success";
}
else
{
return Common.saStoreNameList[iTargetStore] + " Failed";
}
}
catch (Exception e)
{
return (Common.saStoreNameList[iTargetStore] + " : " + e.ToString());
}
}
}
}
private void checkbuttonMiCASA_Toggled(object sender, EventArgs e)
{
entryMiCASA.Sensitive = checkbuttonMiCASA.Active;
}
private void checkbuttonFPM_Toggled(object sender, EventArgs e)
{
entryFPM.Sensitive = checkbuttonFPM.Active;
}
private void checkbuttonMPM_Toggled(object sender, EventArgs e)
{
entryMPM.Sensitive = checkbuttonMPM.Active;
}
private void checkbuttonKDE_Toggled(object sender, EventArgs e)
{
entryKDE.Sensitive = checkbuttonKDE.Active;
}
private void checkbuttonGNOME_Toggled(object sender, EventArgs e)
{
entryGNOME.Sensitive = checkbuttonGNOME.Active;
}
private string DoCopy(string sNewSecretName, int iTargetStore)
{
Logger.DbgLog("GUI:CopySecret.DoCopy() - BEGIN");
TreeModel model;
TreeIter iter;
TreeModel modelSecret;
TreeIter iterSecret, iterKey;
string[] NativeKeys = null,
NativeValues = null;
try
{
NativeKeys = new string[Common.MAX_NATIVE_ELEMENTS];
NativeValues = new string[Common.MAX_NATIVE_ELEMENTS];
NativeKeys[Common.INDEX_NATIVEINFO_FOLDERNAME] = Common.NATIVEINFO_FOLDERNAME;
NativeKeys[Common.INDEX_NATIVEINFO_TYPEID] = Common.NATIVEINFO_TYPEID;
NativeKeys[Common.INDEX_NATIVEINFO_SYNC] = Common.NATIVEINFO_SYNC;
NativeKeys[Common.INDEX_NATIVEINFO_SYNCTYPE] = Common.NATIVEINFO_SYNCTYPE;
NativeKeys[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = Common.NATIVEINFO_MODIFIEDTIME;
NativeValues[Common.INDEX_NATIVEINFO_FOLDERNAME] = null;
if (iTargetStore == Common.STORE_FIREFOX)
{
NativeValues[Common.INDEX_NATIVEINFO_TYPEID] = "Signon";
}
else if (iTargetStore == Common.STORE_GNOMEKEYRING)
{
NativeValues[Common.INDEX_NATIVEINFO_TYPEID] = "Network Password";
}
else
{
NativeValues[Common.INDEX_NATIVEINFO_TYPEID] = null;
}
NativeValues[Common.INDEX_NATIVEINFO_SYNC] = null;
NativeValues[Common.INDEX_NATIVEINFO_SYNCTYPE] = null;
NativeValues[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = null;
TreeStore tsTargetSecret;
TreeView tvTargetSecret = new TreeView();
if (iTargetStore == Common.STORE_FIREFOX)
{
ArrayList arrIsPassword = new ArrayList();
for (int i=0; i<m_saKeys.Length; i++)
{
if (m_saKeys[i].ToLower().IndexOf("pass") > -1)
arrIsPassword.Add(true);
else
arrIsPassword.Add(false);
}
bool[] IsPassword = (bool[])arrIsPassword.ToArray(typeof(bool));
tsTargetSecret = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[]), typeof(bool[]));
iterSecret = tsTargetSecret.AppendValues(sNewSecretName, m_saKeys, m_saValues, DataEngines.AD.GetDefaultProfileName(Common.STORE_FIREFOX), NativeKeys, NativeValues, IsPassword);
}
else
{
tsTargetSecret = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[]));
iterSecret = tsTargetSecret.AppendValues(sNewSecretName, m_saKeys, m_saValues, "Default", NativeKeys, NativeValues);
}
modelSecret = tvTargetSecret.Model = tsTargetSecret;
if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(iTargetStore, Common.OPERATION_ADD_SECRET, "", "", ref modelSecret, ref iterSecret) )
{
return Common.saStoreNameList[iTargetStore] + " Success";
}
else
{
return Common.saStoreNameList[iTargetStore] + " Failed";
}
}
catch (Exception e)
{
return (Common.saStoreNameList[iTargetStore] + " : " + e.ToString());
}
}
}
}

View File

@ -1,78 +1,78 @@
using System;
namespace Novell.CASA.GUI
{
/// <summary>
/// Summary description for DbgFileChooser.
/// </summary>
public class DbgFileChooser
{
#region widgets
using System;
namespace Novell.CASA.GUI
{
/// <summary>
/// Summary description for DbgFileChooser.
/// </summary>
public class DbgFileChooser
{
#region widgets
[Glade.Widget]
Gtk.Dialog dialogDebugFileChooser;
[Glade.Widget]
Gtk.Entry entrySaveFile,
entryOpenFile,
entryChooseDirectory;
#endregion
public DbgFileChooser()
{
}
public void Run()
{
Gtk.Dialog dialogDebugFileChooser;
[Glade.Widget]
Gtk.Entry entrySaveFile,
entryOpenFile,
entryChooseDirectory;
#endregion
public DbgFileChooser()
{
}
public void Run()
{
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogDebugFileChooser", null);
gxmlTemp.Autoconnect (this);
//dialogDebugFileChooser.TransientFor = windowMain;
}
public void on_buttonSaveFile_clicked(object obj, EventArgs args)
{
FileChooser fc = new FileChooser(FileChooser.ACTION_SAVE);
string sFile = fc.GetFile(null, null, "*.casa");
if (sFile != null)
{
entrySaveFile.Text = sFile;
}
else
{
entrySaveFile.Text = "Null";
}
}
public void on_buttonOpenFile_clicked(object obj, EventArgs args)
{
FileChooser fc = new FileChooser(FileChooser.ACTION_OPEN);
string sFile = fc.GetFile(null, null, "*.casa");
if (sFile != null)
{
entryOpenFile.Text = sFile;
}
else
{
entryOpenFile.Text = "Null";
}
}
public void on_buttonChooseDirectory_clicked(object obj, EventArgs args)
{
FileChooser fc = new FileChooser(FileChooser.ACTION_CHOOSE_DIR);
string sFile = fc.GetFile(null, null, "*.casa");
if (sFile != null)
{
entryChooseDirectory.Text = sFile;
}
else
{
entryChooseDirectory.Text = "Null";
}
}
}
}
//dialogDebugFileChooser.TransientFor = windowMain;
}
public void on_buttonSaveFile_clicked(object obj, EventArgs args)
{
FileChooser fc = new FileChooser(FileChooser.ACTION_SAVE);
string sFile = fc.GetFile(null, null, "*.casa");
if (sFile != null)
{
entrySaveFile.Text = sFile;
}
else
{
entrySaveFile.Text = "Null";
}
}
public void on_buttonOpenFile_clicked(object obj, EventArgs args)
{
FileChooser fc = new FileChooser(FileChooser.ACTION_OPEN);
string sFile = fc.GetFile(null, null, "*.casa");
if (sFile != null)
{
entryOpenFile.Text = sFile;
}
else
{
entryOpenFile.Text = "Null";
}
}
public void on_buttonChooseDirectory_clicked(object obj, EventArgs args)
{
FileChooser fc = new FileChooser(FileChooser.ACTION_CHOOSE_DIR);
string sFile = fc.GetFile(null, null, "*.casa");
if (sFile != null)
{
entryChooseDirectory.Text = sFile;
}
else
{
entryChooseDirectory.Text = "Null";
}
}
}
}

View File

@ -1,22 +1,22 @@
using System;
using System.IO;
using System;
using System.IO;
using Novell.CASA.MiCasa.Communication;
using Novell.CASA.MiCasa.Common;
using Novell.CASA.MiCasa.Common;
using Gtk;
using Glade;
namespace Novell.CASA.GUI
{
/// <summary>
/// Summary description for ExportSecrets.
/// </summary>
public class ExportSecrets
{
private Config m_config = null;
using Glade;
namespace Novell.CASA.GUI
{
/// <summary>
/// Summary description for ExportSecrets.
/// </summary>
public class ExportSecrets
{
private Config m_config = null;
[Glade.Widget]
Gtk.Label labelExportDialogDesc1,
labelExportDialogDesc2,
@ -28,22 +28,22 @@ namespace Novell.CASA.GUI
Gtk.Entry entryMasterPassword;
[Glade.Widget]
Gtk.Dialog dialogExport;
[Glade.Widget]
Gtk.CheckButton checkbuttonNoEncrypt;
[Glade.Widget]
Gtk.Button buttonNewFolder;
public ExportSecrets(Config config)
{
m_config = config;
}
public void Run()
{
// prompt for master password, and optional passphrase to encrypt
Gtk.Dialog dialogExport;
[Glade.Widget]
Gtk.CheckButton checkbuttonNoEncrypt;
[Glade.Widget]
Gtk.Button buttonNewFolder;
public ExportSecrets(Config config)
{
m_config = config;
}
public void Run()
{
// prompt for master password, and optional passphrase to encrypt
//Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned false");
#if W32
Glade.XML gxmlTemp = new Glade.XML ("../images/casa.glade", "dialogExport", null);
@ -52,46 +52,46 @@ namespace Novell.CASA.GUI
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogExport", null);
#endif
gxmlTemp.Autoconnect (this);
if (CommonGUI.UseMasterPassword())
{
labelExportDialogDesc1.Visible = true;
}
else
{
labelExportDialogDesc2.Visible = true;
labelExportDialogPrompt.Text = "Encryption string:";
gxmlTemp.Autoconnect (this);
if (CommonGUI.UseMasterPassword())
{
labelExportDialogDesc1.Visible = true;
}
else
{
labelExportDialogDesc2.Visible = true;
labelExportDialogPrompt.Text = "Encryption string:";
}
dialogExport.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
dialogExport.Destroyed += new EventHandler(dialogExport_Destroyed);
dialogExport.Modal = true;
dialogExport.Show();
}
dialogExport.Modal = true;
dialogExport.Show();
}
private void dialogExport_Destroyed(object sender, EventArgs e)
{
}
private void on_buttonHelpExportSecrets_clicked(object sender, EventArgs args)
{
Common.ShowHelpUrl("ExportingSecrets.htm");
}
private void on_buttonCloseExportSecrets_clicked(object sender, EventArgs args)
{
}
private void on_buttonHelpExportSecrets_clicked(object sender, EventArgs args)
{
Common.ShowHelpUrl("ExportingSecrets.htm");
}
private void on_buttonCloseExportSecrets_clicked(object sender, EventArgs args)
{
if (dialogExport != null)
{
dialogExport.Destroy();
}
}
private void on_buttonOkExportSecrets_clicked(object sender, EventArgs args)
{
bool bUseMasterPassword = CommonGUI.UseMasterPassword();
}
}
private void on_buttonOkExportSecrets_clicked(object sender, EventArgs args)
{
bool bUseMasterPassword = CommonGUI.UseMasterPassword();
if ( ((bUseMasterPassword) && (0 == miCASA.SetMasterPassword(0, entryMasterPassword.Text) ))
|| (!bUseMasterPassword))
{
@ -99,11 +99,11 @@ namespace Novell.CASA.GUI
string sEncryptString = entryMasterPassword.Text;
if (checkbuttonNoEncrypt.Active)
sEncryptString = null;
if (entryMasterPassword.Text.Length < 1)
{
sEncryptString = null;
sEncryptString = null;
if (entryMasterPassword.Text.Length < 1)
{
sEncryptString = null;
}
if (dialogExport != null)
@ -150,27 +150,27 @@ namespace Novell.CASA.GUI
m_config.WriteConfig();
// call our daemon to get the users secrets
ExportXMLSecrets exportSecrets = new ExportXMLSecrets(sMasterPWD, sEncryptString, null);
byte[] baSecrets = (byte[])Novell.CASA.MiCasa.Communication.MiCasaRequestReply.Send(MiCasaRequestReply.VERB_EXPORT_SECRETS, null, null, null, exportSecrets);
if (baSecrets != null)
{
try
{
FileStream fs = new FileStream(sFileName, FileMode.Create);
fs.Write(baSecrets, 0, baSecrets.Length);
fs.Flush();
fs.Close();
CommonGUI.DisplayMessage(MessageType.Info, "Secrets saved to: \r\n" + sFileName);
}
catch
{
CommonGUI.DisplayMessage(MessageType.Error, "Failed to save secrets");
}
}
else
{
CommonGUI.DisplayMessage(MessageType.Error, "No Secrets found");
ExportXMLSecrets exportSecrets = new ExportXMLSecrets(sMasterPWD, sEncryptString, null);
byte[] baSecrets = (byte[])Novell.CASA.MiCasa.Communication.MiCasaRequestReply.Send(MiCasaRequestReply.VERB_EXPORT_SECRETS, null, null, null, exportSecrets);
if (baSecrets != null)
{
try
{
FileStream fs = new FileStream(sFileName, FileMode.Create);
fs.Write(baSecrets, 0, baSecrets.Length);
fs.Flush();
fs.Close();
CommonGUI.DisplayMessage(MessageType.Info, "Secrets saved to: \r\n" + sFileName);
}
catch
{
CommonGUI.DisplayMessage(MessageType.Error, "Failed to save secrets");
}
}
else
{
CommonGUI.DisplayMessage(MessageType.Error, "No Secrets found");
}
}
}
@ -186,26 +186,26 @@ namespace Novell.CASA.GUI
md.SetPosition(Gtk.WindowPosition.CenterOnParent);
md.Modal = true;
md.Show();
}
}
private string GetStorageFileName(string sHintDir, string sHintFile)
{
FileChooser fc = new FileChooser(FileChooser.ACTION_SAVE);
String sFileName = fc.GetFile(sHintDir, sHintFile, "*.casa");
/*
#if W32
String sFileName = CommonGUI.FileChooser(FileChooserAction.Save, "Select filename and location for secrets", sHintDir, sHintFile);
#else
String sFileName = null;
CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Not implemented");
#endif
*/
return sFileName;
}
}
}
private string GetStorageFileName(string sHintDir, string sHintFile)
{
FileChooser fc = new FileChooser(FileChooser.ACTION_SAVE);
String sFileName = fc.GetFile(sHintDir, sHintFile, "*.casa");
/*
#if W32
String sFileName = CommonGUI.FileChooser(FileChooserAction.Save, "Select filename and location for secrets", sHintDir, sHintFile);
#else
String sFileName = null;
CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Not implemented");
#endif
*/
return sFileName;
}
private void md_Response2(object o, ResponseArgs args)
{
MessageDialog md = (MessageDialog)o;
@ -213,6 +213,6 @@ namespace Novell.CASA.GUI
{
md.Destroy();
}
}
}
}
}
}
}

View File

@ -1,412 +1,412 @@
using System;
using System.Text;
using Gtk;
using Glade;
namespace Novell.CASA.GUI
{
class FindAndReplace
{
#region Glade Widgets
[Glade.Widget]
Gtk.TreeView tvResults;
[Glade.Widget]
Gtk.Dialog dialogFindAndReplace,
dialogLogin;
[Glade.Widget]
Gtk.Button bttnFind,
bttnReplaceAll,
bttnApply,
bttnCancel,
bttnRevert,
bttnOk,
bttnHelp;
[Glade.Widget]
Gtk.Entry entryFind,
entryNewValue,
entryMasterPassword3,
entryMasterPassword4;
[Glade.Widget]
Gtk.CheckButton cbShowValues;
[Glade.Widget]
Gtk.Label label86,
label88,
labelRememberFor,
labelSeconds;
[Glade.Widget]
Gtk.SpinButton spinbuttonRememberFor;
#endregion
private TreeModel m_tmCASA;
private TreeStore m_tsCASA;
private TreeStore tsResults;
private Store m_store;
private int m_iRememberSeconds = 5;
public FindAndReplace(Store store, TreeModel tmCASA, TreeStore tsCASA)
{
m_store = store;
m_tmCASA = tmCASA;
m_tsCASA = tsCASA;
}
public void ShowDialog()
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogFindAndReplace", null);
gxmlTemp.Autoconnect(this);
dialogFindAndReplace.SetPosition(WindowPosition.CenterOnParent);
tvResults.AppendColumn("SecretID", new Gtk.CellRendererText(), "text", 0);
tvResults.AppendColumn("Key", new Gtk.CellRendererText(), "text", 1);
tvResults.AppendColumn("Value", new Gtk.CellRendererText(), "text", 2);
tvResults.Selection.Mode = SelectionMode.Multiple;
// 0:secretID, 1:Key, 2:Value****, 3:ValueClear, 4:dirtyBit
tsResults = new TreeStore(typeof(string), typeof(string), typeof(string), typeof(string), typeof(bool));
tvResults.Model = tsResults;
// hook up event handles
bttnApply.Clicked += new EventHandler(bttnApply_Clicked);
bttnCancel.Clicked += new EventHandler(bttnCancel_Clicked);
bttnRevert.Clicked += new EventHandler(bttnRevert_Clicked);
bttnFind.Clicked += new EventHandler(bttnFind_Clicked);
bttnOk.Clicked += new EventHandler(bttnOk_Clicked);
bttnReplaceAll.Clicked += new EventHandler(bttnReplaceAll_Clicked);
bttnHelp.Clicked += new EventHandler(bttnHelp_Clicked);
cbShowValues.Toggled += new EventHandler(cbShowValues_Toggled);
}
void bttnHelp_Clicked(object sender, EventArgs e)
{
Common.ShowHelpUrl("FindReplace.htm");
}
public void okbuttonLogin_clicked(object abj, EventArgs args)
{
TreeViewColumn tvCol;
if (0 == miCASA.SetMasterPassword(0, entryMasterPassword3.Text))
{
tvResults.RemoveColumn(tvResults.GetColumn(2));
tvCol = new TreeViewColumn("Value", new CellRendererText(), "text", 3);
tvResults.InsertColumn(tvCol, 2);
// get seconds to remember
//m_sRememberFor = spinbuttonRememberFor.Text;
//if (m_sRememberFor != null)
//{
// DateTime dtNow = DateTime.Now;
// m_iRememberSeconds = int.Parse(m_sRememberFor);
// CommonGUI.SetRememberMPUntil(dtNow.AddSeconds(m_iRememberSeconds));
//}
// save off remember time if user changed it
//string sSaveTimed = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, "5");
//if (!sSaveTimed.Equals(m_sRememberFor))
// {
// m_config.SetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
// m_config.WriteConfig();
//}
dialogLogin.Destroy();
//if (m_iRememberSeconds > 0)
// StartRememberTimer();
}
else
{
// warn user
CommonGUI.DisplayMessage(MessageType.Warning, "Master Password incorrect");
}
}
public void on_entryMasterPassword3_activate(object obj, EventArgs args)
{
if ("" != entryMasterPassword3.Text)
okbuttonLogin_clicked(obj, args);
}
public void on_entryMasterPassword4_activate(object obj, EventArgs args)
{
okbuttonLogin_clicked(obj, args);
using System;
using System.Text;
using Gtk;
using Glade;
namespace Novell.CASA.GUI
{
class FindAndReplace
{
#region Glade Widgets
[Glade.Widget]
Gtk.TreeView tvResults;
[Glade.Widget]
Gtk.Dialog dialogFindAndReplace,
dialogLogin;
[Glade.Widget]
Gtk.Button bttnFind,
bttnReplaceAll,
bttnApply,
bttnCancel,
bttnRevert,
bttnOk,
bttnHelp;
[Glade.Widget]
Gtk.Entry entryFind,
entryNewValue,
entryMasterPassword3,
entryMasterPassword4;
[Glade.Widget]
Gtk.CheckButton cbShowValues;
[Glade.Widget]
Gtk.Label label86,
label88,
labelRememberFor,
labelSeconds;
[Glade.Widget]
Gtk.SpinButton spinbuttonRememberFor;
#endregion
private TreeModel m_tmCASA;
private TreeStore m_tsCASA;
private TreeStore tsResults;
private Store m_store;
private int m_iRememberSeconds = 5;
public FindAndReplace(Store store, TreeModel tmCASA, TreeStore tsCASA)
{
m_store = store;
m_tmCASA = tmCASA;
m_tsCASA = tsCASA;
}
public void on_helpbuttonAuthentication_clicked(object obj, EventArgs args)
{
Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm");
public void ShowDialog()
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogFindAndReplace", null);
gxmlTemp.Autoconnect(this);
dialogFindAndReplace.SetPosition(WindowPosition.CenterOnParent);
tvResults.AppendColumn("SecretID", new Gtk.CellRendererText(), "text", 0);
tvResults.AppendColumn("Key", new Gtk.CellRendererText(), "text", 1);
tvResults.AppendColumn("Value", new Gtk.CellRendererText(), "text", 2);
tvResults.Selection.Mode = SelectionMode.Multiple;
// 0:secretID, 1:Key, 2:Value****, 3:ValueClear, 4:dirtyBit
tsResults = new TreeStore(typeof(string), typeof(string), typeof(string), typeof(string), typeof(bool));
tvResults.Model = tsResults;
// hook up event handles
bttnApply.Clicked += new EventHandler(bttnApply_Clicked);
bttnCancel.Clicked += new EventHandler(bttnCancel_Clicked);
bttnRevert.Clicked += new EventHandler(bttnRevert_Clicked);
bttnFind.Clicked += new EventHandler(bttnFind_Clicked);
bttnOk.Clicked += new EventHandler(bttnOk_Clicked);
bttnReplaceAll.Clicked += new EventHandler(bttnReplaceAll_Clicked);
bttnHelp.Clicked += new EventHandler(bttnHelp_Clicked);
cbShowValues.Toggled += new EventHandler(cbShowValues_Toggled);
}
void cbShowValues_Toggled(object sender, EventArgs e)
{
TreeViewColumn tvCol;
if ((true == cbShowValues.Active)
&& (CommonGUI.GetRememberMPUntil().CompareTo(DateTime.Now) > 0))
{
// set and start the timer if needed
TimeSpan ts = CommonGUI.GetRememberMPUntil().Subtract(DateTime.Now);
m_iRememberSeconds = ts.Seconds;
//StartRememberTimer();
// display the values
tvResults.RemoveColumn(tvResults.GetColumn(2));
tvCol = new TreeViewColumn("Value", new CellRendererText(), "text", 3);
tvResults.InsertColumn(tvCol, 2);
}
else if (true == cbShowValues.Active)
{
// prompt user for MasterPassword
if (CommonGUI.UseMasterPassword())
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null);
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = dialogFindAndReplace;
label86.Text = "Enter your Master Password to view values";
entryMasterPassword3.Text = "";
entryMasterPassword3.HasFocus = true;
label88.Hide();
entryMasterPassword4.Hide();
labelRememberFor.Visible = false;
labelSeconds.Visible = false;
spinbuttonRememberFor.Visible = false;
//spinbuttonRememberFor.Text = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
//dialogLogin.Show();
}
else
{
// display the values
tvResults.RemoveColumn(tvResults.GetColumn(2));
tvCol = new TreeViewColumn("Value", new CellRendererText(), "text", 3);
tvResults.InsertColumn(tvCol, 2);
}
}
else
{
tvResults.RemoveColumn(tvResults.GetColumn(2));
tvCol = new TreeViewColumn("Value", new CellRendererText(), "text", 2);
tvResults.InsertColumn(tvCol, 2);
}
}
public void closebuttonLogin_clicked(object abj, EventArgs args)
{
cbShowValues.Active = false;
dialogLogin.Destroy();
}
public void OnDialogLoginDeleted(object obj, DeleteEventArgs args)
{
cbShowValues.Active = false;
dialogLogin.Destroy();
args.RetVal = true;
}
void bttnOk_Clicked(object sender, EventArgs e)
{
if (bttnApply.Sensitive)
{
bttnApply_Clicked(sender, e);
}
CloseDialog();
}
void bttnFind_Clicked(object sender, EventArgs e)
{
if (entryFind.Text != null && entryFind.Text.Length > 0)
{
DoFind();
}
else
{
CommonGUI.DisplayMessage(MessageType.Error, "You must enter a value to find");
}
}
void bttnRevert_Clicked(object sender, EventArgs e)
{
// show cancel
bttnCancel.Visible = true;
// hide revert
bttnRevert.Visible = false;
bttnApply.Sensitive = bttnOk.Sensitive = false;
// reload
DoFind();
}
void bttnCancel_Clicked(object sender, EventArgs e)
{
CloseDialog();
}
void bttnApply_Clicked(object sender, EventArgs e)
{
TreeIter iter;
// iterate thru store, update all values with dirtybit=true
if (tsResults.GetIterFirst(out iter))
{
do
{
bool bDirty = (bool)tsResults.GetValue(iter, 4);
if (bDirty)
{
String sID = (string)tsResults.GetValue(iter, 0);
String sKey = (string)tsResults.GetValue(iter, 1);
String sValue = (string)tsResults.GetValue(iter, 3);
if (StoreDataInterface.ModifyCASASecretKey(sID, sKey, sValue))
{
Console.WriteLine("Updating {0} : {1} : {2}", sID, sKey, sValue);
}
// Update CASAManager view
m_store.AggregateStore();
}
} while (tsResults.IterNext(ref iter));
}
// hide revert
bttnRevert.Visible = false;
bttnCancel.Visible = true;
bttnApply.Sensitive = false;
bttnOk.Sensitive = false;
}
private void CloseDialog()
{
if (dialogFindAndReplace != null)
{
dialogFindAndReplace.Destroy();
}
}
private void DoFind()
{
string selected = null;
string[] keys = null,
values = null;
// clear current vies
tsResults.Clear();
// iterate thru CASA TreeStore, finding matches
TreeIter iter;
if (m_tsCASA.GetIterFirst(out iter))
{
do
{
selected = (string)m_tmCASA.GetValue(iter, 0);
keys = (string[])m_tmCASA.GetValue(iter, 1);
values = (string[])m_tmCASA.GetValue(iter, 2);
// add matches to the results
for (int i = 0; i < keys.Length; i++)
{
if ((entryFind.Text.Equals("*")) ||
(values[i].IndexOf(entryFind.Text) > -1))
{
tsResults.AppendValues(selected, keys[i], "*******", values[i], false);
}
}
} while (m_tsCASA.IterNext(ref iter));
//tvResults.Selection.SelectAll();
}
}
void bttnReplaceAll_Clicked(object sender, EventArgs e)
{
TreeModel model;
TreeIter iter;
TreePath[] treePaths = tvResults.Selection.GetSelectedRows(out model);
if (entryNewValue.Text == null || entryNewValue.Text.Length == 0)
{
CommonGUI.DisplayMessage(MessageType.Warning, "Enter a new value");
return;
}
if (treePaths.Length == 0)
{
CommonGUI.DisplayMessage(MessageType.Warning, "You must select at least one row");
return;
}
if (entryNewValue.Text != null && entryNewValue.Text.Length > 0)
{
// iterate thru those to change
for (int i = 0; i < treePaths.Length; i++)
{
if (tsResults.GetIter(out iter, treePaths[i]))
{
string sCurrentValue = (string)tsResults.GetValue(iter, 3);
// change if newValue is different
if (!sCurrentValue.Equals(entryNewValue.Text))
{
tsResults.SetValue(iter, 2, entryNewValue.Text);
tsResults.SetValue(iter, 3, entryNewValue.Text);
// set the dirty bit
tsResults.SetValue(iter, 4, true);
}
}
}
bttnApply.Sensitive = bttnOk.Sensitive = true;
bttnRevert.Visible = true;
bttnCancel.Visible = false;
}
}
/*
private bool bTimerActive = false;
public void StartRememberTimer()
{
if (!bTimerActive)
{
GLib.Timeout.Add((uint)(m_iRememberSeconds * 1000), new GLib.TimeoutHandler(update_gui));
bTimerActive = true;
}
}
* */
}
}
void bttnHelp_Clicked(object sender, EventArgs e)
{
Common.ShowHelpUrl("FindReplace.htm");
}
public void okbuttonLogin_clicked(object abj, EventArgs args)
{
TreeViewColumn tvCol;
if (0 == miCASA.SetMasterPassword(0, entryMasterPassword3.Text))
{
tvResults.RemoveColumn(tvResults.GetColumn(2));
tvCol = new TreeViewColumn("Value", new CellRendererText(), "text", 3);
tvResults.InsertColumn(tvCol, 2);
// get seconds to remember
//m_sRememberFor = spinbuttonRememberFor.Text;
//if (m_sRememberFor != null)
//{
// DateTime dtNow = DateTime.Now;
// m_iRememberSeconds = int.Parse(m_sRememberFor);
// CommonGUI.SetRememberMPUntil(dtNow.AddSeconds(m_iRememberSeconds));
//}
// save off remember time if user changed it
//string sSaveTimed = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, "5");
//if (!sSaveTimed.Equals(m_sRememberFor))
// {
// m_config.SetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
// m_config.WriteConfig();
//}
dialogLogin.Destroy();
//if (m_iRememberSeconds > 0)
// StartRememberTimer();
}
else
{
// warn user
CommonGUI.DisplayMessage(MessageType.Warning, "Master Password incorrect");
}
}
public void on_entryMasterPassword3_activate(object obj, EventArgs args)
{
if ("" != entryMasterPassword3.Text)
okbuttonLogin_clicked(obj, args);
}
public void on_entryMasterPassword4_activate(object obj, EventArgs args)
{
okbuttonLogin_clicked(obj, args);
}
public void on_helpbuttonAuthentication_clicked(object obj, EventArgs args)
{
Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm");
}
void cbShowValues_Toggled(object sender, EventArgs e)
{
TreeViewColumn tvCol;
if ((true == cbShowValues.Active)
&& (CommonGUI.GetRememberMPUntil().CompareTo(DateTime.Now) > 0))
{
// set and start the timer if needed
TimeSpan ts = CommonGUI.GetRememberMPUntil().Subtract(DateTime.Now);
m_iRememberSeconds = ts.Seconds;
//StartRememberTimer();
// display the values
tvResults.RemoveColumn(tvResults.GetColumn(2));
tvCol = new TreeViewColumn("Value", new CellRendererText(), "text", 3);
tvResults.InsertColumn(tvCol, 2);
}
else if (true == cbShowValues.Active)
{
// prompt user for MasterPassword
if (CommonGUI.UseMasterPassword())
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null);
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = dialogFindAndReplace;
label86.Text = "Enter your Master Password to view values";
entryMasterPassword3.Text = "";
entryMasterPassword3.HasFocus = true;
label88.Hide();
entryMasterPassword4.Hide();
labelRememberFor.Visible = false;
labelSeconds.Visible = false;
spinbuttonRememberFor.Visible = false;
//spinbuttonRememberFor.Text = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
//dialogLogin.Show();
}
else
{
// display the values
tvResults.RemoveColumn(tvResults.GetColumn(2));
tvCol = new TreeViewColumn("Value", new CellRendererText(), "text", 3);
tvResults.InsertColumn(tvCol, 2);
}
}
else
{
tvResults.RemoveColumn(tvResults.GetColumn(2));
tvCol = new TreeViewColumn("Value", new CellRendererText(), "text", 2);
tvResults.InsertColumn(tvCol, 2);
}
}
public void closebuttonLogin_clicked(object abj, EventArgs args)
{
cbShowValues.Active = false;
dialogLogin.Destroy();
}
public void OnDialogLoginDeleted(object obj, DeleteEventArgs args)
{
cbShowValues.Active = false;
dialogLogin.Destroy();
args.RetVal = true;
}
void bttnOk_Clicked(object sender, EventArgs e)
{
if (bttnApply.Sensitive)
{
bttnApply_Clicked(sender, e);
}
CloseDialog();
}
void bttnFind_Clicked(object sender, EventArgs e)
{
if (entryFind.Text != null && entryFind.Text.Length > 0)
{
DoFind();
}
else
{
CommonGUI.DisplayMessage(MessageType.Error, "You must enter a value to find");
}
}
void bttnRevert_Clicked(object sender, EventArgs e)
{
// show cancel
bttnCancel.Visible = true;
// hide revert
bttnRevert.Visible = false;
bttnApply.Sensitive = bttnOk.Sensitive = false;
// reload
DoFind();
}
void bttnCancel_Clicked(object sender, EventArgs e)
{
CloseDialog();
}
void bttnApply_Clicked(object sender, EventArgs e)
{
TreeIter iter;
// iterate thru store, update all values with dirtybit=true
if (tsResults.GetIterFirst(out iter))
{
do
{
bool bDirty = (bool)tsResults.GetValue(iter, 4);
if (bDirty)
{
String sID = (string)tsResults.GetValue(iter, 0);
String sKey = (string)tsResults.GetValue(iter, 1);
String sValue = (string)tsResults.GetValue(iter, 3);
if (StoreDataInterface.ModifyCASASecretKey(sID, sKey, sValue))
{
Console.WriteLine("Updating {0} : {1} : {2}", sID, sKey, sValue);
}
// Update CASAManager view
m_store.AggregateStore();
}
} while (tsResults.IterNext(ref iter));
}
// hide revert
bttnRevert.Visible = false;
bttnCancel.Visible = true;
bttnApply.Sensitive = false;
bttnOk.Sensitive = false;
}
private void CloseDialog()
{
if (dialogFindAndReplace != null)
{
dialogFindAndReplace.Destroy();
}
}
private void DoFind()
{
string selected = null;
string[] keys = null,
values = null;
// clear current vies
tsResults.Clear();
// iterate thru CASA TreeStore, finding matches
TreeIter iter;
if (m_tsCASA.GetIterFirst(out iter))
{
do
{
selected = (string)m_tmCASA.GetValue(iter, 0);
keys = (string[])m_tmCASA.GetValue(iter, 1);
values = (string[])m_tmCASA.GetValue(iter, 2);
// add matches to the results
for (int i = 0; i < keys.Length; i++)
{
if ((entryFind.Text.Equals("*")) ||
(values[i].IndexOf(entryFind.Text) > -1))
{
tsResults.AppendValues(selected, keys[i], "*******", values[i], false);
}
}
} while (m_tsCASA.IterNext(ref iter));
//tvResults.Selection.SelectAll();
}
}
void bttnReplaceAll_Clicked(object sender, EventArgs e)
{
TreeModel model;
TreeIter iter;
TreePath[] treePaths = tvResults.Selection.GetSelectedRows(out model);
if (entryNewValue.Text == null || entryNewValue.Text.Length == 0)
{
CommonGUI.DisplayMessage(MessageType.Warning, "Enter a new value");
return;
}
if (treePaths.Length == 0)
{
CommonGUI.DisplayMessage(MessageType.Warning, "You must select at least one row");
return;
}
if (entryNewValue.Text != null && entryNewValue.Text.Length > 0)
{
// iterate thru those to change
for (int i = 0; i < treePaths.Length; i++)
{
if (tsResults.GetIter(out iter, treePaths[i]))
{
string sCurrentValue = (string)tsResults.GetValue(iter, 3);
// change if newValue is different
if (!sCurrentValue.Equals(entryNewValue.Text))
{
tsResults.SetValue(iter, 2, entryNewValue.Text);
tsResults.SetValue(iter, 3, entryNewValue.Text);
// set the dirty bit
tsResults.SetValue(iter, 4, true);
}
}
}
bttnApply.Sensitive = bttnOk.Sensitive = true;
bttnRevert.Visible = true;
bttnCancel.Visible = false;
}
}
/*
private bool bTimerActive = false;
public void StartRememberTimer()
{
if (!bTimerActive)
{
GLib.Timeout.Add((uint)(m_iRememberSeconds * 1000), new GLib.TimeoutHandler(update_gui));
bTimerActive = true;
}
}
* */
}
}

View File

@ -767,30 +767,30 @@ public class Firefox : Store
tvKeyValue.InsertColumn(tvCol, 1);
}
else if (true == cbuttonShowPassword.Active)
{
if (CommonGUI.UseMasterPassword())
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null);
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = dialogManageSecret;
label86.Text = "Enter your Master Password to view passwords";
entryMasterPassword3.Text = "";
entryMasterPassword3.HasFocus = true;
label88.Hide();
entryMasterPassword4.Hide();
labelRememberFor.Visible = true;
labelSeconds.Visible = true;
spinbuttonRememberFor.Visible = true;
spinbuttonRememberFor.Text = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
dialogLogin.Show();
}
else
{
// display the values
tvKeyValue.RemoveColumn(tvKeyValue.GetColumn(1));
tvCol = new TreeViewColumn("Value", cellEditable, "text", 1);
tvKeyValue.InsertColumn(tvCol, 1);
{
if (CommonGUI.UseMasterPassword())
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null);
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = dialogManageSecret;
label86.Text = "Enter your Master Password to view passwords";
entryMasterPassword3.Text = "";
entryMasterPassword3.HasFocus = true;
label88.Hide();
entryMasterPassword4.Hide();
labelRememberFor.Visible = true;
labelSeconds.Visible = true;
spinbuttonRememberFor.Visible = true;
spinbuttonRememberFor.Text = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
dialogLogin.Show();
}
else
{
// display the values
tvKeyValue.RemoveColumn(tvKeyValue.GetColumn(1));
tvCol = new TreeViewColumn("Value", cellEditable, "text", 1);
tvKeyValue.InsertColumn(tvCol, 1);
}
}
else
@ -1220,22 +1220,22 @@ public class Firefox : Store
/// </summary>
public void OnCopyActivated(object obj, EventArgs args)
{
TreeModel model;
TreeModel model;
TreeIter iter;
try
{
if( tvSecretIDFirefox.Selection.GetSelected (out model, out iter) )
try
{
if( tvSecretIDFirefox.Selection.GetSelected (out model, out iter) )
{
string selected = null;
string[] saKeys, saValues;
selected = (string) model.GetValue (iter, 0);
saKeys = (string[]) model.GetValue(iter, 1);
saKeys = (string[]) model.GetValue(iter, 1);
saValues = (string[]) model.GetValue(iter, 2);
CopySecret cs = new CopySecret(selected, saKeys, saValues);
cs.Show();
cs.Show();
}
}
catch

View File

@ -499,31 +499,31 @@ public class GnomeKeyring : Store
tvKeyValue.InsertColumn(tvCol, 1);
}
else if (true == cbuttonShowPassword.Active)
{
if (CommonGUI.UseMasterPassword())
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null);
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = dialogManageSecret;
label86.Text = "Enter your Master Password to view passwords";
entryMasterPassword3.Text = "";
entryMasterPassword3.HasFocus = true;
label88.Hide();
entryMasterPassword4.Hide();
labelRememberFor.Visible = true;
labelSeconds.Visible = true;
spinbuttonRememberFor.Visible = true;
spinbuttonRememberFor.Text = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
dialogLogin.Show();
}
else
{
// display the values
tvKeyValue.RemoveColumn(tvKeyValue.GetColumn(1));
tvCol = new TreeViewColumn("Value", cellEditable, "text", 1);
tvKeyValue.InsertColumn(tvCol, 1);
{
if (CommonGUI.UseMasterPassword())
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null);
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = dialogManageSecret;
label86.Text = "Enter your Master Password to view passwords";
entryMasterPassword3.Text = "";
entryMasterPassword3.HasFocus = true;
label88.Hide();
entryMasterPassword4.Hide();
labelRememberFor.Visible = true;
labelSeconds.Visible = true;
spinbuttonRememberFor.Visible = true;
spinbuttonRememberFor.Text = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
dialogLogin.Show();
}
else
{
// display the values
tvKeyValue.RemoveColumn(tvKeyValue.GetColumn(1));
tvCol = new TreeViewColumn("Value", cellEditable, "text", 1);
tvKeyValue.InsertColumn(tvCol, 1);
}
}
else
@ -943,22 +943,22 @@ public class GnomeKeyring : Store
/// </summary>
public void OnCopyActivated(object obj, EventArgs args)
{
Logger.DbgLog("GUI:GnomeKeyring.OnCopyActivated() - BEGIN");
if( 0 != tvSecretIDGnomeKeyring.Selection.CountSelectedRows() )
{
TreeModel model;
TreeIter iter;
string selected = null;
if( tvSecretIDGnomeKeyring.Selection.GetSelected (out model, out iter) )
{
selected = (string) model.GetValue (iter, 0);
string[] saKeys = (string[]) model.GetValue(iter, 1);
string[] saValues = (string[]) model.GetValue(iter, 2);
CopySecret cs = new CopySecret(selected, saKeys, saValues);
cs.Show();
}
}
Logger.DbgLog("GUI:GnomeKeyring.OnCopyActivated() - BEGIN");
if( 0 != tvSecretIDGnomeKeyring.Selection.CountSelectedRows() )
{
TreeModel model;
TreeIter iter;
string selected = null;
if( tvSecretIDGnomeKeyring.Selection.GetSelected (out model, out iter) )
{
selected = (string) model.GetValue (iter, 0);
string[] saKeys = (string[]) model.GetValue(iter, 1);
string[] saValues = (string[]) model.GetValue(iter, 2);
CopySecret cs = new CopySecret(selected, saKeys, saValues);
cs.Show();
}
}
Logger.DbgLog("GUI:GnomeKeyring.OnCopyActivated() - END");
}

View File

@ -1,7 +1,7 @@
using System;
using System.IO;
using System.Collections.Specialized;
using System.IO;
using System.Collections.Specialized;
using Gtk;
using Novell.CASA.MiCasa.Communication;
@ -17,34 +17,34 @@ namespace Novell.CASA.GUI
Config m_config = null;
public MiCasa m_objMiCasa = null;
string sFile = null;
byte[] buffer = null;
TreeStore tsConflicts;
SecretStore m_ss = null;
StringCollection m_scConflicts;
#region GladeWidgets
byte[] buffer = null;
TreeStore tsConflicts;
SecretStore m_ss = null;
StringCollection m_scConflicts;
#region GladeWidgets
[Glade.Widget]
Gtk.Entry entryMasterPassword;
[Glade.Widget]
Gtk.Dialog dialogImport,
dialogLogin,
dialogResolveConflict;
[Glade.Widget]
Gtk.TreeView tvConflicts;
[Glade.Widget]
Gtk.Button bttnImport,
bttnIgnore;
[Glade.Widget]
Gtk.CheckButton cbShowValues;
#endregion
dialogLogin,
dialogResolveConflict;
[Glade.Widget]
Gtk.TreeView tvConflicts;
[Glade.Widget]
Gtk.Button bttnImport,
bttnIgnore;
[Glade.Widget]
Gtk.CheckButton cbShowValues;
#endregion
public ImportSecrets(SecretStore ss, Config config, MiCasa objMiCasa)
{
{
m_ss = ss;
m_config = config;
m_objMiCasa = objMiCasa;
@ -97,18 +97,18 @@ namespace Novell.CASA.GUI
ImportXMLSecrets addSecrets = new ImportXMLSecrets(null, null, sFile);
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_ADD_XML_SECRETS, null, null, null, addSecrets);
// check for conflicts
if (m_ss == null)
m_ss = SecretStore.GetInstance();
m_scConflicts = m_ss.EnumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN);
if (m_scConflicts.Count > 0)
{
HandleConficts(m_ss, m_scConflicts);
}
else
{
CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Import complete");
// check for conflicts
if (m_ss == null)
m_ss = SecretStore.GetInstance();
m_scConflicts = m_ss.EnumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN);
if (m_scConflicts.Count > 0)
{
HandleConficts(m_ss, m_scConflicts);
}
else
{
CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Import complete");
}
}
else
@ -185,23 +185,23 @@ namespace Novell.CASA.GUI
if (m_objMiCasa != null)
{
m_objMiCasa.AggregateStore();
}
// check for conflicts
if (m_ss == null)
m_ss = SecretStore.GetInstance();
m_scConflicts = m_ss.EnumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN);
if (m_scConflicts.Count > 0)
{
HandleConficts(m_ss, m_scConflicts);
}
else
{
if (addSecrets.GetStatus().Equals("Success"))
CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Import complete");
else
CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Failed: " + addSecrets.GetStatus());
}
// check for conflicts
if (m_ss == null)
m_ss = SecretStore.GetInstance();
m_scConflicts = m_ss.EnumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN);
if (m_scConflicts.Count > 0)
{
HandleConficts(m_ss, m_scConflicts);
}
else
{
if (addSecrets.GetStatus().Equals("Success"))
CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Import complete");
else
CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Failed: " + addSecrets.GetStatus());
}
}
}
@ -212,220 +212,220 @@ namespace Novell.CASA.GUI
{
dialogImport.Destroy();
}
}
private void HandleConficts(SecretStore store, StringCollection scConflicts)
{
bool bShowConflictDialog = false;
// 0:secretID, 1:keyID, 2:importValue, 3:currentValue
tsConflicts = new TreeStore(typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));
StringEnumerator sEnum = scConflicts.GetEnumerator();
{
while (sEnum.MoveNext())
{
string sSecretID = sEnum.Current;
Secret currentSecret = store.GetSecret(sSecretID);
string sConflictSecretID;
if (sSecretID.StartsWith("SS_CredSet"))
{
sConflictSecretID = sSecretID.Substring(11);
}
else
{
sConflictSecretID = sSecretID;
}
Secret conflictSecret = store.GetSecret(SecretStore.SSCS_CONFLICT_KEYCHAIN, 0, sConflictSecretID, Secret.SS_CREDSET, "");
// add this conflict to the treestore
NameValueCollection nvcConflict = conflictSecret.GetKeyValueCollection();
NameValueCollection nvcCurrent = currentSecret.GetKeyValueCollection();
for (int i = 0; i < nvcConflict.Count; i++)
{
String sConflictKey = nvcConflict.GetKey(i);
String sConflictValue = nvcConflict.Get(sConflictKey);
String sCurrentValue = nvcCurrent.Get(sConflictKey);
if (sCurrentValue != null)
{
if (sCurrentValue != sConflictValue)
{
tsConflicts.AppendValues(sSecretID, sConflictKey, sConflictValue, sCurrentValue, "*********");
bShowConflictDialog = true;
}
}
else
{
tsConflicts.AppendValues(sSecretID, sConflictKey, sConflictValue, "", "*********");
bShowConflictDialog = true;
}
}
}
if (bShowConflictDialog == true)
{
// show dialog
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogResolveConflict", null);
gxmlTemp.Autoconnect(this);
dialogResolveConflict.SetPosition(WindowPosition.CenterOnParent);
tvConflicts.AppendColumn("SecretID", new Gtk.CellRendererText(), "text", 0);
tvConflicts.AppendColumn("Key", new Gtk.CellRendererText(), "text", 1);
if (cbShowValues.Active)
{
tvConflicts.AppendColumn("Import value", new Gtk.CellRendererText(), "text", 2);
tvConflicts.AppendColumn("Current value", new Gtk.CellRendererText(), "text", 3);
}
else
{
tvConflicts.AppendColumn("Import value", new Gtk.CellRendererText(), "text", 4);
tvConflicts.AppendColumn("Current value", new Gtk.CellRendererText(), "text", 4);
}
tvConflicts.Selection.Mode = SelectionMode.Multiple;
// hook up event handlers
bttnImport.Clicked += new EventHandler(bttnImport_Clicked);
bttnIgnore.Clicked += new EventHandler(bttnIgnore_Clicked);
cbShowValues.Toggled += new EventHandler(cbShowValues_Toggled);
tvConflicts.Model = tsConflicts;
dialogResolveConflict.Show();
}
else
{
ClearConflicts();
CommonGUI.DisplayMessage(MessageType.Info, "Import complete");
}
}
}
void cbShowValues_Toggled(object sender, EventArgs e)
{
TreeViewColumn tvCol;
if (cbShowValues.Active)
{
// verify MasterPassword
CommonGUI cg = new CommonGUI();
if (cg.VerifyMasterPasswordWithUser())
{
tvConflicts.RemoveColumn(tvConflicts.GetColumn(3));
tvConflicts.RemoveColumn(tvConflicts.GetColumn(2));
// add columns
tvCol = new TreeViewColumn("Import value", new CellRendererText(), "text", 2);
tvConflicts.InsertColumn(tvCol, 2);
tvCol = new TreeViewColumn("Current value", new CellRendererText(), "text", 3);
tvConflicts.InsertColumn(tvCol, 3);
}
else
{
cbShowValues.Active = false;
}
}
else
{
tvConflicts.RemoveColumn(tvConflicts.GetColumn(3));
tvConflicts.RemoveColumn(tvConflicts.GetColumn(2));
// add columns
tvCol = new TreeViewColumn("Import value", new CellRendererText(), "text", 4);
tvConflicts.InsertColumn(tvCol, 2);
tvCol = new TreeViewColumn("Current value", new CellRendererText(), "text", 4);
tvConflicts.InsertColumn(tvCol, 3);
}
}
void bttnIgnore_Clicked(object sender, EventArgs e)
{
ClearConflicts();
dialogResolveConflict.Destroy();
}
void bttnImport_Clicked(object sender, EventArgs e)
{
DoImport();
}
void DoImport()
{
// get selected rows
TreeModel model;
TreeIter iter;
TreePath[] treePaths = tvConflicts.Selection.GetSelectedRows(out model);
if (treePaths.Length > 0)
{
// iterate thru those to change
for (int i = 0; i < treePaths.Length; i++)
{
if (tsConflicts.GetIter(out iter, treePaths[i]))
{
string sSecretID = (string)tsConflicts.GetValue(iter, 0);
string sKey = (string)tsConflicts.GetValue(iter, 1);
string sNewValue = (string)tsConflicts.GetValue(iter, 2);
string sCurValue = (string)tsConflicts.GetValue(iter, 3);
if ((sCurValue == null) || (sCurValue.Length == 0))
{
StoreDataInterface.AddCASASecretKey(sSecretID, sKey, sNewValue);
}
else
{
StoreDataInterface.ModifyCASASecretKey(sSecretID, sKey, sNewValue);
}
tsConflicts.SetValue(iter, 3, sNewValue);
}
}
for (int i = 0; i < treePaths.Length; i++)
{
if (tsConflicts.GetIter(out iter, treePaths[i]))
{
tsConflicts.Remove(ref iter);
}
}
// refresh the store
//ClearConflicts();
m_objMiCasa.AggregateStore();
}
else
{
CommonGUI.DisplayMessage(MessageType.Error, "Select the values you want to import");
}
}
private void ClearConflicts()
{
// enumerate thru conflicts, clearing each one
if (m_ss != null)
{
if (m_scConflicts != null)
{
StringEnumerator sEnum = m_scConflicts.GetEnumerator();
while (sEnum.MoveNext())
{
string sSecretID = (string)sEnum.Current;
if (sSecretID.StartsWith("SS_CredSet"))
{
sSecretID = sSecretID.Substring(11);
}
m_ss.RemoveSecret(0, SecretStore.SSCS_CONFLICT_KEYCHAIN, null, sSecretID, Secret.SS_CREDSET);
}
}
}
tsConflicts.Clear();
}
private void HandleConficts(SecretStore store, StringCollection scConflicts)
{
bool bShowConflictDialog = false;
// 0:secretID, 1:keyID, 2:importValue, 3:currentValue
tsConflicts = new TreeStore(typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));
StringEnumerator sEnum = scConflicts.GetEnumerator();
{
while (sEnum.MoveNext())
{
string sSecretID = sEnum.Current;
Secret currentSecret = store.GetSecret(sSecretID);
string sConflictSecretID;
if (sSecretID.StartsWith("SS_CredSet"))
{
sConflictSecretID = sSecretID.Substring(11);
}
else
{
sConflictSecretID = sSecretID;
}
Secret conflictSecret = store.GetSecret(SecretStore.SSCS_CONFLICT_KEYCHAIN, 0, sConflictSecretID, Secret.SS_CREDSET, "");
// add this conflict to the treestore
NameValueCollection nvcConflict = conflictSecret.GetKeyValueCollection();
NameValueCollection nvcCurrent = currentSecret.GetKeyValueCollection();
for (int i = 0; i < nvcConflict.Count; i++)
{
String sConflictKey = nvcConflict.GetKey(i);
String sConflictValue = nvcConflict.Get(sConflictKey);
String sCurrentValue = nvcCurrent.Get(sConflictKey);
if (sCurrentValue != null)
{
if (sCurrentValue != sConflictValue)
{
tsConflicts.AppendValues(sSecretID, sConflictKey, sConflictValue, sCurrentValue, "*********");
bShowConflictDialog = true;
}
}
else
{
tsConflicts.AppendValues(sSecretID, sConflictKey, sConflictValue, "", "*********");
bShowConflictDialog = true;
}
}
}
if (bShowConflictDialog == true)
{
// show dialog
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogResolveConflict", null);
gxmlTemp.Autoconnect(this);
dialogResolveConflict.SetPosition(WindowPosition.CenterOnParent);
tvConflicts.AppendColumn("SecretID", new Gtk.CellRendererText(), "text", 0);
tvConflicts.AppendColumn("Key", new Gtk.CellRendererText(), "text", 1);
if (cbShowValues.Active)
{
tvConflicts.AppendColumn("Import value", new Gtk.CellRendererText(), "text", 2);
tvConflicts.AppendColumn("Current value", new Gtk.CellRendererText(), "text", 3);
}
else
{
tvConflicts.AppendColumn("Import value", new Gtk.CellRendererText(), "text", 4);
tvConflicts.AppendColumn("Current value", new Gtk.CellRendererText(), "text", 4);
}
tvConflicts.Selection.Mode = SelectionMode.Multiple;
// hook up event handlers
bttnImport.Clicked += new EventHandler(bttnImport_Clicked);
bttnIgnore.Clicked += new EventHandler(bttnIgnore_Clicked);
cbShowValues.Toggled += new EventHandler(cbShowValues_Toggled);
tvConflicts.Model = tsConflicts;
dialogResolveConflict.Show();
}
else
{
ClearConflicts();
CommonGUI.DisplayMessage(MessageType.Info, "Import complete");
}
}
}
void cbShowValues_Toggled(object sender, EventArgs e)
{
TreeViewColumn tvCol;
if (cbShowValues.Active)
{
// verify MasterPassword
CommonGUI cg = new CommonGUI();
if (cg.VerifyMasterPasswordWithUser())
{
tvConflicts.RemoveColumn(tvConflicts.GetColumn(3));
tvConflicts.RemoveColumn(tvConflicts.GetColumn(2));
// add columns
tvCol = new TreeViewColumn("Import value", new CellRendererText(), "text", 2);
tvConflicts.InsertColumn(tvCol, 2);
tvCol = new TreeViewColumn("Current value", new CellRendererText(), "text", 3);
tvConflicts.InsertColumn(tvCol, 3);
}
else
{
cbShowValues.Active = false;
}
}
else
{
tvConflicts.RemoveColumn(tvConflicts.GetColumn(3));
tvConflicts.RemoveColumn(tvConflicts.GetColumn(2));
// add columns
tvCol = new TreeViewColumn("Import value", new CellRendererText(), "text", 4);
tvConflicts.InsertColumn(tvCol, 2);
tvCol = new TreeViewColumn("Current value", new CellRendererText(), "text", 4);
tvConflicts.InsertColumn(tvCol, 3);
}
}
void bttnIgnore_Clicked(object sender, EventArgs e)
{
ClearConflicts();
dialogResolveConflict.Destroy();
}
void bttnImport_Clicked(object sender, EventArgs e)
{
DoImport();
}
void DoImport()
{
// get selected rows
TreeModel model;
TreeIter iter;
TreePath[] treePaths = tvConflicts.Selection.GetSelectedRows(out model);
if (treePaths.Length > 0)
{
// iterate thru those to change
for (int i = 0; i < treePaths.Length; i++)
{
if (tsConflicts.GetIter(out iter, treePaths[i]))
{
string sSecretID = (string)tsConflicts.GetValue(iter, 0);
string sKey = (string)tsConflicts.GetValue(iter, 1);
string sNewValue = (string)tsConflicts.GetValue(iter, 2);
string sCurValue = (string)tsConflicts.GetValue(iter, 3);
if ((sCurValue == null) || (sCurValue.Length == 0))
{
StoreDataInterface.AddCASASecretKey(sSecretID, sKey, sNewValue);
}
else
{
StoreDataInterface.ModifyCASASecretKey(sSecretID, sKey, sNewValue);
}
tsConflicts.SetValue(iter, 3, sNewValue);
}
}
for (int i = 0; i < treePaths.Length; i++)
{
if (tsConflicts.GetIter(out iter, treePaths[i]))
{
tsConflicts.Remove(ref iter);
}
}
// refresh the store
//ClearConflicts();
m_objMiCasa.AggregateStore();
}
else
{
CommonGUI.DisplayMessage(MessageType.Error, "Select the values you want to import");
}
}
private void ClearConflicts()
{
// enumerate thru conflicts, clearing each one
if (m_ss != null)
{
if (m_scConflicts != null)
{
StringEnumerator sEnum = m_scConflicts.GetEnumerator();
while (sEnum.MoveNext())
{
string sSecretID = (string)sEnum.Current;
if (sSecretID.StartsWith("SS_CredSet"))
{
sSecretID = sSecretID.Substring(11);
}
m_ss.RemoveSecret(0, SecretStore.SSCS_CONFLICT_KEYCHAIN, null, sSecretID, Secret.SS_CREDSET);
}
}
}
tsConflicts.Clear();
}
}
}

View File

@ -499,30 +499,30 @@ public class KdeWallet : Store
tvKeyValue.InsertColumn(tvCol, 1);
}
else if (true == cbuttonShowPassword.Active)
{
if (CommonGUI.UseMasterPassword())
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null);
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = dialogManageSecret;
label86.Text = "Enter your Master Password to view passwords";
entryMasterPassword3.Text = "";
entryMasterPassword3.HasFocus = true;
label88.Hide();
entryMasterPassword4.Hide();
labelRememberFor.Visible = true;
labelSeconds.Visible = true;
spinbuttonRememberFor.Visible = true;
spinbuttonRememberFor.Text = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
dialogLogin.Show();
}
else
{
// display the values
tvKeyValue.RemoveColumn(tvKeyValue.GetColumn(1));
tvCol = new TreeViewColumn("Value", cellEditable, "text", 1);
tvKeyValue.InsertColumn(tvCol, 1);
{
if (CommonGUI.UseMasterPassword())
{
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null);
gxmlTemp.Autoconnect(this);
dialogLogin.TransientFor = dialogManageSecret;
label86.Text = "Enter your Master Password to view passwords";
entryMasterPassword3.Text = "";
entryMasterPassword3.HasFocus = true;
label88.Hide();
entryMasterPassword4.Hide();
labelRememberFor.Visible = true;
labelSeconds.Visible = true;
spinbuttonRememberFor.Visible = true;
spinbuttonRememberFor.Text = m_config.GetConfigSetting(CommonGUI.REMEMBER_SETTING, m_sRememberFor);
dialogLogin.Show();
}
else
{
// display the values
tvKeyValue.RemoveColumn(tvKeyValue.GetColumn(1));
tvCol = new TreeViewColumn("Value", cellEditable, "text", 1);
tvKeyValue.InsertColumn(tvCol, 1);
}
}
else
@ -939,22 +939,22 @@ public class KdeWallet : Store
/// </summary>
public void OnCopyActivated(object obj, EventArgs args)
{
Logger.DbgLog("GUI:KdeWallet.OnCopyActivated() - BEGIN");
if( 0 != tvSecretIDKdeWallet.Selection.CountSelectedRows() )
{
TreeModel model;
TreeIter iter;
string selected = null;
if( tvSecretIDKdeWallet.Selection.GetSelected (out model, out iter) )
{
selected = (string) model.GetValue (iter, 0);
string[] saKeys = (string[]) model.GetValue(iter, 1);
string[] saValues = (string[]) model.GetValue(iter, 2);
CopySecret cs = new CopySecret(selected, saKeys, saValues);
cs.Show();
}
}
Logger.DbgLog("GUI:KdeWallet.OnCopyActivated() - BEGIN");
if( 0 != tvSecretIDKdeWallet.Selection.CountSelectedRows() )
{
TreeModel model;
TreeIter iter;
string selected = null;
if( tvSecretIDKdeWallet.Selection.GetSelected (out model, out iter) )
{
selected = (string) model.GetValue (iter, 0);
string[] saKeys = (string[]) model.GetValue(iter, 1);
string[] saValues = (string[]) model.GetValue(iter, 2);
CopySecret cs = new CopySecret(selected, saKeys, saValues);
cs.Show();
}
}
Logger.DbgLog("GUI:KdeWallet.OnCopyActivated() - END");
}

Some files were not shown because too many files have changed in this diff Show More