1 diff -up cups-1.4.4/cups/usersys.c.getpass cups-1.4.4/cups/usersys.c
2 --- cups-1.4.4/cups/usersys.c.getpass 2010-03-30 23:07:33.000000000 +0100
3 +++ cups-1.4.4/cups/usersys.c 2010-06-18 09:38:08.368096897 +0100
13 @@ -406,7 +408,29 @@ _cupsGetPassword(const char *prompt) /*
14 * Use the standard getpass function to get a password from the console.
17 - return (getpass(prompt));
18 + static char password[100];
19 + struct termios oldtio, newtio;
20 + sigset_t oldset, newset;
22 + sigprocmask (SIG_BLOCK, NULL, &newset);
23 + sigaddset (&newset, SIGINT);
24 + sigaddset (&newset, SIGTSTP);
25 + sigprocmask (SIG_BLOCK, &newset, &oldset);
26 + tcgetattr (STDIN_FILENO, &oldtio);
28 + newtio.c_lflag &= ~ECHO;
29 + tcsetattr (STDIN_FILENO, TCSAFLUSH, &newtio);
30 + fputs (prompt, stdout);
32 + nread = read (STDIN_FILENO, password, sizeof (password));
33 + tcsetattr (STDIN_FILENO, TCSAFLUSH, &oldtio);
34 + fputc ('\n', stdout);
35 + sigprocmask (SIG_SETMASK, &oldset, NULL);
37 + password[nread - 1] = '\0';