I'm running into an issue that's above my skill level and could really
use some guidance. My application has an SUID-root update utility (I
know that's unusual, but it's an internal application that needs to be
able to update itself even when the logged-in user isn't privileged)
stored inside the application bundle. It downloads the update, sends a
message back to the parent application that it's OK to quit, moves the
new copy into place, and launches it.

That last bit is giving me issues. I'm using -[NSWorkspace openFile:]
to do the actual relaunching. It returns YES, but my application
doesn't launch and "com.apple.launchd[152]
([0x0-0xb80b8].com.mycompany.MyApplication[3836]) Exited with exit
code: 255" appears in the Console.

I noticed that at this point, if I use open (on the command line) to
try to launch my (updated) application, it works. However, if I sudo
open, it prints "LSOpenFromURLSpec() failed with error -10810 for the
file ...". -10810 translates to "Unexpected internal error".

If I touch the application bundle, open starts working as me and as
root. Following this thread, I tried calling utimes() from my helper
before openFile:, but run into the same condition. I've also tried
LSRegisterURL() with no change. Can anyone give me a hint as to what's
happening here? I'm lost.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to