~ubuntu-branches/ubuntu/jaunty/clamav/jaunty-proposed

« back to all changes in this revision

Viewing changes to clamscan/manager.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman, Scott Kitterman, Jamie Strandboge, Michael Meskes, Stephen Gran, Michael Tautschnig
  • Date: 2009-07-30 15:00:14 UTC
  • mfrom: (63.1.1 jaunty-security)
  • Revision ID: james.westby@ubuntu.com-20090730150014-qb1o4cnekx2ajig0
Tags: 0.95.2+dfsg-4ubuntu1.1
* New upstream micro-version ugrade (LP: #394870)
* Upgrade packaging to karmic standard due to immaturity of 0.95 packaging
  when jaunty released:

[ Scott Kitterman ]
* Add the milter logrotate file to the list of purged files
  - Cherry picked from pkg-clamav git (thanks to Stephen Gran)
    0aebeb19f8169da097d21b021dd67ca06ffe3ca6

[ Jamie Strandboge ]
* update clamav-freshclam and clamav-daemon postinst to reload the
  individual AppArmor profiles instead of reloading all of AppArmor
  - LP: #397988

[ Michael Meskes ]
* Applied patch assembled by Christian Perrier <bubulle@debian.org>:
  - Debconf templates and debian/control reviewed by the debian-l10n-
    english team as part of the Smith review project. Closes: #523573
  - [Debconf translation updates]
    - Swedish. Closes: #525044
    - Japanese. Closes: #525084
    - French. Closes: #526024
    - Portuguese. Closes: #526644
    - Russian. Closes: #526727
    - German. Closes: #526730
    - Dutch. Closes: #526745
    - Galician. Closes: #527320
    - Basque. Closes: #530854
    - Finnish (closes: #534339)
* Made pid files word readable. There doesn't seem to be any sense in not
  doing this given that the information is available for everyone anyway.
  Closes: #527901

[ Stephen Gran ]
* Lots more milter maintainer script cleanups
* Don't abort dpkg on failed start (closes: #533397)
* Get rid of spurious patch downgrading version (closes: #533638)
* Should fix crash on unofficial sigs (closes: #525483)
* Get rid of ridiculous home rolled suid (closes: #522106)
* Freshclam gets 0400 or 0444 config file (closes: #524356)
* Debconf templates and debian/control reviewed by the debian-l10n-
  english team as part of the Smith review project. Closes: #523573
* [Debconf translation updates]
  - French (closes: #533667)
  - Portuguese (closes: #533779)
  - Russian (closes: #533548)
  - Swedish (closes: #533568)
  - Swedish. Closes: #525044
  - Japanese. Closes: #525084
  - French. Closes: #526024
  - Portuguese. Closes: #526644
  - Russian. Closes: #526727
  - German. Closes: #526730
  - Dutch. Closes: #526745
  - Galician. Closes: #527320
* Define status_of_proc in the event that it's not in lsb/init-functions
  (closes: #527903)
* Stop referencing /etc/default/clamav-milter and drop command line 
  arguments in milter init script (closes: #526123)
* Fix wrong variable useage in milter init script
* More work on clamav-milter's init script

[ Michael Tautschnig ]
* Unignored make check results on ia64, sparc (alpha still broken): tell
  electric-fence that the alignment is at least 8 bytes (thanks Aurelien
  Jarno).
* Fixed LogFile handling in clamav-milter.postinst (logrotation was broken) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
238
238
                    }
239
239
                    free(fname);
240
240
                }
241
 
 
242
241
            }
243
242
        }
244
243
    } else {
328
327
int scanmanager(const struct optstruct *opts)
329
328
{
330
329
        mode_t fmode;
331
 
        int ret = 0, fmodeint, i, x;
 
330
        int ret = 0, fmodeint, i;
332
331
        unsigned int options = 0, dboptions = 0;
333
332
        struct cl_engine *engine;
334
333
        struct stat sb;
335
334
        char *file, cwd[1024], *pua_cats = NULL;
 
335
        const char *filename;
336
336
        const struct optstruct *opt;
337
337
#ifndef C_WINDOWS
338
338
        struct rlimit rlim;
588
588
#endif
589
589
 
590
590
    /* check filetype */
591
 
    if(opts->filename == NULL) {
 
591
    if(!opts->filename && !optget(opts, "file-list")->enabled) {
592
592
        /* we need full path for some reasons (eg. archive handling) */
593
593
        if(!getcwd(cwd, sizeof(cwd))) {
594
594
            logg("!Can't get absolute pathname of current working directory\n");
596
596
        } else
597
597
            ret = scandirs(cwd, engine, opts, options, 1);
598
598
 
599
 
    } else if(!strcmp(opts->filename[0], "-")) { /* read data from stdin */
 
599
    } else if(opts->filename && !optget(opts, "file-list")->enabled && !strcmp(opts->filename[0], "-")) { /* read data from stdin */
600
600
        ret = scanstdin(engine, opts, options);
601
601
 
602
602
    } else {
603
 
        for (x = 0; opts->filename[x] && (file = strdup(opts->filename[x])); x++) {
 
603
        if(opts->filename && optget(opts, "file-list")->enabled)
 
604
            logg("^Only scanning files from --file-list (files passed at cmdline are ignored)\n");
 
605
 
 
606
        while((filename = filelist(opts, &ret)) && (file = strdup(filename))) {
604
607
            if((fmodeint = fileinfo(file, 2)) == -1) {
605
608
                logg("^Can't access file %s\n", file);
606
609
                perror(file);