summaryrefslogtreecommitdiff
path: root/clientname.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-26Bump the year to 2014.Wayne Davison1-1/+1
2013-07-12Look for REMOTE_HOST before SSH_* environment options.Wayne Davison1-3/+3
2013-06-15Support rsync daemon over SSL via stunnel.Wayne Davison1-5/+7
Added the client rsync-ssl script and various client/daemon support files needed for talking to an rsync daemon over SSL on port 874 (no tls support). This uses an elegant stunnel setup that was detailed by dozzie (see the resources page) now that stunnel4 has improved command-spawning support. Also incorporates some tweaks by devzero (e.g. the nice no-tmpfile-config client-side code) and a few by me (including logging of the actual remote IP that came in to the stunnel process). This probably still needs a little work.
2013-01-19Update copyright year.Wayne Davison1-1/+1
2009-01-03Update the copyright year.Wayne Davison1-1/+1
2008-10-11Don't lookup address "0.0.0.0" when we're a remote-shell daemon.Wayne Davison1-0/+3
Gets rid of a DNS delay waiting for a lookup failure.
2008-03-01Include 2008 in the copyright years.Wayne Davison1-1/+1
2008-02-22Cast ai->ai_addrlen to int for an rprintf() call using %d.Wayne Davison1-1/+1
2007-07-10Tweaking the license text a bit more.Wayne Davison1-2/+3
2007-07-07Switching to GPL 3.Wayne Davison1-3/+2
2007-02-04Further modifications to the copyright comment section.Wayne Davison1-4/+3
2006-10-13- Changed strcpy() calls into strlcpy() calls, just to be extra safe.Wayne Davison1-12/+14
- Added a default: exit_cleanup() case to a switch. - Made the check_name() function take a buffer size arg.
2006-04-25Updated the FSF's address to an even newer one.Wayne Davison1-3/+3
2006-04-25- Updated the address for the FSF in the opening comment.Wayne Davison1-26/+22
- Standardized the format of the opening comment, including adding a brief description of what's in the file for those that lacked it. - Added some missing copyright lines. - Some minor whitespace tweaks (in a few of the files).
2006-02-24Got rid of unused externs.Wayne Davison1-1/+0
2005-11-10Got rid of a superfluous empty line.Wayne Davison1-1/+0
2005-02-14John E. Malmberg convinced me to standardize on #ifs for definedWayne Davison1-5/+5
values instead of non-zero.
2005-01-28Use "#if" (not "#ifdef") for configure-defined macros.Wayne Davison1-4/+4
2004-09-24Turned the various FERROR messages into (the more proper) FLOG.Wayne Davison1-23/+13
2004-06-03The daemon-over-ssh code now looks for $SSH_CONNECTION and $SSH2_CLIENTWayne Davison1-12/+10
as well as $SSH_CLIENT to figure out the remote IP address.
2004-05-15Changed rprintf() calls that included strerror() to use rsyserr().Wayne Davison1-2/+1
2004-04-30Only refer to AI_NUMERICHOST if it is defined.Wayne Davison1-0/+2
2004-04-01Use getaddrinfo() to figure out if a numeric address is IPv4 or IPv6.Wayne Davison1-32/+29
2004-04-01Last of the cleanup before the patching starts.Wayne Davison1-15/+11
2004-04-01A couple more minor twiddles.Wayne Davison1-4/+6
2004-04-01Updated the sizeof syntax and trimmed some trailing whitespace.Wayne Davison1-18/+18
2004-03-16Changed HAVE_SOCKADDR_SIN_LEN to HAVE_SOCKADDR_IN_LEN.Wayne Davison1-1/+1
2004-02-27Use new HAVE_SOCKADDR_SIN_LEN define (replaces HAVE_SOCKADDR_LEN).Wayne Davison1-1/+1
2003-01-11The inet_pton() man page says we need to pass in a pointer to aWayne Davison1-2/+2
struct in_addr, which means passing &sin.sin_addr instead of &sin.sin_addr.s_addr. Also changed the AF_INET6 version to pass &sin6.sin6_addr. Hopefully this will fix UNICOS and not break anyone else.
2003-01-09Support IPv6 addresses with "hosts allow" and "hosts deny". Patch fromDavid Dykstra1-3/+19
Hideaki Yoshifuji.
2002-08-02* Don't call getnameinfo() if we've already populated the addr_buf.Wayne Davison1-10/+10
* Moved some structures in client_name() so that they remain in-scope for the entire function (since we set pointers to their storage location). * Allow the dot-counting loop to increment to 4 instead of stopping at 3.
2002-08-02Put in better method of checking whether or not daemon over --rsh mode isDavid Dykstra1-10/+19
in place: simply check the "am_server" global variable, which is not set true when the daemon is listening for connections (daemon_main is not called in main.c if am_server is set).
2002-08-02Fix client_name to work on when INET6 is enabled but using a 4-part IPv4David Dykstra1-22/+33
IP address. Tested on Linux, but only with an IPv4 ssh. Somebody who has IPv6 enabled on ssh needs to test it yet.
2002-08-01Fix last change to use correct IPv6 structure names when using INET6.David Dykstra1-2/+7
Doesn't yet look up names correctly on Linux with INET6 enabled, however; needs further work but I don't have time right now.
2002-08-01Fix to correctly identify remote IP address and host name when usingDavid Dykstra1-9/+41
-e ssh and :: together. Uses $SSH_CLIENT to locate the IP address (was attempting to before but it didn't always work) and then uses inet_pton() on that and getnameinfo() to find the name.
2002-04-03Commit patch based on one from John L. Allen to fix "forward nameMartin Pool1-5/+14
lookup failed" on AIX 4.3.3. When doing an name->addr lookup on the client address, there's no point including the service name, because it can't be spoofed and it apparently causes trouble when not present in /etc/services.
2002-01-25check_name doesn't need a socklen_t, because it knows what is insideMartin Pool1-2/+1
each sockaddr type.
2002-01-25Add code to compare sin6_addrs.v2.5.2pre3Martin Pool1-3/+9
2002-01-25Back out last change -- to see whether an address is spoofed, we don'tMartin Pool1-15/+18
want to look at the whole sockaddr, but rather just at the sin_addr that it contains. Also fix silly bug where ai_flags was set incorrectly for getaddrinfo.
2002-01-25compare_addrinfo_sockaddr: Add code to compare AF_INET6 addresses.Martin Pool1-16/+13
2002-01-25Split out code to compare addrinfo and sockaddr into it's ownMartin Pool1-25/+45
function. The comparison cannot be done just byte-by-byte, because different parts of the sockaddr will be meaningful depending on the protocol. It looks like on some systems the library sets the unused parts to 0, but this is not reliable. IPv6 not implemented yet.
2002-01-25Doc.Martin Pool1-7/+12
2002-01-25The name resolution stuff is getting complicated -- split it out intoMartin Pool1-0/+252
its own file.