• 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
RE: Listening on system restricted ports
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Listening on system restricted ports


  • Subject: RE: Listening on system restricted ports
  • From: "Jamie Wood" <email@hidden>
  • Date: Fri, 25 Mar 2005 22:50:58 -0800

I'm not sure if this will exactly solve your problem, but I have found it to be an excellent solution for giving Java processes elevated privileges:

http://www.amug.org/~glguerin/sw/index.html#authkit

I you have specific questions about it, you might want to post them to the java-dev list. I know that the author of the above toolkit is a frequent poster on that mailing list, and might have some good suggestions.

Hope this helps,

Jamie

From: OL&L Lists <email@hidden>
To: "Jamie Wood" <email@hidden>, email@hidden
Subject: RE: Listening on system restricted ports
Date: Fri, 25 Mar 2005 18:30:54 -0800

At 6:23 PM -0800 3/25/05, Jamie Wood wrote:
My suggestion would be to have your helper tool open the socket, bind to the restricted port, and then pass the file descriptor back to your main program via a Unix domain socket. Check out MoreAuthSample for details:

http://developer.apple.com/samplecode/MoreAuthSample/MoreAuthSample.html

Hope this helps,
Jamie

That sounds good. Thanks for the reference. Now for the big question: can it be done from Java code? The problem is I have already-existing Java code on other plats that open and bind to restricted ports without any C code whatsoever. Now I want to make that same Java code work on OS X (if possible without any C code). I can write a JNI-C layer as an interface but my main goal is to get the existing Java code to work on OS X as-is but the restricted port issue is blocking me from getting it to work.


Thanks,

Michael
Orbital Launch & Lift, Inc.
http://www.orbitallaunch.com
=================


From: OL&L Lists <email@hidden>
To: email@hidden
Subject: Listening on system restricted ports
Date: Fri, 25 Mar 2005 18:00:32 -0800

I need to bind to restricted ports (below 1024). I can't use a helper tool because helper tools are supposed to be one shot programs. What is the correct way to do this on OS X? Can I use a helper tool to elevate a listening process's privileges, bind to a restricted port, then lower the listener's privileges? Also, I would like to be able to do so from both Java and C.

Thanks,

Michael
Orbital Launch & Lift, Inc.
http://www.orbitallaunch.com
_______________________________________________
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



_______________________________________________
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


References: 
 >RE: Listening on system restricted ports (From: OL&L Lists <email@hidden>)

  • Prev by Date: RE: Listening on system restricted ports
  • Next by Date: Re: adding to a file rather than replacing
  • Previous by thread: RE: Listening on system restricted ports
  • Next by thread: Problem using URLAccess for HTTPS
  • Index(es):
    • Date
    • Thread