Author Topic: Share Virusdefinition on MAC across Users  (Read 18593 times)

0 Members and 1 Guest are viewing this topic.

Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 957
  • or #f0; daa; add a,#a0; adc a,#40
Re: Share Virusdefinition on MAC across Users
« Reply #15 on: October 30, 2008, 03:16:03 PM »
Hello,
the problem is, that the first user updates the vps. On the next Day another user is the first and he makes the update. So all Users can Update the Definition.

regards,
spacetown


yes, that's why it's wise to select one user for those updates (and the rest simply gets his updated vps).
more exactly, the best is to disable updates for all users, and link their vps to some central location with user-read-only 400.vps, manipulated by superuser only.

simple cron script might do each few hours those simple steps:
- get http://files.avast.com/files/latest/mac/400vps.md5
- compare it with the md5 of current 400.vps
- if the same, just exit
- otherwise download http://files.avast.com/files/latest/mac/400.vps, and rename() it (using mv) to the 400.vps

for download, wget/lynx/links/elinks/whatever will do the job.

regards,
pc
May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)

spacetown

  • Guest
Re: Share Virusdefinition on MAC across Users
« Reply #16 on: November 09, 2008, 12:35:05 AM »
Hello,
thank you for the inspiration. ;)

I wrote 2 scripts, one StartAvast.sh starts the daemon , waits and then hides the windows with osascript-command (Applescript).

The second one makes the Update of /Users/Shared/400.vps. And then kills the Daemon so that the GUI will restart it. I made it with kill because I could not get the following to run.
you can make links to "central" 400.vps from the directories of each user. But, then, it would be good to run the daemon with -a switch, when the daemon automatically watches the relevant 400.vps file, and reloads the definitions when the file changes.

GUI will attach to any running daemon, what it needs is the response from the socket (sockets responds with initial message -> use it and don't start own daemon instance). thus, running daemon or more daemons in advance with "-a" and updating the central 400.VIP only is possible.
The Damon is started with another Tempfolder (uncommented part in StartAvast.sh) When the Update is done, the GUI shows the old Date of the Virusdefinition even after Apple+Q and restart. When I quit with daemon (Alt+Apple+Q) and then restart it, the new date is shown in the GUI. Does anybody has a idea

The call of the  Updatescript is made with cron. The first call in the Startscript is uncommented because when the call is made by a Automatoraction, the curl-call is suspended after downloading 400k of the vps.???
« Last Edit: November 10, 2008, 09:43:23 PM by spacetown »

Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 957
  • or #f0; daa; add a,#a0; adc a,#40
Re: Share Virusdefinition on MAC across Users
« Reply #17 on: November 12, 2008, 10:25:52 AM »
Hello,
thank you for the inspiration. ;)

I wrote 2 scripts, one StartAvast.sh starts the daemon , waits and then hides the windows with osascript-command (Applescript).

The second one makes the Update of /Users/Shared/400.vps. And then kills the Daemon so that the GUI will restart it. I made it with kill because I could not get the following to run.
you can make links to "central" 400.vps from the directories of each user. But, then, it would be good to run the daemon with -a switch, when the daemon automatically watches the relevant 400.vps file, and reloads the definitions when the file changes.

GUI will attach to any running daemon, what it needs is the response from the socket (sockets responds with initial message -> use it and don't start own daemon instance). thus, running daemon or more daemons in advance with "-a" and updating the central 400.VIP only is possible.
The Damon is started with another Tempfolder (uncommented part in StartAvast.sh) When the Update is done, the GUI shows the old Date of the Virusdefinition even after Apple+Q and restart. When I quit with daemon (Alt+Apple+Q) and then restart it, the new date is shown in the GUI. Does anybody has a idea

The call of the  Updatescript is made with cron. The first call in the Startscript is uncommented because when the call is made by a Automatoraction, the curl-call is suspended after downloading 400k of the vps.???

Hallo,

I bet that the "-a" switch works (it's based on timestamp, and thus, downloading brand new 400.vps as separate file, and doing mv (aka rename() syscall) is enough to trigger it). You can check it using separate connection to the daemon's socket (use telnet -u socket_path), that the banner shows new vps number.

well, gui doesn't know about it, and the vps string at the left upper corner  might stay the same. this can be solved also easily - shorten the daemon's timeout. after each timeout, gui reconnects to the daemon, and the VPS string is refreshed.

regards,
pc
May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)

Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 957
  • or #f0; daa; add a,#a0; adc a,#40
Re: Share Virusdefinition on MAC across Users
« Reply #18 on: December 06, 2010, 10:10:35 AM »
Hello,
the problem is, that the first user updates the vps. On the next Day another user is the first and he makes the update. So all Users can Update the Definition.

regards,
spacetown

the link is owned by the owner of trhe target file. Thus, only one preferred user will be able to update the 400.vps (and others will just use it when it's changed). btw. in the forthcomming version, this will get changed into one global common update system (as for windowsw, although it has some security quirks which make the solution more complicated, as it seems - simply said, global per-machine antivirus protection isn't by principle compatible with the UNIX user-separation view..)

regards,
pc

regards,
pc
May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)