~ubuntu-branches/ubuntu/utopic/dropbear/utopic-proposed

« back to all changes in this revision

Viewing changes to cli-auth.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape, Matt Johnston, Gerrit Pape
  • Date: 2008-03-27 20:08:06 UTC
  • mfrom: (1.4.1 upstream) (9 hardy)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20080327200806-c1hhdgt3ht2gk496
Tags: 0.51-1
[ Matt Johnston ]
* New upstream release.
  - Wait until a process exits before the server closes a connection,
    so that an exit code can be sent. This fixes problems with exit
    codes not being returned, which could cause scp to fail (closes:
    #448397, #472483).

[ Gerrit Pape ]
* debian/dropbear.postinst: don't print an error message if the
  update-service program is not installed (thx Matt).

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
 
237
237
void cli_auth_try() {
238
238
 
 
239
        int finished = 0;
239
240
        TRACE(("enter cli_auth_try"))
240
 
        int finished = 0;
241
241
 
242
242
        CHECKCLEARTOWRITE();
243
243
        
281
281
 
282
282
/* A helper for getpass() that exits if the user cancels. The returned
283
283
 * password is statically allocated by getpass() */
284
 
char* getpass_or_cancel()
 
284
char* getpass_or_cancel(char* prompt)
285
285
{
286
286
        char* password = NULL;
 
287
        
 
288
#ifdef DROPBEAR_PASSWORD_ENV
 
289
    /* Password provided in an environment var */
 
290
    password = getenv(DROPBEAR_PASSWORD_ENV);
 
291
    if (password)
 
292
    {
 
293
        return password;
 
294
    }
 
295
#endif
287
296
 
288
 
        password = getpass("Password: ");
 
297
        password = getpass(prompt);
289
298
 
290
299
        /* 0x03 is a ctrl-c character in the buffer. */
291
300
        if (password == NULL || strchr(password, '\3') != NULL) {