mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-20 04:51:58 -04:00
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.)
This commit is contained in:
1 parent
531d06b824
commit
4d66e00afa
1 file changed
+4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user