- changed the log messages to show the requested path
[rsync/rsync.git] / authenticate.c
index 351c8a0..6a389db 100644 (file)
@@ -107,12 +107,7 @@ static int get_secret(int module, char *user, char *secret, int len)
        close(fd);
        if (!found) return 0;
 
-       if (strlen(pass) > len-1) {
-               memset(line, 0, sizeof(line));
-               return 0;
-       }
-
-       strcpy(secret, pass);
+       strlcpy(secret, pass, len);
        return 1;
 }