~ubuntu-branches/ubuntu/karmic/rsyslog/karmic-200908151517

« back to all changes in this revision

Viewing changes to debian/patches/ignore_non_conf_files.patch

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2008-04-23 16:46:39 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080423164639-5acmt8a4vpxjgnxw
Tags: 3.14.2-3
* debian/rsyslog-doc.install
  - Fix a typo in the install path of the dia files. Closes: #477489
    Thanks to Justin B Rye for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: syslogd.c
2
 
===================================================================
3
 
--- syslogd.c   (Revision 864)
4
 
+++ syslogd.c   (Arbeitskopie)
5
 
@@ -3675,6 +3675,7 @@
6
 
        size_t iDirNameLen;
7
 
        size_t iFileNameLen;
8
 
        uchar szFullFileName[MAXFNAME];
9
 
+       uchar *ext = NULL;
10
 
 
11
 
        assert(pDirName != NULL);
12
 
 
13
 
@@ -3696,6 +3697,10 @@
14
 
                        continue; /* we are not interested in special files */
15
 
                if(res->d_name[0] == '.')
16
 
                        continue; /* these files we are also not interested in */
17
 
+               ext = strstr(res->d_name, ".conf");
18
 
+               if(ext == NULL || strlen(ext) != 5)
19
 
+                       continue; /* Ignore files not ending in *.conf */
20
 
+
21
 
                ++iEntriesDone;
22
 
                /* construct filename */
23
 
                iFileNameLen = strnlen(res->d_name, NAME_MAX);