The Samba-Bugzilla – Attachment 3287 Details for
Bug 5456
^C in smbpasswd leaves the terminal in a non-echo state.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-Attempt-to-fix-bug-5456-restore-echoing-on-SIGINT-i.patch (text/plain), 972 bytes, created by
Volker Lendecke
on 2008-05-13 07:10:21 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2008-05-13 07:10:21 UTC
Size:
972 bytes
patch
obsolete
>From d315f33dee9825bdb11efb79cc4b4a89da5fb89c Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Tue, 13 May 2008 14:08:58 +0200 >Subject: [PATCH] Attempt to fix bug 5456: restore echoing on SIGINT in password prompt > >--- > source/lib/replace/getpass.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > >diff --git a/source/lib/replace/getpass.c b/source/lib/replace/getpass.c >index 73333b9..a71458b 100644 >--- a/source/lib/replace/getpass.c >+++ b/source/lib/replace/getpass.c >@@ -186,6 +186,17 @@ char *rep_getpass(const char *prompt) > if (!gotintr) { > in_fd = fileno(in); > if (fgets(buf, bufsize, in) == NULL) { >+ >+ /* Restore echoing. */ >+ if (echo_off) { >+ FILE *in_tty; >+ if (gotintr && in_fd == -1) >+ in_tty = fopen ("/dev/tty", "w+"); >+ if (in_tty != NULL) >+ tcsetattr(fileno(in_tty), TCSANOW, &t); >+ fclose(in_tty); >+ } >+ > buf[0] = 0; > if (in && in != stdin) { > fclose(in); >-- >1.5.3.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5456
:
3286
| 3287