The Samba-Bugzilla – Attachment 8734 Details for
Bug 9767
"net ads join" fails when called via stdin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
backport for 4.0
samba-v4-getpass-isatty.patch (text/plain), 991 bytes, created by
Alexander Bokovoy
on 2013-04-08 13:30:16 UTC
(
hide
)
Description:
backport for 4.0
Filename:
MIME Type:
Creator:
Alexander Bokovoy
Created:
2013-04-08 13:30:16 UTC
Size:
991 bytes
patch
obsolete
>diff --git a/lib/replace/getpass.c b/lib/replace/getpass.c >index f95109f..3627222 100644 >--- a/lib/replace/getpass.c >+++ b/lib/replace/getpass.c >@@ -138,7 +138,7 @@ static void gotintr_sig(int signum) > char *rep_getpass(const char *prompt) > { > FILE *in, *out; >- int echo_off; >+ int echo_off, is_a_tty; > static char buf[256]; > static size_t bufsize = sizeof(buf); > size_t nread; >@@ -160,8 +160,9 @@ char *rep_getpass(const char *prompt) > setvbuf(in, NULL, _IONBF, 0); > > /* Turn echoing off if it is on now. */ >+ is_a_tty = isatty(fileno(in)) > 0; > >- if (tcgetattr (fileno (in), &t) == 0) { >+ if (is_a_tty && (tcgetattr (fileno (in), &t) == 0)) { > if (ECHO_IS_ON(t)) { > TURN_ECHO_OFF(t); > echo_off = tcsetattr (fileno (in), TCSAFLUSH, &t) == 0; >@@ -196,7 +197,7 @@ char *rep_getpass(const char *prompt) > if (gotintr && in_fd == -1) { > in = fopen ("/dev/tty", "w+"); > } >- if (in != NULL) >+ if ((in != NULL) && is_a_tty) > tcsetattr (fileno (in), TCSANOW, &t); > } >
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
Flags:
asn
:
review+
Actions:
View
Attachments on
bug 9767
:
8727
| 8734