/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 03:33:56 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080803033356-6aemgj0g0hoz91ow
* plugins.d/mandosclient.c (pgp_packet_decrypt): Renamed variables.
                                                 On debug, show
                                                 decrypted plaintext
                                                 in hexadecimal.  Free
                                                 the GPGME data
                                                 buffers even on
                                                 errors.

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
  }