git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6680d11
)
Fix replacement getpass. If we ^C at the prompt echo was left off.
author
Jeremy Allison
<jra@samba.org>
Fri, 9 May 2008 21:54:06 +0000
(14:54 -0700)
committer
Jeremy Allison
<jra@samba.org>
Fri, 9 May 2008 21:54:06 +0000
(14:54 -0700)
Fix bug #5456. Karolin please pull for 3.2-stable.
Jeremy.
source/lib/replace/getpass.c
patch
|
blob
|
history
diff --git
a/source/lib/replace/getpass.c
b/source/lib/replace/getpass.c
index 73333b902199b92d6627f2c1794124ebf7922ce8..0be618fc916cf21d6d7e6122d0ac847759ae6002 100644
(file)
--- 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);
}