From: Shea Levy Date: Sat, 24 Sep 2011 04:45:49 +0000 (-0400) Subject: passphrase_read: Wrie the prompt to the controlling tty X-Git-Tag: 1.0-beta1~115^2~2^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34a9a507040bd9713916f570641aaea1d9721622;p=platform%2Fupstream%2Ffreerdp.git passphrase_read: Wrie the prompt to the controlling tty --- diff --git a/libfreerdp-utils/passphrase.c b/libfreerdp-utils/passphrase.c index 15066a5..90c92c0 100644 --- a/libfreerdp-utils/passphrase.c +++ b/libfreerdp-utils/passphrase.c @@ -17,10 +17,22 @@ * limitations under the License. */ +#include +#include +#include +#include +#include #include char* freerdp_passphrase_read(const char* prompt, char* buf, size_t bufsiz) { + char term_name[L_ctermid]; + int term_id; + + ctermid(term_name); + term_id = open(term_name, O_RDWR); + write(term_id, prompt, strlen(prompt) + sizeof '\0'); + close(term_id); return NULL; }