/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: 2011-12-30 18:26:04 UTC
  • mto: This revision was merged to the branch mainline in revision 541.
  • Revision ID: teddy@recompile.se-20111230182604-9p8e7u03xd0n1u0c
* network-hooks.d/wireless.conf: Better example code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
 
171
171
/* Function to use when printing errors */
172
172
void perror_plus(const char *print_text){
 
173
  int e = errno;
173
174
  fprintf(stderr, "Mandos plugin %s: ",
174
175
          program_invocation_short_name);
 
176
  errno = e;
175
177
  perror(print_text);
176
178
}
177
179
 
1448
1450
          perror_plus("setenv");
1449
1451
          _exit(EX_OSERR);
1450
1452
        }
1451
 
        ret = setenv("VERBOSE", debug ? "1" : "0", 1);
 
1453
        ret = setenv("VERBOSITY", debug ? "1" : "0", 1);
1452
1454
        if(ret == -1){
1453
1455
          perror_plus("setenv");
1454
1456
          _exit(EX_OSERR);
1471
1473
          _exit(EX_OSERR);
1472
1474
        }
1473
1475
        free(delaystring);
 
1476
        if(connect_to != NULL){
 
1477
          ret = setenv("CONNECT", connect_to);
 
1478
          if(ret == -1){
 
1479
            perror_plus("setenv");
 
1480
            _exit(EX_OSERR);
 
1481
          }
 
1482
        }
1474
1483
        if(execl(fullname, direntry->d_name, mode, NULL) == -1){
1475
1484
          perror_plus("execl");
1476
1485
          _exit(EXIT_FAILURE);
1599
1608
        .group = 2 },
1600
1609
      { .name = "retry", .key = 132,
1601
1610
        .arg = "SECONDS",
1602
 
        .doc = "Retry interval used when denied by the mandos server",
 
1611
        .doc = "Retry interval used when denied by the Mandos server",
1603
1612
        .group = 2 },
1604
1613
      { .name = "network-hook-dir", .key = 133,
1605
1614
        .arg = "DIR",