info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Re: Stable CVS 1.11.7 Released! (Derek Robert Price)]


From: David Everly
Subject: address@hidden: Re: Stable CVS 1.11.7 Released! (Derek Robert Price)]
Date: Tue, 30 Sep 2003 21:01:18 -0600
User-agent: Mutt/1.3.28i

Thanks Larry!  This fixed it.

--- Begin Message --- Subject: Re: Stable CVS 1.11.7 Released! (Derek Robert Price) Date: Tue, 30 Sep 2003 18:18:08 -0400 (EDT)
David Everly writes:
> 
> All three have the same behavior of showing the password (which was
> not present with 1.11.6).  Output of "uname -a":
> 
>    AIX chanegw0 3 4 000110554C00
>    SunOS ndccsr02 5.8 Generic_108528-19 sun4u sparc SUNW,Ultra-Enterprise
>    HP-UX chanhp9 B.11.11 U 9000/800 1877750441 unlimited-user license

By golly, so they do.  The GNULIB version of getpass is defective, but
it doesn't show up on my BSD-derived system nor, presumably, on Linux. 
Since passwords are read directly from the terminal, it's not tested in
the nightly testing.  I've checked in a fix and I'll be sending it on to
the GNULIB folks.  Here's a patch for anyone that wants it:

Index: getpass.c
===================================================================
RCS file: /cvs/ccvs/lib/getpass.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- getpass.c   29 Jul 2003 13:37:37 -0000      1.1.2.1
+++ getpass.c   30 Sep 2003 22:11:51 -0000      1.1.2.2
@@ -20,6 +20,9 @@
 #endif
 
 #include <stdio.h>
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
 #include <termios.h>
 #include <unistd.h>
 #include "getline.h"
@@ -83,8 +86,11 @@
          /* Remove the newline.  */
          buf[nread - 1] = '\0';
          if (tty_changed)
-           /* Write the newline that was not echoed.  */
-           putc ('\n', out);
+           {
+             /* Write the newline that was not echoed.  */
+             if (out == in) fseek (out, 0, SEEK_CUR);
+             putc ('\n', out);
+           }
        }
     }
 
-Larry Jones

I sure like summer vacation. -- Calvin


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]