Answer Posted / chaitanya
The restriction on access to ports < 1024 is part of a (fairly weak) security scheme particular to UNIX. The intention is that servers (for example rlogind, rshd) can check the port number of the client, and if it is < 1024, assume the request has been properly authorised at the client end.
The practical upshot of this, is that binding a port number < 1024 is reserved to processes having an effective UID == root.
This can, occasionally, itself present a security problem, e.g. when a server process needs to bind a well-known port, but does not itself need root access (news servers, for example). This is often solved by creating a small program which simply binds the socket, then restores the real userid and exec()s the real server. This program can then be made setuid root.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do I convert a string into an internet address?
Why does the sockets buffer fill up sooner than expected?
What is socket address with example?
How do unix sockets work?
How do I use TCP_NODELAY?
Are sockets files?
What is a socket api?
How are unix domain sockets implemented?
Is there any advantage to handling the signal, rather than just ignoring it and checking for the EPIPE error? Are there any useful parameters passed to the signal catching function?
How does a socket work?
How does unix socket work?
Where is the socket located?
Is a socket a file?
What is a socket connection?
What is af_inet in socket?