/mandos/release

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

« back to all changes in this revision

Viewing changes to plugins.d/passprompt.c

  • Committer: Teddy Hogeborn
  • Date: 2008-08-03 16:05:52 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080803160552-mvqy5klry3wn57x1
* plugins.d/mandosclient.c (initgnutls): Moved "err" variable into its
                                         own code block.
  (start_mandos_communication): Moved call to "initgnutls" to
                                beginning.  Renamed label "exit" to
                                "mandos_end".  Bug fix: set return
                                code if failure to realloc buffer.
                                Close TLS session as early as
                                possible.
  (resolve_callback): Also print interface number when debugging.
  (main): Moved "debug_int" and "config" into their own respective
          code blocks.

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
149
150
    if (ret < 0){
150
151
      if (errno != EINTR and not feof(stdin)){
151
152
        perror("getline");
153
154
        break;
154
155
      }
155
156
    }
156
 
    /* if(ret == 0), then the only sensible thing to do is to retry to
157
 
       read from stdin */
158
157
    fputc('\n', stderr);
159
158
  }
160
 
  
 
159
 
161
160
  if (debug){
162
161
    fprintf(stderr, "Restoring terminal attributes\n");
163
162
  }
164
163
  if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &t_old) != 0){
165
164
    perror("tcsetattr+echo");
166
165
  }
167
 
  
 
166
 
168
167
  if (debug){
169
168
    fprintf(stderr, "%s is exiting\n", argv[0]);
170
169
  }