After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763606 - afc: Fix accessing applications with HouseArrest
afc: Fix accessing applications with HouseArrest
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: afc backend and volume monitor
unspecified
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2016-03-14 11:53 UTC by Bastien Nocera
Modified: 2016-03-19 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
afc: Fix accessing applications with HouseArrest (1.95 KB, patch)
2016-03-14 11:53 UTC, Bastien Nocera
none Details | Review
afc: Don't list inaccessible applications (2.18 KB, patch)
2016-03-14 11:53 UTC, Bastien Nocera
none Details | Review
afc: Fix accessing applications with HouseArrest (4.06 KB, patch)
2016-03-18 11:31 UTC, Bastien Nocera
committed Details | Review
afc: Don't list inaccessible applications (2.68 KB, patch)
2016-03-18 11:31 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-03-14 11:53:33 UTC
.
Comment 1 Bastien Nocera 2016-03-14 11:53:37 UTC
Created attachment 323855 [details] [review]
afc: Fix accessing applications with HouseArrest

Only sideloaded applications (development versions for example) can use
the VendContainer method of accessing application documents.

Always use the VendDocuments method instead.

Note that we'll also re-root the Documents folder as the root of the app
container is inaccessible ("EPERM") to avoid users fiddling with it.

See https://github.com/libimobiledevice/libimobiledevice/issues/193#issuecomment-95280639
Comment 2 Bastien Nocera 2016-03-14 11:53:43 UTC
Created attachment 323856 [details] [review]
afc: Don't list inaccessible applications

As we can only start HouseArrest for applications that have
UIFileSharingEnabled turned on, there's absolutely no need to list the
other applications.

See https://github.com/libimobiledevice/libimobiledevice/issues/193
Comment 3 Ondrej Holy 2016-03-15 08:50:59 UTC
Review of attachment 323856 [details] [review]:

It seems to me that you can remove hidden flag from AppInfo struct at all and also remove the relevant code in g_vfs_backend_afc_set_info_from_app...
Comment 4 Ondrej Holy 2016-03-15 09:01:56 UTC
Review of attachment 323855 [details] [review]:

The change looks good, however I can't test it and truly I have no idea what is it exactly doing and why we need this... so feel free to push it as you are here the most knowledgeable person about AFC...
Comment 5 Bastien Nocera 2016-03-18 11:31:05 UTC
Created attachment 324250 [details] [review]
afc: Fix accessing applications with HouseArrest

Only sideloaded applications (development versions for example) can use
the VendContainer method of accessing application documents.

Always use the VendDocuments method instead.

Note that we'll also re-root the Documents folder as the root of the app
container is inaccessible ("EPERM") to avoid users fiddling with it.

See https://github.com/libimobiledevice/libimobiledevice/issues/193#issuecomment-95280639
Comment 6 Bastien Nocera 2016-03-18 11:31:22 UTC
Created attachment 324251 [details] [review]
afc: Don't list inaccessible applications

As we can only start HouseArrest for applications that have
UIFileSharingEnabled turned on, there's absolutely no need to list the
other applications.

See https://github.com/libimobiledevice/libimobiledevice/issues/193
Comment 7 Bastien Nocera 2016-03-18 11:33:25 UTC
(In reply to Ondrej Holy from comment #3)
> Review of attachment 323856 [details] [review] [review]:
> 
> It seems to me that you can remove hidden flag from AppInfo struct at all
> and also remove the relevant code in g_vfs_backend_afc_set_info_from_app...

Done. I've also removed a lot of special-casing we used to have in the other patch for when we had access to the application's container. Now that it's not the case, we can't have any hidden files besides the "normal" ones.
Comment 8 Ondrej Holy 2016-03-18 12:49:27 UTC
Thanks! The patches look sane to me. I have no chance to test them as I told before, so feel free to push them on your own...
Comment 9 Bastien Nocera 2016-03-19 12:34:32 UTC
Attachment 324250 [details] pushed as b8ad223 - afc: Fix accessing applications with HouseArrest
Attachment 324251 [details] pushed as 069cbac - afc: Don't list inaccessible applications