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

merge

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