Listening on privileged port while sandboxed

Is there any possibility that allows Mac App can listen on a privileged port (aka. < 1024) while the app was sandboxed?


Background, the app acts as a server that provides networks service, sometimes listening on prvileged port is mandatory.


PS, the app is supposed to submit to Mac App Store, elevating privileges inapplicable since it's explicitly prohibited on SDK docs.


I would appreciate any ideas.

Answered by DTS Engineer in 36710022

Is there any possibility that allows Mac App can listen on a privileged port (aka. < 1024) while the app was sandboxed?

No.

This low-numbered port restriction is really dumb IMO. We lifted the restriction on iOS many years ago, but there's no sign of us lifting that same restriction on OS X. Most annoying.

Please file a bug report about this, then post your bug number here, just for the record.

For the moment the only way around this is to distribute outside of the Mac App Store.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Accepted Answer

Is there any possibility that allows Mac App can listen on a privileged port (aka. < 1024) while the app was sandboxed?

No.

This low-numbered port restriction is really dumb IMO. We lifted the restriction on iOS many years ago, but there's no sign of us lifting that same restriction on OS X. Most annoying.

Please file a bug report about this, then post your bug number here, just for the record.

For the moment the only way around this is to distribute outside of the Mac App Store.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thank you for reponse, I've filed with bug number #23408987

This is not a sandboxing restriction, you could bind a port lower than 1024 if you were running as root, which sandboxing supports.

Listening on privileged port while sandboxed
 
 
Q