~ubuntu-branches/debian/lenny/dropbear/lenny

« back to all changes in this revision

Viewing changes to cli-auth.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2006-04-16 16:16:40 UTC
  • mfrom: (1.3.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060416161640-ypmemhromnxg3tle
Tags: 0.48.1-1
* new upstream point release.
  * Compile fix for scp
* debian/diff/dbclient.1.diff: new: document -R option to dbclient
  accurately (thx Markus Schaber; closes: #351882).
* debian/dropbear.README.Debian: document a workaround for systems with
  possibly blocking /dev/random device (closes: #355414)..

Show diffs side-by-side

added added

removed removed

Lines of Context:
278
278
 
279
279
        TRACE(("leave cli_auth_try"))
280
280
}
 
281
 
 
282
/* A helper for getpass() that exits if the user cancels. The returned
 
283
 * password is statically allocated by getpass() */
 
284
char* getpass_or_cancel()
 
285
{
 
286
        char* password = NULL;
 
287
 
 
288
        password = getpass("Password: ");
 
289
 
 
290
        /* 0x03 is a ctrl-c character in the buffer. */
 
291
        if (password == NULL || strchr(password, '\3') != NULL) {
 
292
                dropbear_close("Interrupted.");
 
293
        }
 
294
        return password;
 
295
}