/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: 2014-02-16 13:12:20 UTC
  • mto: This revision was merged to the branch mainline in revision 656.
  • Revision ID: teddy@recompile.se-20140216131220-4nv9kjolkrxvn6l3
Tags: version-1.6.4-1
* Makefile (version): Changed to "1.6.4".
* NEWS (Version 1.6.4): New entry.
* debian/changelog (1.6.4-1): - '' -

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)