Bug 133386: Make calls to gnome-keyring.so dynamic. This solves an install dependency when gnome-keyring is not installed on the target system.
This commit is contained in:
@@ -102,15 +102,32 @@ namespace Novell.CASA.DataEngines.GK
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int FreeAttributeList(IntPtr attrList);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int SetPassword (string keyring, int itemid, string password);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int RemoveItem (string keyring, int itemid);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int SetItemAttributes (string keyring, int itemid, IntPtr[] attrs, int length);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int CreateItem(string keyringName, int itemType, string displayName, string password, IntPtr[] arrptr, int attrCount);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int UnlockRing(string sKeyringName, string sPassword);
|
||||
public static extern int SetPassword (string keyring, int itemid, string password);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int RemoveItem (string keyring, int itemid);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int SetItemAttributes (string keyring, int itemid, IntPtr[] attrs, int length);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int CreateItem(string keyringName, int itemType, string displayName, string password, IntPtr[] arrptr, int attrCount);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int UnlockRing(string sKeyringName, string sPassword);
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int LoadGnomeKeyringLibrary();
|
||||
[DllImport("libad_gk.so")]
|
||||
public static extern int ReleaseGnomeKeyringLibrary();
|
||||
|
||||
public static bool IsGnomeKeyringInstalled()
|
||||
{
|
||||
if (0 == LoadGnomeKeyringLibrary())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void ReleaseGnomeKeyringLib()
|
||||
{
|
||||
ReleaseGnomeKeyringLibrary();
|
||||
}
|
||||
|
||||
public static void AttemptGKUnlock(string sPassword)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user