Is it worth retrieving the error and logging it if things fail? May make our lives easier in the future if people run into problems and we have to diagnose them remotely.
Are you sure you need to do this as async? I don't understand all aspects of how SyncRunnableBase works, but if this is a separate thread, you could just use secret_password_lookup_sync().
Is it worth retrieving the error and logging it if things fail? May make our lives easier in the future if people run into problems and we have to diagnose them remotely.
Comment on attachment 713377
Store Master Password by using libsecret to Gnome Keyring patch v1
Review of attachment 713377: ------- ------- ------- ------- ------- ------- ------- ------- --
-------
Overall looks good. Haven't tested. Just a few comments.
::: configure.in LIBSECRET" MODULES( MOZ_LIBSECRET, libsecret-1 >= $LIBSECRET_ VERSION, [ LIBS=`echo $MOZ_LIBSECRET_LIBS | sed 's/-llinc\>//'`
@@ +4989,5 @@
> +
> + if test "$MOZ_ENABLE_
> + then
> + PKG_CHECK_
> + MOZ_LIBSECRET_
Are you sure you need this? If so, I'd be interested to know on which platform libsecret has that in its pkg-config file.
::: security/ manager/ ssl/src/ nsNSSCallbacks. cpp finished( GObject *source, password_ lookup_ finish( result, nullptr);
@@ +751,5 @@
> +on_lookup_
> + GAsyncResult *result,
> + gpointer data)
> +{
> + gchar *pwd = secret_
Is it worth retrieving the error and logging it if things fail? May make our lives easier in the future if people run into problems and we have to diagnose them remotely.
@@ +803,5 @@ Assign( MOZ_APP_ NAME); Append( " - "); Append( profileName) ;
> + nsCString keyDescription;
> + keyDescription.
> + keyDescription.
> + keyDescription.
> + mRunning = true;
May I suggest using (the equivalent of):
MOZ_APP_NAME + " Master Password - " + profileName
So that it's clear in the password manager what this is?
@@ +808,5 @@ password_ lookup( MOZILLA_ SECRET_ SCHEMA, nullptr, on_lookup_finished, this,
> +
> + secret_
> + "application", MOZ_APP_NAME,
> + "profile", profileName.get(),
> + NULL);
Are you sure you need to do this as async? I don't understand all aspects of how SyncRunnableBase works, but if this is a separate thread, you could just use secret_ password_ lookup_ sync().
::: security/ manager/ ssl/src/ nsPK11TokenDB. cpp SECRET_ SCHEMA get_mozilla_ secret_ schema( )
@@ +388,5 @@
> + };
> + return &the_schema;
> +}
> +
> +#define MOZILLA_
Is there a reason the above function and macro can't be shared between nsNSSCallbacks.cpp and nsPK11TokenDB.cpp?
@@ +400,5 @@ password_ stored( GObject *source, password_ store_finish (result, nullptr);
> +on_libsecret_
> + GAsyncResult *result,
> + gpointer data)
> +{
> + secret_
Is it worth retrieving the error and logging it if things fail? May make our lives easier in the future if people run into problems and we have to diagnose them remotely.
@@ +416,5 @@ password_ cleared( GObject *source, password_ clear_finish( result, nullptr);
> +on_libsecret_
> + GAsyncResult *result,
> + gpointer data)
> +{
> + secret_
Ditto about the error.