/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: 2013-10-28 10:04:05 UTC
  • Revision ID: teddy@recompile.se-20131028100405-u6miovq7y39m69x7
Doc fix: Refer to architecture libdir.

* debian/mandos-client.README.Debian: Refer to architecture libdir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
850
850
    {
851
851
      bool bad_name = false;
852
852
      
853
 
      const char * const bad_prefixes[] = { ".", "#", NULL };
 
853
      const char const *bad_prefixes[] = { ".", "#", NULL };
854
854
      
855
 
      const char * const bad_suffixes[] = { "~", "#", ".dpkg-new",
 
855
      const char const *bad_suffixes[] = { "~", "#", ".dpkg-new",
856
856
                                           ".dpkg-old",
857
857
                                           ".dpkg-bak",
858
858
                                           ".dpkg-divert", NULL };
859
 
#pragma GCC diagnostic push
860
 
#pragma GCC diagnostic ignored "-Wcast-qual"
861
 
      for(const char **pre = (const char **)bad_prefixes;
862
 
          *pre != NULL; pre++){
863
 
#pragma GCC diagnostic pop
 
859
      for(const char **pre = bad_prefixes; *pre != NULL; pre++){
864
860
        size_t pre_len = strlen(*pre);
865
861
        if((d_name_len >= pre_len)
866
862
           and strncmp((dirst->d_name), *pre, pre_len) == 0){
875
871
      if(bad_name){
876
872
        continue;
877
873
      }
878
 
#pragma GCC diagnostic push
879
 
#pragma GCC diagnostic ignored "-Wcast-qual"
880
 
      for(const char **suf = (const char **)bad_suffixes;
881
 
          *suf != NULL; suf++){
882
 
#pragma GCC diagnostic pop
 
874
      for(const char **suf = bad_suffixes; *suf != NULL; suf++){
883
875
        size_t suf_len = strlen(*suf);
884
876
        if((d_name_len >= suf_len)
885
877
           and (strcmp((dirst->d_name) + d_name_len-suf_len, *suf)
1079
1071
      goto fallback;
1080
1072
    }
1081
1073
    
1082
 
#if defined (__GNUC__) and defined (__GLIBC__)
1083
 
#if not __GLIBC_PREREQ(2, 16)
1084
 
#pragma GCC diagnostic push
1085
 
#pragma GCC diagnostic ignored "-Wsign-conversion"
1086
 
#endif
1087
 
#endif
1088
1074
    FD_SET(new_plugin->fd, &rfds_all); /* Spurious warning from
1089
 
                                          -Wconversion in GNU libc
1090
 
                                          before 2.16 */
1091
 
#if defined (__GNUC__) and defined (__GLIBC__)
1092
 
#if not __GLIBC_PREREQ(2, 16)
1093
 
#pragma GCC diagnostic pop
1094
 
#endif
1095
 
#endif
 
1075
                                          -Wconversion */
1096
1076
    
1097
1077
    if(maxfd < new_plugin->fd){
1098
1078
      maxfd = new_plugin->fd;
1152
1132
          }
1153
1133
          
1154
1134
          /* Remove the plugin */
1155
 
#if defined (__GNUC__) and defined (__GLIBC__)
1156
 
#if not __GLIBC_PREREQ(2, 16)
1157
 
#pragma GCC diagnostic push
1158
 
#pragma GCC diagnostic ignored "-Wsign-conversion"
1159
 
#endif
1160
 
#endif
1161
1135
          FD_CLR(proc->fd, &rfds_all); /* Spurious warning from
1162
 
                                          -Wconversion in GNU libc
1163
 
                                          before 2.16 */
1164
 
#if defined (__GNUC__) and defined (__GLIBC__)
1165
 
#if not __GLIBC_PREREQ(2, 16)
1166
 
#pragma GCC diagnostic pop
1167
 
#endif
1168
 
#endif
 
1136
                                          -Wconversion */
1169
1137
          
1170
1138
          /* Block signal while modifying process_list */
1171
1139
          ret = (int)TEMP_FAILURE_RETRY(sigprocmask
1211
1179
      }
1212
1180
      
1213
1181
      /* This process has not completed.  Does it have any output? */
1214
 
#if defined (__GNUC__) and defined (__GLIBC__)
1215
 
#if not __GLIBC_PREREQ(2, 16)
1216
 
#pragma GCC diagnostic push
1217
 
#pragma GCC diagnostic ignored "-Wsign-conversion"
1218
 
#endif
1219
 
#endif
1220
1182
      if(proc->eof or not FD_ISSET(proc->fd, &rfds)){ /* Spurious
1221
1183
                                                         warning from
1222
 
                                                         -Wconversion
1223
 
                                                         in GNU libc
1224
 
                                                         before
1225
 
                                                         2.16 */
1226
 
#if defined (__GNUC__) and defined (__GLIBC__)
1227
 
#if not __GLIBC_PREREQ(2, 16)
1228
 
#pragma GCC diagnostic pop
1229
 
#endif
1230
 
#endif
 
1184
                                                         -Wconversion */
1231
1185
        /* This process had nothing to say at this time */
1232
1186
        proc = proc->next;
1233
1187
        continue;