/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: Björn Påhlsson
  • Date: 2011-11-27 20:07:55 UTC
  • mfrom: (505.3.15 client-network-hooks)
  • mto: This revision was merged to the branch mainline in revision 525.
  • Revision ID: belorn@recompile.se-20111127200755-g5nxb5vjrtyavg86
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
                                */
74
74
#include <unistd.h>             /* close(), SEEK_SET, off_t, write(),
75
75
                                   getuid(), getgid(), seteuid(),
76
 
                                   setgid(), pause() */
 
76
                                   setgid(), pause(), _exit() */
77
77
#include <arpa/inet.h>          /* inet_pton(), htons, inet_ntop() */
78
78
#include <iso646.h>             /* not, or, and */
79
79
#include <argp.h>               /* struct argp_option, error_t, struct
1412
1412
        ret = setenv("MANDOSNETHOOKDIR", hookdir, 1);
1413
1413
        if(ret == -1){
1414
1414
          perror_plus("setenv");
1415
 
          return false;
 
1415
          _exit(EX_OSERR);
1416
1416
        }
1417
1417
        ret = setenv("DEVICE", interface, 1);
1418
1418
        if(ret == -1){
1419
1419
          perror_plus("setenv");
1420
 
          return false;
 
1420
          _exit(EX_OSERR);
1421
1421
        }
1422
1422
        ret = setenv("VERBOSE", debug ? "1" : "0", 1);
1423
1423
        if(ret == -1){
1424
1424
          perror_plus("setenv");
1425
 
          return false;
 
1425
          _exit(EX_OSERR);
1426
1426
        }
1427
1427
        ret = setenv("MODE", mode, 1);
1428
1428
        if(ret == -1){
1429
1429
          perror_plus("setenv");
1430
 
          return false;
 
1430
          _exit(EX_OSERR);
1431
1431
        }
1432
1432
        char *delaystring;
1433
1433
        ret = asprintf(&delaystring, "%f", delay);
1434
1434
        if(ret == -1){
1435
1435
          perror_plus("asprintf");
1436
 
          return false;
 
1436
          _exit(EX_OSERR);
1437
1437
        }
1438
1438
        ret = setenv("DELAY", delaystring, 1);
1439
1439
        if(ret == -1){
1440
1440
          free(delaystring);
1441
1441
          perror_plus("setenv");
1442
 
          return false;
 
1442
          _exit(EX_OSERR);
1443
1443
        }
1444
1444
        free(delaystring);
1445
1445
        ret = execl(fullname, direntry->d_name, mode, NULL);