]> ToastFreeware Gitweb - gregoa/bti.git/blobdiff - bti.c
Disable echo when reading the password
[gregoa/bti.git] / bti.c
diff --git a/bti.c b/bti.c
index 02332c46ccc84c0e7a09aab86ae70fccc2c24ddd..30963b25a36f4711cf7e4e039c6f7f4b5b313213 100644 (file)
--- a/bti.c
+++ b/bti.c
@@ -670,7 +670,9 @@ void read_password(char *buf, size_t len)
 
        fprintf(stdout, "Enter twitter password: ");
        fflush(stdout);
+       tcflow(0, TCOOFF);
        scanf("%79s", pwd);
+       tcflow(0, TCOON);
        fprintf(stdout, "\n");
 
        tcsetattr(0, TCSANOW, &old);
@@ -1114,10 +1116,8 @@ int main(int argc, char *argv[], char *envp[])
         * Show the version to make it easier to determine what
         * is going on here
         */
-       if (debug) {
+       if (debug)
                display_version();
-               fprintf(stderr, "%s", session->group);
-       }
 
        if (session->action == ACTION_UNKNOWN) {
                fprintf(stderr, "Unknown action, valid actions are:\n");