I'm trying to get my ServerSocket to listen on port 80 on Mac OS X.  But the 
problem is, Unix systems require root privileges for all processes listening on 
all ports below 1024.

I've searched the archives, and found some hints, but not enough detail for me 
to succeed at this yet.  So far:

1. Use Authentication Services to authenticate my app (which I understand to 
mean, give it an effective user ID of root).  Jon Johnson has a nifty example 
of declares to authentication services, but it executes a helper tool, which 
isn't what I need to do.  (It also does some unexplained fiddling with file 
flags that I don't understand.)

Has anybody done this?  Will I be able to un-authenticate my app once the 
server socket is listening, or would doing so cause it to stop listening?

2. Similar to 1, but using standard FreeBSD system calls (e.g. setuid).  Again, 
has anybody tried this, and will I be able to setuid root only when I start 
listening?

3. Use ipfw to forward port 80 to some higher-numbered port.  This sounds good, 
but I haven't yet figured out how to do it.  From my searches on google, it 
seems that ipfw isn't just a command I could execute from a Shell within my 
app, but rather a set of system-wide config files that can seriously screw up 
your system if you mess up.  I also worry about how these config files relate 
to what you can set in the Sharing/Firewall system preferences panel (which, 
alas, doesn't seem to provide for port forwarding).

So, has anybody actually managed to use ipfw on OS X to forward one port to 
another?

Finally, are there any other options I'm not considering, that don't involve 
letting my application run with root privs all the time?

Many thanks,
- Joe


--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to