/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

todo

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
#include <fcntl.h>              /* fcntl(), F_GETFD, F_SETFD,
55
55
                                   FD_CLOEXEC */
56
56
#include <string.h>             /* strsep, strlen(), asprintf(),
57
 
                                   strsignal() */
 
57
                                   strsignal(), strcmp(), strncmp() */
58
58
#include <errno.h>              /* errno */
59
59
#include <argp.h>               /* struct argp_option, struct
60
60
                                   argp_state, struct argp,
771
771
      for(const char **suf = bad_suffixes; *suf != NULL; suf++){
772
772
        size_t suf_len = strlen(*suf);
773
773
        if((d_name_len >= suf_len)
774
 
           and (strcmp((dirst->d_name)+d_name_len-suf_len, *suf)
 
774
           and (strcmp((dirst->d_name) + d_name_len-suf_len, *suf)
775
775
                == 0)){
776
776
          if(debug){
777
777
            fprintf(stderr, "Ignoring plugin dir entry \"%s\""
968
968
      goto fallback;
969
969
    }
970
970
    
971
 
    FD_SET(new_plugin->fd, &rfds_all);
 
971
    FD_SET(new_plugin->fd, &rfds_all); /* Spurious warning from
 
972
                                          -Wconversion */
972
973
    
973
974
    if(maxfd < new_plugin->fd){
974
975
      maxfd = new_plugin->fd;
1028
1029
          }
1029
1030
          
1030
1031
          /* Remove the plugin */
1031
 
          FD_CLR(proc->fd, &rfds_all);
 
1032
          FD_CLR(proc->fd, &rfds_all); /* Spurious warning from
 
1033
                                          -Wconversion */
1032
1034
          
1033
1035
          /* Block signal while modifying process_list */
1034
1036
          ret = (int)TEMP_FAILURE_RETRY(sigprocmask
1074
1076
      }
1075
1077
      
1076
1078
      /* This process has not completed.  Does it have any output? */
1077
 
      if(proc->eof or not FD_ISSET(proc->fd, &rfds)){
 
1079
      if(proc->eof or not FD_ISSET(proc->fd, &rfds)){ /* Spurious
 
1080
                                                         warning from
 
1081
                                                         -Wconversion */
1078
1082
        /* This process had nothing to say at this time */
1079
1083
        proc = proc->next;
1080
1084
        continue;