The auth_client function must not return without outputting something
authorWayne Davison <wayned@samba.org>
Wed, 31 Mar 2004 18:52:38 +0000 (18:52 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 31 Mar 2004 18:52:38 +0000 (18:52 +0000)
on the socket, so a NULL or empty username now defaults to "guest".

authenticate.c

index b147112..9254fb0 100644 (file)
@@ -269,7 +269,8 @@ void auth_client(int fd, char *user, char *challenge)
        char pass2[30];
        extern char *password_file;
 
-       if (!user || !*user) return;
+       if (!user || !*user)
+               user = "guest";
 
        if (!(pass=getpassf(password_file)) && !(pass=getenv("RSYNC_PASSWORD"))) {
                /* XXX: cyeoh says that getpass is deprecated, because