/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugin-runner.c

  • Committer: Teddy Hogeborn
  • Date: 2014-03-01 09:39:25 UTC
  • mto: (237.7.272 trunk)
  • mto: This revision was merged to the branch mainline in revision 311.
  • Revision ID: teddy@recompile.se-20140301093925-0x6nwf21f0zljk6e
* debian/copyright: Change year to "2014".
* mandos-ctl: - '' -
* mandos-monitor: - '' -
* plugins.d/mandos-client.xml: - '' -

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)