53
53
sockaddr_in6, PF_INET6,
54
54
SOCK_STREAM, uid_t, gid_t, open(),
56
#include <sys/stat.h> /* open(), S_ISREG */
56
#include <sys/stat.h> /* open() */
57
57
#include <sys/socket.h> /* socket(), struct sockaddr_in6,
58
58
inet_pton(), connect() */
59
59
#include <fcntl.h> /* open() */
86
86
#include <sysexits.h> /* EX_OSERR, EX_USAGE, EX_UNAVAILABLE,
87
87
EX_NOHOST, EX_IOERR, EX_PROTOCOL */
88
#include <sys/wait.h> /* waitpid(), WIFEXITED(),
89
WEXITSTATUS(), WTERMSIG() */
92
90
#include <sys/klog.h> /* klogctl() */
254
252
rc = gpgme_data_new_from_fd(&pgp_data, fd);
255
253
if(rc != GPG_ERR_NO_ERROR){
256
fprintf(stderr, "Mandos plugin mandos-client: "
257
"bad gpgme_data_new_from_fd: %s: %s\n",
254
fprintf(stderr, "bad gpgme_data_new_from_fd: %s: %s\n",
258
255
gpgme_strsource(rc), gpgme_strerror(rc));
262
259
rc = gpgme_op_import(mc.ctx, pgp_data);
263
260
if(rc != GPG_ERR_NO_ERROR){
264
fprintf(stderr, "Mandos plugin mandos-client: "
265
"bad gpgme_op_import: %s: %s\n",
261
fprintf(stderr, "bad gpgme_op_import: %s: %s\n",
266
262
gpgme_strsource(rc), gpgme_strerror(rc));
279
fprintf(stderr, "Mandos plugin mandos-client: "
280
"Initializing GPGME\n");
275
fprintf(stderr, "Initializing GPGME\n");
284
279
gpgme_check_version(NULL);
285
280
rc = gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP);
286
281
if(rc != GPG_ERR_NO_ERROR){
287
fprintf(stderr, "Mandos plugin mandos-client: "
288
"bad gpgme_engine_check_version: %s: %s\n",
282
fprintf(stderr, "bad gpgme_engine_check_version: %s: %s\n",
289
283
gpgme_strsource(rc), gpgme_strerror(rc));
293
287
/* Set GPGME home directory for the OpenPGP engine only */
294
288
rc = gpgme_get_engine_info(&engine_info);
295
289
if(rc != GPG_ERR_NO_ERROR){
296
fprintf(stderr, "Mandos plugin mandos-client: "
297
"bad gpgme_get_engine_info: %s: %s\n",
290
fprintf(stderr, "bad gpgme_get_engine_info: %s: %s\n",
298
291
gpgme_strsource(rc), gpgme_strerror(rc));
307
300
engine_info = engine_info->next;
309
302
if(engine_info == NULL){
310
fprintf(stderr, "Mandos plugin mandos-client: "
311
"Could not set GPGME home dir to %s\n", tempdir);
303
fprintf(stderr, "Could not set GPGME home dir to %s\n", tempdir);
315
307
/* Create new GPGME "context" */
316
308
rc = gpgme_new(&(mc.ctx));
317
309
if(rc != GPG_ERR_NO_ERROR){
318
fprintf(stderr, "Mandos plugin mandos-client: "
319
"bad gpgme_new: %s: %s\n", gpgme_strsource(rc),
310
fprintf(stderr, "bad gpgme_new: %s: %s\n",
311
gpgme_strsource(rc), gpgme_strerror(rc));
342
333
ssize_t plaintext_length = 0;
345
fprintf(stderr, "Mandos plugin mandos-client: "
346
"Trying to decrypt OpenPGP data\n");
336
fprintf(stderr, "Trying to decrypt OpenPGP data\n");
349
339
/* Create new GPGME data buffer from memory cryptotext */
350
340
rc = gpgme_data_new_from_mem(&dh_crypto, cryptotext, crypto_size,
352
342
if(rc != GPG_ERR_NO_ERROR){
353
fprintf(stderr, "Mandos plugin mandos-client: "
354
"bad gpgme_data_new_from_mem: %s: %s\n",
343
fprintf(stderr, "bad gpgme_data_new_from_mem: %s: %s\n",
355
344
gpgme_strsource(rc), gpgme_strerror(rc));
359
348
/* Create new empty GPGME data buffer for the plaintext */
360
349
rc = gpgme_data_new(&dh_plain);
361
350
if(rc != GPG_ERR_NO_ERROR){
362
fprintf(stderr, "Mandos plugin mandos-client: "
363
"bad gpgme_data_new: %s: %s\n",
351
fprintf(stderr, "bad gpgme_data_new: %s: %s\n",
364
352
gpgme_strsource(rc), gpgme_strerror(rc));
365
353
gpgme_data_release(dh_crypto);
371
359
rc = gpgme_op_decrypt(mc.ctx, dh_crypto, dh_plain);
372
360
if(rc != GPG_ERR_NO_ERROR){
373
fprintf(stderr, "Mandos plugin mandos-client: "
374
"bad gpgme_op_decrypt: %s: %s\n",
361
fprintf(stderr, "bad gpgme_op_decrypt: %s: %s\n",
375
362
gpgme_strsource(rc), gpgme_strerror(rc));
376
363
plaintext_length = -1;
378
365
gpgme_decrypt_result_t result;
379
366
result = gpgme_op_decrypt_result(mc.ctx);
380
367
if(result == NULL){
381
fprintf(stderr, "Mandos plugin mandos-client: "
382
"gpgme_op_decrypt_result failed\n");
368
fprintf(stderr, "gpgme_op_decrypt_result failed\n");
384
fprintf(stderr, "Mandos plugin mandos-client: "
385
"Unsupported algorithm: %s\n",
370
fprintf(stderr, "Unsupported algorithm: %s\n",
386
371
result->unsupported_algorithm);
387
fprintf(stderr, "Mandos plugin mandos-client: "
388
"Wrong key usage: %u\n",
372
fprintf(stderr, "Wrong key usage: %u\n",
389
373
result->wrong_key_usage);
390
374
if(result->file_name != NULL){
391
fprintf(stderr, "Mandos plugin mandos-client: "
392
"File name: %s\n", result->file_name);
375
fprintf(stderr, "File name: %s\n", result->file_name);
394
377
gpgme_recipient_t recipient;
395
378
recipient = result->recipients;
396
379
while(recipient != NULL){
397
fprintf(stderr, "Mandos plugin mandos-client: "
398
"Public key algorithm: %s\n",
380
fprintf(stderr, "Public key algorithm: %s\n",
399
381
gpgme_pubkey_algo_name(recipient->pubkey_algo));
400
fprintf(stderr, "Mandos plugin mandos-client: "
401
"Key ID: %s\n", recipient->keyid);
402
fprintf(stderr, "Mandos plugin mandos-client: "
403
"Secret key available: %s\n",
382
fprintf(stderr, "Key ID: %s\n", recipient->keyid);
383
fprintf(stderr, "Secret key available: %s\n",
404
384
recipient->status == GPG_ERR_NO_SECKEY
406
386
recipient = recipient->next;
489
fprintf(stderr, "Mandos plugin mandos-client: "
490
"Initializing GnuTLS\n");
467
fprintf(stderr, "Initializing GnuTLS\n");
493
470
ret = gnutls_global_init();
494
471
if(ret != GNUTLS_E_SUCCESS){
495
fprintf(stderr, "Mandos plugin mandos-client: "
496
"GnuTLS global_init: %s\n", safer_gnutls_strerror(ret));
472
fprintf(stderr, "GnuTLS global_init: %s\n",
473
safer_gnutls_strerror(ret));
508
485
/* OpenPGP credentials */
509
486
ret = gnutls_certificate_allocate_credentials(&mc.cred);
510
487
if(ret != GNUTLS_E_SUCCESS){
511
fprintf(stderr, "Mandos plugin mandos-client: "
512
"GnuTLS memory error: %s\n", safer_gnutls_strerror(ret));
488
fprintf(stderr, "GnuTLS memory error: %s\n",
489
safer_gnutls_strerror(ret));
513
490
gnutls_global_deinit();
518
fprintf(stderr, "Mandos plugin mandos-client: "
519
"Attempting to use OpenPGP public key %s and"
495
fprintf(stderr, "Attempting to use OpenPGP public key %s and"
520
496
" secret key %s as GnuTLS credentials\n", pubkeyfilename,
526
502
GNUTLS_OPENPGP_FMT_BASE64);
527
503
if(ret != GNUTLS_E_SUCCESS){
529
"Mandos plugin mandos-client: "
530
505
"Error[%d] while reading the OpenPGP key pair ('%s',"
531
506
" '%s')\n", ret, pubkeyfilename, seckeyfilename);
532
fprintf(stderr, "Mandos plugin mandos-client: "
533
"The GnuTLS error is: %s\n", safer_gnutls_strerror(ret));
507
fprintf(stderr, "The GnuTLS error is: %s\n",
508
safer_gnutls_strerror(ret));
537
512
/* GnuTLS server initialization */
538
513
ret = gnutls_dh_params_init(&mc.dh_params);
539
514
if(ret != GNUTLS_E_SUCCESS){
540
fprintf(stderr, "Mandos plugin mandos-client: "
541
"Error in GnuTLS DH parameter initialization:"
515
fprintf(stderr, "Error in GnuTLS DH parameter initialization:"
542
516
" %s\n", safer_gnutls_strerror(ret));
545
519
ret = gnutls_dh_params_generate2(mc.dh_params, mc.dh_bits);
546
520
if(ret != GNUTLS_E_SUCCESS){
547
fprintf(stderr, "Mandos plugin mandos-client: "
548
"Error in GnuTLS prime generation: %s\n",
521
fprintf(stderr, "Error in GnuTLS prime generation: %s\n",
549
522
safer_gnutls_strerror(ret));
573
546
} while(ret == GNUTLS_E_INTERRUPTED or ret == GNUTLS_E_AGAIN);
574
547
if(ret != GNUTLS_E_SUCCESS){
575
fprintf(stderr, "Mandos plugin mandos-client: "
576
"Error in GnuTLS session initialization: %s\n",
548
fprintf(stderr, "Error in GnuTLS session initialization: %s\n",
577
549
safer_gnutls_strerror(ret));
588
560
} while(ret == GNUTLS_E_INTERRUPTED or ret == GNUTLS_E_AGAIN);
589
561
if(ret != GNUTLS_E_SUCCESS){
590
fprintf(stderr, "Mandos plugin mandos-client: "
591
"Syntax error at: %s\n", err);
592
fprintf(stderr, "Mandos plugin mandos-client: "
593
"GnuTLS error: %s\n", safer_gnutls_strerror(ret));
562
fprintf(stderr, "Syntax error at: %s\n", err);
563
fprintf(stderr, "GnuTLS error: %s\n",
564
safer_gnutls_strerror(ret));
594
565
gnutls_deinit(*session);
744
710
if(if_indextoname((unsigned int)if_index, interface) == NULL){
745
711
perror_plus("if_indextoname");
747
fprintf(stderr, "Mandos plugin mandos-client: "
748
"Connection to: %s%%%s, port %" PRIu16 "\n",
713
fprintf(stderr, "Connection to: %s%%%s, port %" PRIu16 "\n",
749
714
ip, interface, port);
752
fprintf(stderr, "Mandos plugin mandos-client: "
753
"Connection to: %s, port %" PRIu16 "\n", ip, port);
717
fprintf(stderr, "Connection to: %s, port %" PRIu16 "\n", ip,
755
720
char addrstr[(INET_ADDRSTRLEN > INET6_ADDRSTRLEN) ?
756
721
INET_ADDRSTRLEN : INET6_ADDRSTRLEN] = "";
911
873
} while(ret == GNUTLS_E_AGAIN or ret == GNUTLS_E_INTERRUPTED);
913
fprintf(stderr, "Mandos plugin mandos-client: "
914
"*** GnuTLS Re-handshake failed ***\n");
875
fprintf(stderr, "*** GnuTLS Re-handshake failed ***\n");
915
876
gnutls_perror(ret);
921
fprintf(stderr, "Mandos plugin mandos-client: "
922
"Unknown error while reading data from"
882
fprintf(stderr, "Unknown error while reading data from"
923
883
" encrypted session with Mandos server\n");
924
884
gnutls_bye(session, GNUTLS_SHUT_RDWR);
1035
993
case AVAHI_RESOLVER_FAILURE:
1036
fprintf(stderr, "Mandos plugin mandos-client: "
1037
"(Avahi Resolver) Failed to resolve service '%s'"
994
fprintf(stderr, "(Avahi Resolver) Failed to resolve service '%s'"
1038
995
" of type '%s' in domain '%s': %s\n", name, type, domain,
1039
996
avahi_strerror(avahi_server_errno(mc.server)));
1044
1001
char ip[AVAHI_ADDRESS_STR_MAX];
1045
1002
avahi_address_snprint(ip, sizeof(ip), address);
1047
fprintf(stderr, "Mandos plugin mandos-client: "
1048
"Mandos server \"%s\" found on %s (%s, %"
1004
fprintf(stderr, "Mandos server \"%s\" found on %s (%s, %"
1049
1005
PRIdMAX ") on port %" PRIu16 "\n", name, host_name,
1050
1006
ip, (intmax_t)interface, port);
1100
1055
if(avahi_s_service_resolver_new(mc.server, interface, protocol,
1101
1056
name, type, domain, protocol, 0,
1102
1057
resolve_callback, NULL) == NULL)
1103
fprintf(stderr, "Mandos plugin mandos-client: "
1104
"Avahi: Failed to resolve service '%s': %s\n",
1058
fprintf(stderr, "Avahi: Failed to resolve service '%s': %s\n",
1105
1059
name, avahi_strerror(avahi_server_errno(mc.server)));
1157
1110
/* Reject the loopback device */
1158
1111
if(ifr->ifr_flags & IFF_LOOPBACK){
1160
fprintf(stderr, "Mandos plugin mandos-client: "
1161
"Rejecting loopback interface \"%s\"\n", ifname);
1113
fprintf(stderr, "Rejecting loopback interface \"%s\"\n",
1165
1118
/* Accept point-to-point devices only if connect_to is specified */
1166
1119
if(connect_to != NULL and (ifr->ifr_flags & IFF_POINTOPOINT)){
1168
fprintf(stderr, "Mandos plugin mandos-client: "
1169
"Accepting point-to-point interface \"%s\"\n", ifname);
1121
fprintf(stderr, "Accepting point-to-point interface \"%s\"\n",
1173
1126
/* Otherwise, reject non-broadcast-capable devices */
1174
1127
if(not (ifr->ifr_flags & IFF_BROADCAST)){
1176
fprintf(stderr, "Mandos plugin mandos-client: "
1177
"Rejecting non-broadcast interface \"%s\"\n", ifname);
1129
fprintf(stderr, "Rejecting non-broadcast interface \"%s\"\n",
1181
1134
/* Reject non-ARP interfaces (including dummy interfaces) */
1182
1135
if(ifr->ifr_flags & IFF_NOARP){
1184
fprintf(stderr, "Mandos plugin mandos-client: "
1185
"Rejecting non-ARP interface \"%s\"\n", ifname);
1137
fprintf(stderr, "Rejecting non-ARP interface \"%s\"\n", ifname);
1190
1142
/* Accept this device */
1192
fprintf(stderr, "Mandos plugin mandos-client: "
1193
"Interface \"%s\" is good\n", ifname);
1144
fprintf(stderr, "Interface \"%s\" is good\n", ifname);
1227
1174
* (This function is passed to scandir(3) as a filter function.)
1229
1176
int up_interface(const struct dirent *if_entry){
1178
char *flagname = NULL;
1230
1179
if(if_entry->d_name[0] == '.'){
1235
if(not get_flags(if_entry->d_name, &ifr)){
1237
fprintf(stderr, "Mandos plugin mandos-client: "
1238
"Failed to get flags for interface \"%s\"\n",
1182
int ret = asprintf(&flagname, "%s/%s/flags", sys_class_net,
1185
perror_plus("asprintf");
1188
int flags_fd = (int)TEMP_FAILURE_RETRY(open(flagname, O_RDONLY));
1190
perror_plus("open");
1195
typedef short ifreq_flags; /* ifreq.ifr_flags in netdevice(7) */
1196
/* read line from flags_fd */
1197
ssize_t to_read = 2+(sizeof(ifreq_flags)*2)+1; /* "0x1003\n" */
1198
char *flagstring = malloc((size_t)to_read+1); /* +1 for final \0 */
1199
flagstring[(size_t)to_read] = '\0';
1200
if(flagstring == NULL){
1201
perror_plus("malloc");
1206
ssret = (ssize_t)TEMP_FAILURE_RETRY(read(flags_fd, flagstring,
1209
perror_plus("read");
1223
tmpmax = strtoimax(flagstring, &tmp, 0);
1224
if(errno != 0 or tmp == flagstring or (*tmp != '\0'
1225
and not (isspace(*tmp)))
1226
or tmpmax != (ifreq_flags)tmpmax){
1228
fprintf(stderr, "Invalid flags \"%s\" for interface \"%s\"\n",
1229
flagstring, if_entry->d_name);
1235
ifreq_flags flags = (ifreq_flags)tmpmax;
1236
/* Reject the loopback device */
1237
if(flags & IFF_LOOPBACK){
1239
fprintf(stderr, "Rejecting loopback interface \"%s\"\n",
1239
1240
if_entry->d_name);
1244
1245
/* Reject down interfaces */
1245
if(not (ifr.ifr_flags & IFF_UP)){
1247
fprintf(stderr, "Mandos plugin mandos-client: "
1248
"Rejecting down interface \"%s\"\n",
1254
/* Reject non-running interfaces */
1255
if(not (ifr.ifr_flags & IFF_RUNNING)){
1257
fprintf(stderr, "Mandos plugin mandos-client: "
1258
"Rejecting non-running interface \"%s\"\n",
1264
if(not good_flags(if_entry->d_name, &ifr)){
1246
if(not (flags & IFF_UP)){
1250
/* Accept point-to-point devices only if connect_to is specified */
1251
if(connect_to != NULL and (flags & IFF_POINTOPOINT)){
1253
fprintf(stderr, "Accepting point-to-point interface \"%s\"\n",
1258
/* Otherwise, reject non-broadcast-capable devices */
1259
if(not (flags & IFF_BROADCAST)){
1261
fprintf(stderr, "Rejecting non-broadcast interface \"%s\"\n",
1266
/* Reject non-ARP interfaces (including dummy interfaces) */
1267
if(flags & IFF_NOARP){
1269
fprintf(stderr, "Rejecting non-ARP interface \"%s\"\n",
1274
/* Accept this device */
1276
fprintf(stderr, "Interface \"%s\" is acceptable\n",
1332
1344
if(mc.current_server == NULL){
1334
fprintf(stderr, "Mandos plugin mandos-client: "
1335
1347
"Wait until first server is found. No timeout!\n");
1337
1349
ret = avahi_simple_poll_iterate(s, -1);
1340
fprintf(stderr, "Mandos plugin mandos-client: "
1341
"Check current_server if we should run it,"
1352
fprintf(stderr, "Check current_server if we should run it,"
1344
1355
/* the current time */
1551
1561
argp_state_help(state, state->out_stream,
1552
1562
ARGP_HELP_USAGE | ARGP_HELP_EXIT_ERR);
1553
1563
case 'V': /* --version */
1554
fprintf(state->out_stream, "Mandos plugin mandos-client: ");
1555
1564
fprintf(state->out_stream, "%s\n", argp_program_version);
1556
1565
exit(argp_err_exit_status);
1648
1657
struct dirent *direntry;
1649
1658
int numhooks = scandir(HOOKDIR, &direntries, runnable_hook,
1652
perror_plus("scandir");
1654
int devnull = open("/dev/null", O_RDONLY);
1655
for(int i = 0; i < numhooks; i++){
1656
direntry = direntries[0];
1657
char *fullname = NULL;
1658
ret = asprintf(&fullname, "%s/%s", tempdir,
1661
perror_plus("asprintf");
1664
pid_t hook_pid = fork();
1667
dup2(devnull, STDIN_FILENO);
1669
dup2(STDERR_FILENO, STDOUT_FILENO);
1670
ret = setenv("DEVICE", interface, 1);
1672
perror_plus("setenv");
1675
ret = setenv("VERBOSE", debug ? "1" : "0", 1);
1677
perror_plus("setenv");
1680
ret = setenv("MODE", "start", 1);
1682
perror_plus("setenv");
1686
ret = asprintf(&delaystring, "%f", delay);
1688
perror_plus("asprintf");
1691
ret = setenv("DELAY", delaystring, 1);
1694
perror_plus("setenv");
1698
ret = execl(fullname, direntry->d_name, "start", NULL);
1699
perror_plus("execl");
1702
if(TEMP_FAILURE_RETRY(waitpid(hook_pid, &status, 0)) == -1){
1703
perror_plus("waitpid");
1707
if(WIFEXITED(status)){
1708
if(WEXITSTATUS(status) != 0){
1709
fprintf(stderr, "Mandos plugin mandos-client: "
1710
"Warning: network hook \"%s\" exited"
1711
" with status %d\n", direntry->d_name,
1712
WEXITSTATUS(status));
1716
} else if(WIFSIGNALED(status)){
1717
fprintf(stderr, "Mandos plugin mandos-client: "
1718
"Warning: network hook \"%s\" died by"
1719
" signal %d\n", direntry->d_name,
1724
fprintf(stderr, "Mandos plugin mandos-client: "
1725
"Warning: network hook \"%s\" crashed\n",
1660
int devnull = open("/dev/null", O_RDONLY);
1661
for(int i = 0; i < numhooks; i++){
1662
direntry = direntries[0];
1663
char *fullname = NULL;
1664
ret = asprintf(&fullname, "%s/%s", tempdir,
1667
perror_plus("asprintf");
1670
pid_t hook_pid = fork();
1673
dup2(devnull, STDIN_FILENO);
1675
dup2(STDERR_FILENO, STDOUT_FILENO);
1676
setenv("DEVICE", interface, 1);
1677
setenv("VERBOSE", debug ? "1" : "0", 1);
1678
setenv("MODE", "start", 1);
1679
/* setenv( XXX more here */
1680
ret = execl(fullname, direntry->d_name, "start");
1681
perror_plus("execl");
1744
1695
if(interface[0] == '\0'){
1745
1696
struct dirent **direntries;
1746
/* First look for interfaces that are up */
1747
ret = scandir(sys_class_net, &direntries, up_interface,
1697
ret = scandir(sys_class_net, &direntries, good_interface,
1750
/* No up interfaces, look for any good interfaces */
1752
ret = scandir(sys_class_net, &direntries, good_interface,
1756
/* Pick the first interface returned */
1700
/* Pick the first good interface */
1757
1701
interface = strdup(direntries[0]->d_name);
1759
fprintf(stderr, "Mandos plugin mandos-client: "
1760
"Using interface \"%s\"\n", interface);
1703
fprintf(stderr, "Using interface \"%s\"\n", interface);
1762
1705
if(interface == NULL){
1763
1706
perror_plus("malloc");
1781
1723
srand((unsigned int) time(NULL));
1782
1724
mc.simple_poll = avahi_simple_poll_new();
1783
1725
if(mc.simple_poll == NULL){
1784
fprintf(stderr, "Mandos plugin mandos-client: "
1785
"Avahi: Failed to create simple poll object.\n");
1726
fprintf(stderr, "Avahi: Failed to create simple poll object.\n");
1786
1727
exitcode = EX_UNAVAILABLE;
1854
1795
if(strcmp(interface, "none") != 0){
1855
1796
if_index = (AvahiIfIndex) if_nametoindex(interface);
1856
1797
if(if_index == 0){
1857
fprintf(stderr, "Mandos plugin mandos-client: "
1858
"No such interface: \"%s\"\n", interface);
1798
fprintf(stderr, "No such interface: \"%s\"\n", interface);
1859
1799
exitcode = EX_UNAVAILABLE;
2147
2082
AVAHI_PROTO_UNSPEC, "_mandos._tcp",
2148
2083
NULL, 0, browse_callback, NULL);
2149
2084
if(sb == NULL){
2150
fprintf(stderr, "Mandos plugin mandos-client: "
2151
"Failed to create service browser: %s\n",
2085
fprintf(stderr, "Failed to create service browser: %s\n",
2152
2086
avahi_strerror(avahi_server_errno(mc.server)));
2153
2087
exitcode = EX_UNAVAILABLE;
2161
2095
/* Run the main loop */
2164
fprintf(stderr, "Mandos plugin mandos-client: "
2165
"Starting Avahi loop search\n");
2098
fprintf(stderr, "Starting Avahi loop search\n");
2168
2101
ret = avahi_loop_with_timeout(mc.simple_poll,
2169
2102
(int)(retry_interval * 1000));
2171
fprintf(stderr, "Mandos plugin mandos-client: "
2172
"avahi_loop_with_timeout exited %s\n",
2104
fprintf(stderr, "avahi_loop_with_timeout exited %s\n",
2173
2105
(ret == 0) ? "successfully" : "with error");
2179
fprintf(stderr, "Mandos plugin mandos-client: "
2180
"%s exiting\n", argv[0]);
2111
fprintf(stderr, "%s exiting\n", argv[0]);
2183
2114
/* Cleanup things */