/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 plugin-runner.c

  • Committer: Teddy Hogeborn
  • Date: 2016-03-12 20:23:15 UTC
  • Revision ID: teddy@recompile.se-20160312202315-hu7b87ivetlxqbw3
Server: Fix minor thing with Python 3 compatibility

Fix another small thing with unpickling string values.

* mandos (main): When restoring pickled client data, only decode byte
                 string for "host" key if it really is a byte string.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include <sys/select.h>         /* fd_set, select(), FD_ZERO(),
38
38
                                   FD_SET(), FD_ISSET(), FD_CLR */
39
39
#include <sys/wait.h>           /* wait(), waitpid(), WIFEXITED(),
40
 
                                   WEXITSTATUS(), WTERMSIG() */
 
40
                                   WEXITSTATUS(), WTERMSIG(),
 
41
                                   WCOREDUMP() */
41
42
#include <sys/stat.h>           /* struct stat, fstat(), S_ISREG() */
42
43
#include <iso646.h>             /* and, or, not */
43
44
#include <dirent.h>             /* struct dirent, scandirat() */
1158
1159
                      (intmax_t) (proc->pid),
1159
1160
                      WTERMSIG(proc->status),
1160
1161
                      strsignal(WTERMSIG(proc->status)));
 
1162
            } else if(WCOREDUMP(proc->status)){
 
1163
              fprintf(stderr, "Plugin %s [%" PRIdMAX "] dumped"
 
1164
                      " core\n", proc->name, (intmax_t) (proc->pid));
1161
1165
            }
1162
1166
          }
1163
1167