Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 07, 2019 2:31 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Sandboxing and unix binaries
PostPosted: Sun Nov 04, 2012 4:04 am 
Offline

Joined: Wed Feb 04, 2009 1:43 pm
Posts: 427
I need some help for sandboxing one of my apps.

This app uses a unix binary (mediainfo) which a call with the Shell class. This binary is located in the apps package /contents/resources/ folder
I use Appwrapper to wrap applications and it works fine except I cannot get it to work when I use a unix binaries.

Can anyone help me out what I exactly need to do to get it sandboxed.

TIA


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Wed Nov 07, 2012 1:09 pm 
Offline

Joined: Wed Feb 04, 2009 1:43 pm
Posts: 427
No-one? This seems to be trivial..


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Wed Nov 07, 2012 3:31 pm 
Offline
User avatar

Joined: Tue Mar 04, 2008 1:20 pm
Posts: 95
My guess is that mediainfo needs to be sandboxed otherwise
it will not run in your main apps sandbox. :D

_________________
iMac 2011, OSX Mountain Lion 10.8.1, Real Studio 2012r2.1


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Thu Nov 08, 2012 1:30 pm 
Offline

Joined: Wed Feb 04, 2009 1:43 pm
Posts: 427
That would be very unlikely (my guess). :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Wed Dec 19, 2012 10:26 pm 
Offline

Joined: Tue Aug 07, 2012 9:46 pm
Posts: 26
Has anyone been able to do this? I tried to codesign with my cert and tried with entitlements, but no luck. Below is what I get. Watching the console definitely helps to see what is going on. I am trying to use pdftotext.


12/19/12 9:21:03.000 PM kernel[0]: exec of /Users/xxxx/Data/Library/Application Support/ListenLater/support/pdftotext denied since it was quarantined by xxxx and not approved by Gatekeeper, qtn-flags was 0x00000002


Thanks

Luke


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Thu Dec 20, 2012 8:50 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
If you don't need to interact with the console app, you can use NSTask to call console apps that are in your application package.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Thu Dec 20, 2012 2:12 pm 
Offline

Joined: Tue Aug 07, 2012 9:46 pm
Posts: 26
Just played with it a bit using the NSTaskMBS. Got it working using the unix binary in the application (in resources folder), but also found that I could just modify my shell code to use the binary in the application and that seems to work fine also. Means just need to rewrite a path rather than a whole section. Thank for the help.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Fri Dec 21, 2012 10:30 am 
Offline

Joined: Wed Feb 04, 2009 1:43 pm
Posts: 427
lajdesign wrote:
but also found that I could just modify my shell code to use the binary in the application and that seems to work fine also. Means just need to rewrite a path rather than a whole section. Thank for the help.


Not sure what you meant. Can you explain this?


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Fri Dec 21, 2012 5:29 pm 
Offline

Joined: Tue Aug 07, 2012 9:46 pm
Posts: 26
I got it working using the NSTaskMBS, but also got it to work by copying the binary to the resources folder in the application and launching from there. I think that if you added the binary to your program, you could also launch it the same way. I use package maker and just add it then.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Sat Dec 22, 2012 5:06 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
I'm presuming that the executable is not correctly Sandboxed (each helper app also needs to be Sandboxed), helper apps that are not Sandboxed work fine with a shell class, but the big issue comes from when a helper app is Sandboxed, it all goes a bit Pete Tong then and so far NSTask is the only thing I can find that works.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Sat Dec 22, 2012 6:25 am 
Offline

Joined: Wed Feb 04, 2009 1:43 pm
Posts: 427
lajdesign wrote:
I got it working using the NSTaskMBS, but also got it to work by copying the binary to the resources folder in the application and launching from there. I think that if you added the binary to your program, you could also launch it the same way. I use package maker and just add it then.


Not sure when you add unix binaries to the package without code signing them, it will be rejected for the AppStore.
In fact, I am pretty sure it will be rejected.

Package Maker Studio fails considerably doing this.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Sun Dec 23, 2012 2:35 am 
Offline

Joined: Wed Feb 04, 2009 1:43 pm
Posts: 427
lajdesign wrote:
I got it working using the NSTaskMBS, but also got it to work by copying the binary to the resources folder in the application and launching from there. I think that if you added the binary to your program, you could also launch it the same way. I use package maker and just add it then.


Tried this but it does not work. Which entitlements did you use and how?


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Thu Jan 17, 2013 9:57 am 
Offline

Joined: Tue Aug 07, 2012 9:46 pm
Posts: 26
I used package maker studio for the entitlements.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Thu Jan 17, 2013 3:10 pm 
Offline

Joined: Wed Feb 04, 2009 1:43 pm
Posts: 427
lajdesign wrote:
I used package maker studio for the entitlements.


Yes I know but which entitlements?


Top
 Profile  
Reply with quote  
 Post subject: Re: Sandboxing and unix binaries
PostPosted: Mon Jan 21, 2013 4:24 pm 
Offline

Joined: Tue Aug 07, 2012 9:46 pm
Posts: 26
All that I have are
Read / Write access to user selected Files
Access to pictures
Access to downloads


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group