/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: 2008-09-06 16:11:50 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080906161150-1umb8yz6a29zxg28
* Makefile (install-client): Add "/etc/plugins.d/README".
  (uninstall-client): Remove "/etc/plugins.d/README".

* etc-plugins.d-README: New file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
216
216
      status = EXIT_SUCCESS;
217
217
      /* Make n = data size instead of allocated buffer size */
218
218
      n = (size_t)ret;
 
219
      /* Strip final newline */
 
220
      if(n>0 and buffer[n-1] == '\n'){
 
221
        buffer[n-1] = '\0';     /* not strictly necessary */
 
222
        n--;
 
223
      }
219
224
      size_t written = 0;
220
225
      while(written < n){
221
226
        ret = write(STDOUT_FILENO, buffer + written, n - written);
256
261
    fprintf(stderr, "%s is exiting with status %d\n", argv[0],
257
262
            status);
258
263
  }
 
264
  if(status == EXIT_SUCCESS){
 
265
    fputc('\n', stderr);
 
266
  }
259
267
  
260
268
  return status;
261
269
}