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

* plugins.d/mandos-client.c (runnable_hook): Add debug output.
 (run_network_hooks): Bug fix: Ignore quit_now.  Also add debug output.
 (main): Bug fix: Ignore return value from run_network_hooks when
         passing "stop".

Show diffs side-by-side

added added

removed removed

Lines of Context:
1301
1301
    }
1302
1302
    return 0;
1303
1303
  }
 
1304
  if(debug){
 
1305
    fprintf_plus(stderr, "Hook \"%s\" is acceptable\n",
 
1306
                 direntry->d_name);
 
1307
  }
1304
1308
  return 1;
1305
1309
}
1306
1310
 
1469
1473
        }
1470
1474
      }
1471
1475
      free(fullname);
1472
 
      if(quit_now){
1473
 
        break;
 
1476
      if(debug){
 
1477
        fprintf_plus(stderr, "Network hook \"%s\" ran successfully\n",
 
1478
                     direntry->d_name);
1474
1479
      }
1475
1480
    }
1476
1481
    close(devnull);
2200
2205
  if(gpgme_initialized){
2201
2206
    gpgme_release(mc.ctx);
2202
2207
  }
2203
 
 
 
2208
  
2204
2209
  /* Cleans up the circular linked list of Mandos servers the client
2205
2210
     has seen */
2206
2211
  if(mc.current_server != NULL){
2221
2226
        perror_plus("seteuid");
2222
2227
      }
2223
2228
    }
 
2229
    
2224
2230
    /* Run network hooks */
2225
 
    if(not run_network_hooks("stop", interface, delay)){
2226
 
      goto end;
2227
 
    }
 
2231
    run_network_hooks("stop", interface, delay);
2228
2232
    
2229
2233
    /* Take down the network interface */
2230
2234
    if(take_down_interface and geteuid() == 0){