Mcafee AutoUpdate Script

Julian Field jkf at ecs.soton.ac.uk
Mon Feb 11 11:49:23 GMT 2002


At 21:53 08/02/2002, you wrote:
>Got it.  When I set the machine up I put the DAT's I manually downloaded
>into the DAT directory like uvscan requests.

I have just improved the mcafee autoupdate script so it will delete any
"dat" directory that is (wrongly) there before it causes trouble.

>-----Original Message-----
>From: Lawrence E. Bartash/NPCUSA Engineering [mailto:lawbar at NPCUSA.COM]
>Sent: Friday, February 08, 2002 1:48 PM
>To: MAILSCANNER at JISCMAIL.AC.UK
>Subject: Re: Mcafee AutoUpdate Script
>
>
>OK it looks like /usr/local/mcafee/dat
>is actually a directory on your system.
>It should NOT be.
>
>rm -Rf /usr/local/mcafee/dat
>
>ln -s /usr/local/mcafee/20020208 /usr/local/mcafee/dat
>
>rm -Rf /usr/local/mcafee/20020208
>
>then run autoupdate again. Lets see the output again.
>
>-----Original Message-----
>From: Steve Evans [mailto:sevans at FOUNDATION.SDSU.EDU]
>Sent: Friday, February 08, 2002 3:38 PM
>To: MAILSCANNER at JISCMAIL.AC.UK
>Subject: Re: Mcafee AutoUpdate Script
>
>
>Here is the output.
>
>[root at skywalker mcafee]# ./autoupdate
>
>
>A target has not been specified for scanning!
>/bin/rm: `/usr/local/mcafee/dat' is a directory /usr/local/mcafee/dat
>
>/usr/local/mcafee/20020208
>
>
>And here is the part of the script I modified
>
># if we've got this far then the update works so link it to
># where the virus scanner will look for it
>
>chdir $mcafeeroot or &BailOut("Cannot cd $mcafeeroot, $!");
>my($OldLinkTarget) = readlink($DATlink);
>&LockMcafee();
>system("$rm -f $DATlink");
>system("ln -s $DATdir $DATlink");
>#unlink $DATlink if -l $DATlink;
>#symlink $DATdir, $DATlink;
>
>
>Thanks,
>Steve
>
>-----Original Message-----
>From: Lawrence E. Bartash/NPCUSA Engineering [mailto:lawbar at NPCUSA.COM]
>Sent: Friday, February 08, 2002 1:31 PM
>To: MAILSCANNER at JISCMAIL.AC.UK
>Subject: Re: Mcafee AutoUpdate Script
>
>
>OK If you're a brave sole try this.
>
>Edit the autoupdate script
>
>---------------------
># if we've got this far then the update works so link it to
># where the virus scanner will look for it
>
>chdir $mcafeeroot or &BailOut("Cannot cd $mcafeeroot, $!");
>my($OldLinkTarget) = readlink $DATlink;
>&LockMcafee();
>system("$rm -f $DATlink");
>system("ln -s $DATdir $DATlink");
>#unlink $DATlink;
>#symlink $DATdir, $DATlink;
>---------------------
>
>Find the lines above that do the unlink and symlink and put #'s in front
>of them. Insert system calls like I show above. Save the autoupdate
>script. rm -Rf the existing 20020208 dat directory and run ./autoupdate
>from the command line again.
>
>If the rm -f $DATlink has a problem the system call will show an error
>to stderr (console). If the ln -s $DATdir $DATlink has a problem you
>will see that error as well.
>
>Let us know the output exactly!
>
>-----Original Message-----
>From: Steve Evans [mailto:sevans at FOUNDATION.SDSU.EDU]
>Sent: Friday, February 08, 2002 3:21 PM
>To: MAILSCANNER at JISCMAIL.AC.UK
>Subject: Re: Mcafee AutoUpdate Script
>
>
>Tried it.  No success.
>
>Steve
>
>-----Original Message-----
>From: Lawrence E. Bartash/NPCUSA Engineering [mailto:lawbar at NPCUSA.COM]
>Sent: Friday, February 08, 2002 1:15 PM
>To: MAILSCANNER at JISCMAIL.AC.UK
>Subject: Re: Mcafee AutoUpdate Script
>
>
>Hmm, If I rm -Rf /usr/local/mcafee/20020208
>then run autoupdate
>I get the following output.
>
> > /usr/local/mcafee/autoupdate
>A target has not been specified for scanning! /usr/local/mcafee/dat
>/usr/local/mcafee/20020208 /usr/local/mcafee/20020208
>
>Notice the three lines printed after the uvscan error message. The first
>one is the DATlink (should always be /usr/local/mcafee/dat) The second
>is the OldLinkTarget (what previous version of the dat you were
>using)
>The third is the new DATdir. (the newly downloaded and untarred version)
>
>The DATlink should point at DATdir. The OldLinkTarget should be deleted
>if its really an old one.
>
>In your post it shows only one line (I can't match it up to tell if
>that's OldLinkTarget or Datdir. In my example the OldLinkTarget is the
>same because I had no previous version. I just deleted the 20020208
>directory and ran the script again. However ALL three lines should
>print. You might have to make the symlink the first time but that should
>not be necessary.
>
>Try it anyway
>
>cd /usr/local/mcafee
>ln -s 20020208 dat
>
>That way your uvscan will work when mailscanner tries to use it.
>
>To test my theory,
>Do a rm -Rf /usr/local/mcafee/20020208
>
>Then run autoupdate again. If you get the same printout as I got above
>then it should work later when the newer dat files come out. If that's
>the case then your system won't make the initial symlink the first time
>around. Yuk. Let us know!.
>
>Good Luck.
>
>-----Original Message-----
>From: Steve Evans [mailto:sevans at FOUNDATION.SDSU.EDU]
>Sent: Friday, February 08, 2002 1:59 PM
>To: MAILSCANNER at JISCMAIL.AC.UK
>Subject: Re: Mcafee AutoUpdate Script
>
>
>Nope, no link.
>
>Steve
>
>         -----Original Message-----
>         From: Lawrence E. Bartash/NPCUSA Engineering
>[mailto:lawbar at NPCUSA.COM]
>         Sent: Fri 2/8/2002 11:27 AM
>         To: MAILSCANNER at JISCMAIL.AC.UK
>         Cc:
>         Subject: Re: Mcafee AutoUpdate Script
>
>
>
>         ls -l /usr/local/mcafee/dat
>
>         It should show something like this below!
>
>         lrwxrwxrwx    1 root     root           26 Feb  8 04:02
>         /usr/local/mcafee/dat -> /usr/local/mcafee/20020208
>
>
>         -----Original Message-----
>         From: Steve Evans [mailto:sevans at FOUNDATION.SDSU.EDU]
>         Sent: Friday, February 08, 2002 1:23 PM
>         To: MAILSCANNER at JISCMAIL.AC.UK
>         Subject: Re: Mcafee AutoUpdate Script
>
>
>         I'm not really strong with Unix so could you tell me how I could
>check that.
>
>         Steve
>
>         -----Original Message-----
>         From: Lawrence E. Bartash/NPCUSA Engineering
>[mailto:lawbar at NPCUSA.COM]
>         Sent: Friday, February 08, 2002 11:22 AM
>         To: MAILSCANNER at JISCMAIL.AC.UK
>         Subject: Re: Mcafee AutoUpdate Script
>
>
>         Check to see if /usr/local/mcafee/dat is now a symlink
>         To your /usr/local/mcafee/20020208
>
>         The script should relink it each time it untars a new dat file
>archive.
>
>         The error message "A target has not been specified for scanning"
>is a normal
>         error message printed out by uvscan when the autoupdate script
>tests the dat
>         files to see if they work. Since the test is actually scanning
>nothing, it
>         returns the message!
>
>         Hope this helps.
>
>         -----Original Message-----
>         From: Steve Evans [mailto:sevans at FOUNDATION.SDSU.EDU]
>         Sent: Friday, February 08, 2002 1:14 PM
>         To: MAILSCANNER at JISCMAIL.AC.UK
>         Subject: Re: Mcafee AutoUpdate Script
>
>
>         Those changes are there.  When I run autoupdate here is what is
>returned.
>
>         [root at yoda mcafee]# ./autoupdate
>
>
>         A target has not been specified for scanning!
>/usr/local/mcafee/dat
>
>         /usr/local/mcafee/20020208
>
>
>         The tar is copied and extracted to 20020208 but they're not
>being moved over
>         to the DAT directory.
>
>         Steve
>
>         -----Original Message-----
>         From: Stuart Luppescu [mailto:s-luppescu at UCHICAGO.EDU]
>         Sent: Friday, February 08, 2002 8:34 AM
>         To: MAILSCANNER at JISCMAIL.AC.UK
>         Subject: Re: Mcafee AutoUpdate Script
>
>
>         On  $B6b (J, 2002-02-08 at 09:41, Steve Evans wrote:
>         > Yes.  I used the RPM.  That should have the updated script
>right?
>
>         One would expect, but who knows? Here is what you have to change
>to get this
>         to work (from a message on this list on 15 Jan from Lawrence E.
>Bartash --
>         gotta give credit where credit is due):
>
>
>------------------------------------------------------------------------
>         ---
>         OK I got this one fixed.
>         Taking braces out does absolutely nothing.
>         I changed the perl calls to system calls temporarily and noticed
>that
>         $DATlink had a trailing / on it. Very bad, perl doesn't barf on
>this! :-(
>         therefore the real fix is on line 39
>         <my($DATlink) = "$mcafeeroot/dat/";
>         >my($DATlink) = "$mcafeeroot/dat";
>
>         also line 123 needs to be changed
>         <print "DATDir\n";
>         >print "DATdir\n";
>
>         --
>         Stuart Luppescu -=- s-luppescu at uchicago.edu
>         University of Chicago -=- CCSR
>          $B:MJ8$HCRF`H~$NIc (J -=-    Kernel 2.4.14-xfs
>         Si jeunesse savait, si vieillesse pouvait.  [If
>          youth but knew, if old age but could.]   -- Henri
>          Estienne

--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ



More information about the MailScanner mailing list