/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/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2016-07-03 03:28:57 UTC
  • Revision ID: teddy@recompile.se-20160703032857-ss0r9fgv5a0r2u2o
Update old GnuTLS link in mandos-client(8mandos).

* plugins.d/mandos-client.xml (SEE ALSO): Update old GnuTLS link.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 * "browse_callback", and parts of "main".
10
10
 * 
11
11
 * Everything else is
12
 
 * Copyright © 2008-2017 Teddy Hogeborn
13
 
 * Copyright © 2008-2017 Björn Påhlsson
 
12
 * Copyright © 2008-2016 Teddy Hogeborn
 
13
 * Copyright © 2008-2016 Björn Påhlsson
14
14
 * 
15
15
 * This program is free software: you can redistribute it and/or
16
16
 * modify it under the terms of the GNU General Public License as
47
47
                                   strtof(), abort() */
48
48
#include <stdbool.h>            /* bool, false, true */
49
49
#include <string.h>             /* strcmp(), strlen(), strerror(),
50
 
                                   asprintf(), strncpy(), strsignal()
51
 
                                */
 
50
                                   asprintf(), strncpy() */
52
51
#include <sys/ioctl.h>          /* ioctl */
53
52
#include <sys/types.h>          /* socket(), inet_pton(), sockaddr,
54
53
                                   sockaddr_in6, PF_INET6,
626
625
                     safer_gnutls_strerror(ret));
627
626
        dhparamsfilename = NULL;
628
627
      }
629
 
      free(params.data);
630
628
    } while(false);
631
629
  }
632
630
  if(dhparamsfilename == NULL){
1079
1077
    bool match = false;
1080
1078
    {
1081
1079
      char *interface = NULL;
1082
 
      while((interface = argz_next(mc->interfaces,
1083
 
                                   mc->interfaces_size,
1084
 
                                   interface))){
 
1080
      while((interface=argz_next(mc->interfaces, mc->interfaces_size,
 
1081
                                 interface))){
1085
1082
        if(if_nametoindex(interface) == (unsigned int)if_index){
1086
1083
          match = true;
1087
1084
          break;
1240
1237
           with an explicit route added with the server's address.
1241
1238
           
1242
1239
           Avahi bug reference:
1243
 
           https://lists.freedesktop.org/archives/avahi/2010-February/001833.html
 
1240
           http://lists.freedesktop.org/archives/avahi/2010-February/001833.html
1244
1241
           https://bugs.debian.org/587961
1245
1242
        */
1246
1243
        if(debug){
1494
1491
  return retval;
1495
1492
}
1496
1493
 
 
1494
__attribute__((nonnull))
1497
1495
static void resolve_callback(AvahiSServiceResolver *r,
1498
1496
                             AvahiIfIndex interface,
1499
1497
                             AvahiProtocol proto,
2196
2194
  
2197
2195
  /* Sleep checking until interface is running.
2198
2196
     Check every 0.25s, up to total time of delay */
2199
 
  for(int i = 0; i < delay * 4; i++){
 
2197
  for(int i=0; i < delay * 4; i++){
2200
2198
    if(interface_is_running(interface)){
2201
2199
      break;
2202
2200
    }
2498
2496
  
2499
2497
  {
2500
2498
    /* Work around Debian bug #633582:
2501
 
       <https://bugs.debian.org/633582> */
 
2499
       <http://bugs.debian.org/633582> */
2502
2500
    
2503
2501
    /* Re-raise privileges */
2504
2502
    ret = raise_privileges();
2959
2957
 end:
2960
2958
  
2961
2959
  if(debug){
2962
 
    if(signal_received){
2963
 
      fprintf_plus(stderr, "%s exiting due to signal %d: %s\n",
2964
 
                   argv[0], signal_received,
2965
 
                   strsignal(signal_received));
2966
 
    } else {
2967
 
      fprintf_plus(stderr, "%s exiting\n", argv[0]);
2968
 
    }
 
2960
    fprintf_plus(stderr, "%s exiting\n", argv[0]);
2969
2961
  }
2970
2962
  
2971
2963
  /* Cleanup things */
3023
3015
      /* Take down the network interfaces which were brought up */
3024
3016
      {
3025
3017
        char *interface = NULL;
3026
 
        while((interface = argz_next(interfaces_to_take_down,
3027
 
                                     interfaces_to_take_down_size,
3028
 
                                     interface))){
 
3018
        while((interface=argz_next(interfaces_to_take_down,
 
3019
                                   interfaces_to_take_down_size,
 
3020
                                   interface))){
3029
3021
          ret = take_down_interface(interface);
3030
3022
          if(ret != 0){
3031
3023
            errno = ret;