/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-08-06 00:53:13 UTC
  • Revision ID: teddy@recompile.se-20160806005313-q9n4b1b7707hnjj4
Makefile: Replace "-fsanitize=address" with "-fsanitize=leak"

The Address Sanitizer is a debugging feature, not a security feature -
it has security issues:  <http://seclists.org/oss-sec/2016/q1/363>
Therefore, it should only be used when debugging.  Replace it with
"-fsanitize=leak", which is needed since -fsanitize=address no longer
includes it implicitly.

* Makefile (DEBUG): Add "-fsanitize=address".
  (ALL_SANITIZE_OPTIONS): Replace "-fsanitize=address" with
                          "-fsanitize=leak".

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
626
626
                     safer_gnutls_strerror(ret));
627
627
        dhparamsfilename = NULL;
628
628
      }
629
 
      free(params.data);
630
629
    } while(false);
631
630
  }
632
631
  if(dhparamsfilename == NULL){
1079
1078
    bool match = false;
1080
1079
    {
1081
1080
      char *interface = NULL;
1082
 
      while((interface = argz_next(mc->interfaces,
1083
 
                                   mc->interfaces_size,
1084
 
                                   interface))){
 
1081
      while((interface=argz_next(mc->interfaces, mc->interfaces_size,
 
1082
                                 interface))){
1085
1083
        if(if_nametoindex(interface) == (unsigned int)if_index){
1086
1084
          match = true;
1087
1085
          break;
1494
1492
  return retval;
1495
1493
}
1496
1494
 
 
1495
__attribute__((nonnull))
1497
1496
static void resolve_callback(AvahiSServiceResolver *r,
1498
1497
                             AvahiIfIndex interface,
1499
1498
                             AvahiProtocol proto,
2196
2195
  
2197
2196
  /* Sleep checking until interface is running.
2198
2197
     Check every 0.25s, up to total time of delay */
2199
 
  for(int i = 0; i < delay * 4; i++){
 
2198
  for(int i=0; i < delay * 4; i++){
2200
2199
    if(interface_is_running(interface)){
2201
2200
      break;
2202
2201
    }
3023
3022
      /* Take down the network interfaces which were brought up */
3024
3023
      {
3025
3024
        char *interface = NULL;
3026
 
        while((interface = argz_next(interfaces_to_take_down,
3027
 
                                     interfaces_to_take_down_size,
3028
 
                                     interface))){
 
3025
        while((interface=argz_next(interfaces_to_take_down,
 
3026
                                   interfaces_to_take_down_size,
 
3027
                                   interface))){
3029
3028
          ret = take_down_interface(interface);
3030
3029
          if(ret != 0){
3031
3030
            errno = ret;