Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-05-02 09:18:42 -0400
committerAlexander Kurtakov2017-05-02 09:18:42 -0400
commit00df93cc413014222e6e309c141fd6de20f77a0b (patch)
treefeea512b4db6c0c568191b49f2794a7c78a71cd0
parent6b6f2441923174307edd4a271bdea9f7d560d08e (diff)
downloadrt.equinox.bundles-00df93cc413014222e6e309c141fd6de20f77a0b.tar.gz
rt.equinox.bundles-00df93cc413014222e6e309c141fd6de20f77a0b.tar.xz
rt.equinox.bundles-00df93cc413014222e6e309c141fd6de20f77a0b.zip
[bug 515880] Fix Equinox keystore fragment for Linux 64bitI20170502-2000
Verify that the dbus session bus is active before trying to do call any libsecret function. Change-Id: Ib27f5c80d8ee3a7e83e10a5cf2057d45bc604078 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c11
-rwxr-xr-xbundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.sobin13160 -> 13000 bytes
2 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c b/bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c
index 04a0045d..b2c5cbb2 100644
--- a/bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c
+++ b/bundles/org.eclipse.equinox.security.linux.x86_64/keystorelinuxnative/keystoreLinuxNative.c
@@ -35,7 +35,16 @@ static void unlock_secret_service(JNIEnv *env)
GList *l, *ul;
gchar* lbl;
gint nu;
-
+ //check that there is session dbus bus
+ GDBusConnection* dbusconnection = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);
+ if (error != NULL) {
+ (*env)->ExceptionClear(env);
+ char buffer [60];
+ sprintf(buffer, "Unable to get secret service: %s", error->message);
+ (*env)->ThrowNew(env, (* env)->FindClass(env, "java/lang/SecurityException"), buffer);
+ g_error_free (error);
+ return;
+ }
SecretService* secretservice = secret_service_get_sync(SECRET_SERVICE_LOAD_COLLECTIONS, NULL, &error);
if (error != NULL) {
(*env)->ExceptionClear(env);
diff --git a/bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so b/bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so
index 27f51c70..06fc04ba 100755
--- a/bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so
+++ b/bundles/org.eclipse.equinox.security.linux.x86_64/libkeystorelinuxnative.so
Binary files differ

Back to the top