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

Added all sections needed for mandos-client manual page

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
                                   sockaddr_in6, PF_INET6,
51
51
                                   SOCK_STREAM, INET6_ADDRSTRLEN,
52
52
                                   uid_t, gid_t */
53
 
#include <inttypes.h>           /* PRIu16 */
54
53
#include <sys/socket.h>         /* socket(), struct sockaddr_in6,
55
54
                                   struct in6_addr, inet_pton(),
56
55
                                   connect() */
229
228
    } else {
230
229
      fprintf(stderr, "Unsupported algorithm: %s\n",
231
230
              result->unsupported_algorithm);
232
 
      fprintf(stderr, "Wrong key usage: %u\n",
 
231
      fprintf(stderr, "Wrong key usage: %d\n",
233
232
              result->wrong_key_usage);
234
233
      if(result->file_name != NULL){
235
234
        fprintf(stderr, "File name: %s\n", result->file_name);
456
455
  }
457
456
  
458
457
  if(debug){
459
 
    fprintf(stderr, "Setting up a tcp connection to %s, port %" PRIu16
460
 
            "\n", ip, port);
 
458
    fprintf(stderr, "Setting up a tcp connection to %s, port %d\n",
 
459
            ip, port);
461
460
  }
462
461
  
463
462
  tcp_sd = socket(PF_INET6, SOCK_STREAM, 0);
492
491
  to.in6.sin6_scope_id = (uint32_t)if_index;
493
492
  
494
493
  if(debug){
495
 
    fprintf(stderr, "Connection to: %s, port %" PRIu16 "\n", ip,
496
 
            port);
 
494
    fprintf(stderr, "Connection to: %s, port %d\n", ip, port);
497
495
    char addrstr[INET6_ADDRSTRLEN] = "";
498
496
    if(inet_ntop(to.in6.sin6_family, &(to.in6.sin6_addr), addrstr,
499
497
                 sizeof(addrstr)) == NULL){
678
676
      char ip[AVAHI_ADDRESS_STR_MAX];
679
677
      avahi_address_snprint(ip, sizeof(ip), address);
680
678
      if(debug){
681
 
        fprintf(stderr, "Mandos server \"%s\" found on %s (%s, %"
682
 
                PRIu16 ") on port %d\n", name, host_name, ip,
683
 
                interface, port);
 
679
        fprintf(stderr, "Mandos server \"%s\" found on %s (%s, %d) on"
 
680
                " port %d\n", name, host_name, ip, interface, port);
684
681
      }
685
682
      int ret = start_mandos_communication(ip, port, interface, mc);
686
683
      if (ret == 0){