/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/passprompt.c

  • Committer: Teddy Hogeborn
  • Date: 2008-08-03 21:45:14 UTC
  • mfrom: (24.1.13 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20080803214514-plvvkrpoitwsrxeg
Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
      status = EXIT_SUCCESS;
147
147
      break;
148
148
    }
149
 
    // ret == 0 makes no other sence than to retry to read from stdin
150
149
    if (ret < 0){
151
150
      if (errno != EINTR and not feof(stdin)){
152
151
        perror("getline");
154
153
        break;
155
154
      }
156
155
    }
 
156
    /* if(ret == 0), then the only sensible thing to do is to retry to
 
157
       read from stdin */
157
158
    fputc('\n', stderr);
158
159
  }
159
 
 
 
160
  
160
161
  if (debug){
161
162
    fprintf(stderr, "Restoring terminal attributes\n");
162
163
  }
163
164
  if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &t_old) != 0){
164
165
    perror("tcsetattr+echo");
165
166
  }
166
 
 
 
167
  
167
168
  if (debug){
168
169
    fprintf(stderr, "%s is exiting\n", argv[0]);
169
170
  }