diff options
author | Martin Pool <mbp@samba.org> | 2001-06-21 06:19:00 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2001-06-21 06:19:00 +0000 |
commit | 4d66e00afac22e5e0f3ba908bbdbabec6dd80e37 (patch) | |
tree | eda4939b85ec896b2abf6165d00b7d3a47f40d97 | |
parent | 531d06b82464e77b81453cbd618a56af7d1542b8 (diff) | |
download | rsync-4d66e00afac22e5e0f3ba908bbdbabec6dd80e37.tar.gz |
If binding to a low-numbered port fails with EACCES, then the error
message should explain that you probably need to be root.
(Why leave off the final S? Kernighan must have been a *really* slow
typist.)
-rw-r--r-- | socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -210,6 +210,10 @@ static int open_socket_in(int type, int port, struct in_addr *address) if (bind(res, (struct sockaddr * ) &sock,sizeof(sock)) == -1) { rprintf(FERROR,"bind failed on port %d: %s\n", port, strerror(errno)); + if (errno == EACCES && port < 1024) { + rprintf(FERROR, "Note: you must be root to bind " + "to low-numbered ports"); + } close(res); return -1; } |