deadlock in rsync protocol on AUTHREQD

Wolfgang Oertl wolfgang.oertl at gmx.at
Wed Mar 31 15:39:17 GMT 2004


Hi all,

I just ran into a problem with rsync-2.6.0.  Communication is
between two Linux hosts.  One host boots, detects the first, runs
rsync to copy all data, and then shuts down again (to have a
backup for the main server).

In the environment during boot, in which rsync is running in
client mode, neither USER nor LOGNAME variables are set.  In this
case, authenticate.c:auth_client gets passed a NULL user, and the
function just returns.  The client therefore doesn't send
anything, and both server and client wait forever.  Start of the
offending function:

(in authenticate.c)
> void auth_client(int fd, char *user, char *challenge)
> {
>      char *pass;
>      char pass2[30];
>      extern char *password_file;
>                                                                                                                          
>      if (!user || !*user) return;
>

See also clientserver.c:start_sock_client(), grep for USER.  My
sources are from rsync-2.5.5, but I think that hasn't changed.

Some kind of error message about missing user name in
auth_client() about missing username would be very helpful.  I
fixed it by setting and exporting $USER, but this may happen
again...

Regards,
Wolfgang Oertl



More information about the rsync mailing list