Interactive Rsync Authentication Problem

Martin Pool mbp at samba.org
Tue Jun 17 14:44:17 EST 2003


On 29 May 2003, Andrew Klein <andy at progress.com> wrote:
> The getpassphrase() call is identical to getpass() except it returns 256 
> chars maximum.  Of course you would have to mess with autoconf but I 
> don't think that should be too hard.  Based on the autoconf stuff in the 
> latest rsync release, the compile check would be something along these 
> lines:
> 
> AC_CACHE_CHECK([for getpassphrase],rsync_cv_HAVE_GETPASSPHRASE,[
> AC_TRY_COMPILE([#include <unistd.h>],
> [char *pass;  pass = getpassphrase("Password: ");],
> rsync_cv_HAVE_GETPASSPHRASE=yes,rsync_cv_HAVE_GETPASSPHRASE=no)])
> if test x"$rsync_cv_HAVE_GETPASSPHRASE" = x"yes"; then
>    AC_DEFINE(HAVE_GETPASSPHRASE)
> fi

Can you try that and tell us if it actually works?

It's OK if you can't get the autoconf stuff straight, but it would be
good to know that getpassphrase() actually solves the problem before
worrying. 

Better yet, send a patch that adds an appropriately-licenced
readpassphrase()/getpassphrase() to the lib/ directory?

Someone wrote:
> I love the fact that the man page for getpass() under Linux says "don't use
> this", but does not provide any alternative. Mmmm... Linux - it's so
> secure! ;-)

Solaris fnmatch("ass", "hat", 0) used to return true!

-- 
Martin 



More information about the rsync mailing list