/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-26 18:44:21 UTC
  • Revision ID: teddy@recompile.se-20160826184421-gjqjgzxy3lupx9n3
Fix bug where mandos server could not find GnuTLS library

* mandos (GnuTLS): Try to find both "gnutls" and variant name
                   "gnutls-deb0", for a Debian Jessie system which
                   does not have the package "gnutls28-dev" installed.

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
14
 
 * 
15
 
 * This file is part of Mandos.
16
 
 * 
17
 
 * Mandos is free software: you can redistribute it and/or modify it
18
 
 * under the terms of the GNU General Public License as published by
19
 
 * the Free Software Foundation, either version 3 of the License, or
20
 
 * (at your option) any later version.
21
 
 * 
22
 
 * Mandos is distributed in the hope that it will be useful, but
 
12
 * Copyright © 2008-2016 Teddy Hogeborn
 
13
 * Copyright © 2008-2016 Björn Påhlsson
 
14
 * 
 
15
 * This program is free software: you can redistribute it and/or
 
16
 * modify it under the terms of the GNU General Public License as
 
17
 * published by the Free Software Foundation, either version 3 of the
 
18
 * License, or (at your option) any later version.
 
19
 * 
 
20
 * This program is distributed in the hope that it will be useful, but
23
21
 * WITHOUT ANY WARRANTY; without even the implied warranty of
24
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25
23
 * General Public License for more details.
26
24
 * 
27
25
 * You should have received a copy of the GNU General Public License
28
 
 * along with Mandos.  If not, see <http://www.gnu.org/licenses/>.
 
26
 * along with this program.  If not, see
 
27
 * <http://www.gnu.org/licenses/>.
29
28
 * 
30
29
 * Contact the authors at <mandos@recompile.se>.
31
30
 */
627
626
                     safer_gnutls_strerror(ret));
628
627
        dhparamsfilename = NULL;
629
628
      }
630
 
      free(params.data);
631
629
    } while(false);
632
630
  }
633
631
  if(dhparamsfilename == NULL){
1080
1078
    bool match = false;
1081
1079
    {
1082
1080
      char *interface = NULL;
1083
 
      while((interface = argz_next(mc->interfaces,
1084
 
                                   mc->interfaces_size,
1085
 
                                   interface))){
 
1081
      while((interface=argz_next(mc->interfaces, mc->interfaces_size,
 
1082
                                 interface))){
1086
1083
        if(if_nametoindex(interface) == (unsigned int)if_index){
1087
1084
          match = true;
1088
1085
          break;
1495
1492
  return retval;
1496
1493
}
1497
1494
 
 
1495
__attribute__((nonnull))
1498
1496
static void resolve_callback(AvahiSServiceResolver *r,
1499
1497
                             AvahiIfIndex interface,
1500
1498
                             AvahiProtocol proto,
2197
2195
  
2198
2196
  /* Sleep checking until interface is running.
2199
2197
     Check every 0.25s, up to total time of delay */
2200
 
  for(int i = 0; i < delay * 4; i++){
 
2198
  for(int i=0; i < delay * 4; i++){
2201
2199
    if(interface_is_running(interface)){
2202
2200
      break;
2203
2201
    }
3024
3022
      /* Take down the network interfaces which were brought up */
3025
3023
      {
3026
3024
        char *interface = NULL;
3027
 
        while((interface = argz_next(interfaces_to_take_down,
3028
 
                                     interfaces_to_take_down_size,
3029
 
                                     interface))){
 
3025
        while((interface=argz_next(interfaces_to_take_down,
 
3026
                                   interfaces_to_take_down_size,
 
3027
                                   interface))){
3030
3028
          ret = take_down_interface(interface);
3031
3029
          if(ret != 0){
3032
3030
            errno = ret;