On Fri 07 May 2004, Jonathan Johnson wrote: > > I found that a newline is required after the line containing the > password, at least in rsync 2.6.2. Without the newline character, I
Try the patch below. Paul Slootman --- authenticate.c.orig 2004-04-01 20:05:40.000000000 +0200 +++ authenticate.c 2004-05-08 13:04:59.000000000 +0200 @@ -139,6 +139,7 @@ int fd=0; STRUCT_STAT st; int ok = 1; + int n; extern int am_root; char *envpw=getenv("RSYNC_PASSWORD"); @@ -170,12 +171,15 @@ if (envpw) rprintf(FERROR,"RSYNC_PASSWORD environment variable ignored\n"); buffer[sizeof(buffer)-1]='\0'; - if (read(fd,buffer,sizeof(buffer)-1) > 0) + if ((n = read(fd,buffer,sizeof(buffer)-1)) > 0) { - char *p = strtok(buffer,"\n\r"); + char *p; close(fd); - if (p) p = strdup(p); - return p; + buffer[n] = 0; + if ((p = strchr(buffer, '\n')) || (p = strchr(buffer, '\r'))) + *p = 0; + if (*buffer) + return strdup(buffer); } return NULL; -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html