/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/password-prompt.c

  • Committer: Teddy Hogeborn
  • Date: 2019-07-25 21:42:40 UTC
  • Revision ID: teddy@recompile.se-20190725214240-31i9qehf60xb8yu4
Use hexadecimal unicode character references, not decimal

* mandos-options.xml (priority): Use "​" instead of "​"
  to make it slightly more clear that ZERO WIDTH SPACE is intended.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Password-prompt - Read a password from the terminal and print it
4
4
 * 
5
 
 * Copyright © 2008-2018 Teddy Hogeborn
6
 
 * Copyright © 2008-2018 Björn Påhlsson
 
5
 * Copyright © 2008-2019 Teddy Hogeborn
 
6
 * Copyright © 2008-2019 Björn Påhlsson
7
7
 * 
8
8
 * This file is part of Mandos.
9
9
 * 
508
508
    }
509
509
    if(sret < 0){
510
510
      int e = errno;
511
 
      if(errno != EINTR and not feof(stdin)){
512
 
        error_plus(0, errno, "getline");
513
 
        switch(e){
514
 
        case EBADF:
515
 
          status = EX_UNAVAILABLE;
516
 
          break;
517
 
        case EIO:
518
 
        case EINVAL:
519
 
        default:
520
 
          status = EX_IOERR;
521
 
          break;
 
511
      if(errno != EINTR){
 
512
        if(not feof(stdin)){
 
513
          error_plus(0, errno, "getline");
 
514
          switch(e){
 
515
          case EBADF:
 
516
            status = EX_UNAVAILABLE;
 
517
            break;
 
518
          case EIO:
 
519
          case EINVAL:
 
520
          default:
 
521
            status = EX_IOERR;
 
522
            break;
 
523
          }
 
524
          break;
 
525
        } else {
 
526
          clearerr(stdin);
522
527
        }
523
 
        break;
524
528
      }
525
529
    }
526
530
    /* if(sret == 0), then the only sensible thing to do is to retry