SailJail: How will it work with sharing plugins?

Is declaring sharing capability in the desktop file allowed (in store) yet?

Nope: https://github.com/sailfishos/sdk-harbour-rpmvalidator/blob/harbour-qa/allowed_permissions.conf

I don’t think it is a SailJail permission… Just regular mimetype stuff.
Or you meant outgoing? I’m concerned with incoming “open-with” functionality.

I was under the impression that’s all related. But then, I was just now also thinking about Contacts (Fernschreiber not being able to access…) and Sailjail.

Open-with does however break the sandbox, doesn’t it? EDIT: https://github.com/sailfishos/sailjail-permissions#readme
lists Sharing as one to not use directly. I’m just confusing matters.

It won’t be a permission but the final bits for the sharing method registration didn’t make it on this release yet.

4 Likes

@attah can you point us at an example ? Do you mean as in App as endpoint in Share API chain - #3 by nephros

1 Like

With sharing plugins being run out-of-process, i mean that the dialog that is provided by the plugin is run in a separate process from the app that invoked it. Example sharing plugin: https://github.com/attah/harbour-seaprint-share-plugin.

So i was wondering what limitations SailJail will put on what those can do, when they themselves have no place to declare permissions. This is mostly in the light of that i invoke SeaPrint from my plugin.

The answers i interpret as that sharing plugins will only ever have base permissions. And the need for doing fancy things in plugins (and making plugins) should be greatly reduced by the upcoming open-with functionality (already available for Android apps). This is what you linked to, but it may get a bit repackaged since it isn’t released/allowed yet.

My sharing plugin was only really ever a workaround, so i’m happy sharing to SeaPrint will become much cleaner and easier. If just in a version or two…

Ah, I hadn’t thought of the dialog. Thanks for clearing that up. Now how do I test your plugin? Does it need to be built/installed separately from seaprint? I was testing with v1.0.4.

Sadly, on 4.4 you don’t. The sharing infrastructure has changed again, and even if i was to adapt to it, the plugin would be too jailed to do what it currently does. But otherwise, you just install it alongside SeaPrint (it is packaged in OpenRepos).

Compared to SFOS 4.2.0, where Jolla vastly altered it the last time? Really again?

Do you have a pointer at hand to the documentation of the “new again in 4.4.0” sharing-infrastructure?

See this PR: https://github.com/sailfishos/transfer-engine/pull/6

Thank you for the link to the comprehensive discussion.

So once again a new sharing API!
:sob:

1 Like

On the upside, most use-cases won’t need it soon.

To rephrase: the sharing plugins that are loaded into the sharing dialog are having lots of permissions. It’s not possible to limit the access of a binary plugin loaded into a process.

And because of that we have been implementing a separate mechanism to register applications to be used for sharing. Those will be also presented on the dialog’s method list and if the user chooses such, the app will be launched to handle the sharing further. This is something we can even allow in Harbour.

But both of the mechanisms will remain and technically there shouldn’t be obstacles in keeping using custom sharing binary plugins. They are just not going to be harbour allowed.

2 Likes

Wait, so sharing plugins are not jailed?
(Or do they have the full base set of permissons like apps that don’t declare any?)

Not jailed. The privileges are per process and plugins are loaded within a process.

1 Like

@pvuorela, is sharing via the the “old” (introduced with SFOS 4.2.0), not harbour-allowed sharing API interoperable with software which uses the new (introduced with SFOS 4.4.0) sharing API?
Or are they two completely separate sharing mechanisms?

I guess you mean sharing from an app? As the scope of this thread has mostly been what to do in the actual plugins themselves, there could be some mixups. I too don’t see any reason to suspect that sharing from an app has changed (and it should be easy enough to verify).

Seems we are getting a SeaPrint sharing plugin after all…

I probably got something wrong, some names need adjusting, and i should add the new formats that SeaPrint supports… but it works!

Feel free to use as inspiration. This also demonstrates that at least the transfer plugins remain unjailed.

1 Like

Cool! Thanks for sharing. Cough, cough.

1 Like