[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-2313-g726d9d1

Jeremy Allison jra at samba.org
Fri May 9 21:54:38 GMT 2008


The branch, v3-2-test has been updated
       via  726d9d168d5b4bca86b478c34204eacb97907443 (commit)
      from  6680d11fdc3bde96a98de88278529308303be7d8 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 726d9d168d5b4bca86b478c34204eacb97907443
Author: Jeremy Allison <jra at samba.org>
Date:   Fri May 9 14:54:06 2008 -0700

    Fix replacement getpass. If we ^C at the prompt echo was left off.
    Fix bug #5456. Karolin please pull for 3.2-stable.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/lib/replace/getpass.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/getpass.c b/source/lib/replace/getpass.c
index 73333b9..0be618f 100644
--- a/source/lib/replace/getpass.c
+++ b/source/lib/replace/getpass.c
@@ -187,10 +187,6 @@ char *rep_getpass(const char *prompt)
 		in_fd = fileno(in);
 		if (fgets(buf, bufsize, in) == NULL) {
 			buf[0] = 0;
-			if (in && in != stdin) {
-				fclose(in);
-			}
-			return buf;
 		}
 	}
 	nread = strlen(buf);
@@ -201,8 +197,9 @@ char *rep_getpass(const char *prompt)
 
 	/* Restore echoing.  */
 	if (echo_off) {
-		if (gotintr && in_fd == -1)
+		if (gotintr && in_fd == -1) {
 			in = fopen ("/dev/tty", "w+");
+		}
 		if (in != NULL)
 			tcsetattr (fileno (in), TCSANOW, &t);
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list