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

  • Committer: Teddy Hogeborn
  • Date: 2008-08-09 15:56:13 UTC
  • mfrom: (24.1.29 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20080809155613-pm1o10yh44nafc0g
Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
 
67
67
#define BUFFER_SIZE 256
68
68
 
69
 
const char *argp_program_version = "mandos-client 1.0";
70
 
const char *argp_program_bug_address = "<mandos@fukt.bsnet.se>";
71
 
 
72
69
struct process;
73
70
 
74
71
typedef struct process{
147
144
  return fcntl(fd, F_SETFD, ret | FD_CLOEXEC);
148
145
}
149
146
 
 
147
const char *argp_program_version = "plugbasedclient 0.9";
 
148
const char *argp_program_bug_address = "<mandos@fukt.bsnet.se>";
 
149
 
150
150
process *process_list = NULL;
151
151
 
152
152
/* Mark a process as completed when it exits, and save its exit
606
606
          /* Bad exit by plugin */
607
607
          if(debug){
608
608
            if(WIFEXITED(proc->status)){
609
 
              fprintf(stderr, "Plugin %u exited with status %d\n",
610
 
                      (unsigned int) (proc->pid),
611
 
                      WEXITSTATUS(proc->status));
 
609
              fprintf(stderr, "Plugin %d exited with status %d\n",
 
610
                      proc->pid, WEXITSTATUS(proc->status));
612
611
            } else if(WIFSIGNALED(proc->status)) {
613
 
              fprintf(stderr, "Plugin %u killed by signal %d\n",
614
 
                      (unsigned int) (proc->pid),
615
 
                      WTERMSIG(proc->status));
 
612
              fprintf(stderr, "Plugin %d killed by signal %d\n",
 
613
                      proc->pid, WTERMSIG(proc->status));
616
614
            } else if(WCOREDUMP(proc->status)){
617
 
              fprintf(stderr, "Plugin %d dumped core\n",
618
 
                      (unsigned int) (proc->pid));
 
615
              fprintf(stderr, "Plugin %d dumped core\n", proc->pid);
619
616
            }
620
617
          }
621
618
          /* Remove the plugin */