• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems listening on a privileged port
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems listening on a privileged port


  • Subject: Problems listening on a privileged port
  • From: Kent Sorensen <email@hidden>
  • Date: Tue, 2 Oct 2007 21:41:22 -0400

I need to listen for incoming connections on port 59. I am using the MoreSecurity sample code from MoreIsBetter which has an example on how to use a privileged helper tool to bind to a low numbered port.

This works fine, and I can get a filedesc back from the tool, but when I try to do a listen() in my application, it fails with errno = ENOTSOCK

I have verified that the value of the filedesc in the application is the one that the tool returns.

If I do the listen() inside the privileged tool it succeeds, even if I do it after the point where the non-privileged UID has been restored

I was under the impression that it was only bind() that was a protected operation, but it appears that there's something (probably a lot) that I don't understand about this problem.

Any information appreciated.

Thanks
Kent

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Problems listening on a privileged port
      • From: "Duane Murphy" <email@hidden>
  • Prev by Date: Re: Sending mail from an application launched as a startup item
  • Next by Date: Re: Problems listening on a privileged port
  • Previous by thread: Re: multiple ethernet ports, private subnet and public network
  • Next by thread: Re: Problems listening on a privileged port
  • Index(es):
    • Date
    • Thread