Bug 150975. Enable GNOME-Keyring when so is loaded

This commit is contained in:
Jim Norman 2006-02-15 00:17:28 +00:00
parent 4a565834d0
commit 2155b89bf7
5 changed files with 24 additions and 9 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 14 17:15:34 MST 2006 - jnorman@novell.com
- Bug 150975. Enable GNOME Keyring when gnome-keyring.so is loaded
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 14 14:01:20 MST 2006 - jnorman@novell.com Tue Feb 14 14:01:20 MST 2006 - jnorman@novell.com

View File

@ -56,7 +56,7 @@ namespace Novell.CASA.DataEngines
~GKEngine() ~GKEngine()
{ {
//GnomeKeyring.ReleaseGnomeKeyringLib(); GnomeKeyring.ReleaseGnomeKeyringLib();
} }
public XmlNode Aggregate() public XmlNode Aggregate()
@ -295,10 +295,20 @@ namespace Novell.CASA.DataEngines
public static Boolean IsStoreAvailable() public static Boolean IsStoreAvailable()
{ {
Console.WriteLine("Checking GKEngine");
try try
{ {
System.Runtime.InteropServices.Marshal.PrelinkAll(typeof(GnomeKeyring)); System.Runtime.InteropServices.Marshal.PrelinkAll(typeof(GnomeKeyring));
return true; if (GnomeKeyring.IsGnomeKeyringInstalled())
{
//Console.WriteLine("IsGnomeKeyringInstalled is true");
return true;
}
else
{
//Console.WriteLine("IsGnomeKeyringInstalled is false");
return false;
}
} }
catch(DllNotFoundException d) catch(DllNotFoundException d)
{ {

View File

@ -30,7 +30,7 @@
// handle to gnome-keyring library // handle to gnome-keyring library
static void *gnomeIDK = NULL; static void *gnomeIDK = NULL;
static char *GNOME_KEYRING_NDK = "libgnome-keyring.so"; static char *GNOME_KEYRING_NDK = "libgnome-keyring.so.0";
// function typedefs // function typedefs
SSCS_TYPEDEF_LIBCALL(gpointer, GNOME_KEYRING_UNLOCK_T) SSCS_TYPEDEF_LIBCALL(gpointer, GNOME_KEYRING_UNLOCK_T)
@ -545,7 +545,7 @@ GnomeKeyringItemType casa_gnome_keyring_item_info_get_type (GnomeKeyringItemInfo
//*********************************************************************************************** //***********************************************************************************************
static int int
LoadGnomeKeyringLibrary() LoadGnomeKeyringLibrary()
{ {
if (!gnomeIDK) if (!gnomeIDK)
@ -556,7 +556,7 @@ LoadGnomeKeyringLibrary()
return SUCCESS; return SUCCESS;
} }
static int int
ReleaseGnomeKeyringLibrary() ReleaseGnomeKeyringLibrary()
{ {
if (!gnomeIDK) if (!gnomeIDK)

View File

@ -75,8 +75,8 @@ int GetItems(char *keyring, GList **itemList);
int GetItemInfo(char *keyring, int itemId, ItemInfo *info); int GetItemInfo(char *keyring, int itemId, ItemInfo *info);
int GetAttributeList(char *keyring, int itemId, GList **); int GetAttributeList(char *keyring, int itemId, GList **);
int FreeAttributeList(GList *attrList); int FreeAttributeList(GList *attrList);
static int LoadGnomeKeyringLibrary(); int LoadGnomeKeyringLibrary();
static int ReleaseGnomeKeyringLibrary(); int ReleaseGnomeKeyringLibrary();
int int
UnlockRing(char *keyring, char *password); UnlockRing(char *keyring, char *password);

View File

@ -22,7 +22,7 @@ fi
export PKG_CONFIG_PATH=/usr/lib$ARCH_LIB/pkgconfig:/opt/gnome/lib$ARCH_LIB/pkgconfig:/usr/local/lib$ARCH_LIB/pkgconfig export PKG_CONFIG_PATH=/usr/lib$ARCH_LIB/pkgconfig:/opt/gnome/lib$ARCH_LIB/pkgconfig:/usr/local/lib$ARCH_LIB/pkgconfig
cd $PR/c_adlib/ad_gk/native cd $PR/c_adlib/ad_gk/native
(make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=shared MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="`pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` -O2 -fmessage-length=0 -Wall -fstack-protector" $2 $3 $4 $5) (make -I $PR/make -f Makefile ROOT=$PR PLAT=lux MODULE=shared MIN_NUM=\"$MIN_SSS_NO\" PROD_NUM=\"$MAJ_SSS_NO\" BLD_VER=\"$BLD_NO\" ARC=\"$ARCH_LIB\" XTRA=ndbg XTRA_CFLAGS="`pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` -O2 -fmessage-length=0 -Wall " $2 $3 $4 $5)
RCODE=$? RCODE=$?
rm -f $COMMON_FILES rm -f $COMMON_FILES
if(test $RCODE != 0) if(test $RCODE != 0)