Endpoint Protection

 View Only
  • 1.  sav savap antivirus for centos 6.2

    Posted Feb 16, 2012 07:13 AM

    Hi all i've some trouble on compiling savap module for centos 6.2.

    my version of sav is1.0.12 and after installing the sav

    [root@localhost ap-kernelmodule-1.0.12-8]# cat /etc/redhat-release
    CentOS release 6.2 (Final)

    kernel version :2.6.32-220.el6.x86_64
    uname -a
    Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
     

    [root@localhost ap-kernelmodule-1.0.12-8]# ./build.sh
    Kernel release is not set, build the kernel modules for the current kernel release(2.6.32-220.el6.x86_64)
    Kernel headers/makefiles directory is not set, use the default /usr/src/kernels/2.6.32-220.el6.x86_64
    /tmp/rpm/ap-kernelmodule-1.0.12-8/symev /tmp/rpm/ap-kernelmodule-1.0.12-8
    rm -f *.o *.ko *.mod.c .*.cmd modules.order Module.symvers* Module.markers Modules.symvers *.ko.unsigned Makefile.xen
    rm -rf .tmp_versions* .build-*
    /tmp/rpm/ap-kernelmodule-1.0.12-8
    /tmp/rpm/ap-kernelmodule-1.0.12-8/symap /tmp/rpm/ap-kernelmodule-1.0.12-8
    rm -f *.o *.ko *.mod.c .*.cmd modules.order Module.symvers* Module.markers Modules.symvers *.ko.unsigned Makefile.xen symap_test
    rm -rf ../symev/.tmp_versions* .build-*
    /tmp/rpm/ap-kernelmodule-1.0.12-8
    /tmp/rpm/ap-kernelmodule-1.0.12-8/symev /tmp/rpm/ap-kernelmodule-1.0.12-8
    make -C /usr/src/kernels/2.6.32-220.el6.x86_64 M=/tmp/rpm/ap-kernelmodule-1.0.12-8/symev MODVERDIR=/tmp/rpm/ap-kernelmodule-1.0.12-8/symev/../symev/.tmp_versions-custom-2.6.32-220.el6-x86_64 modules
    make[1]: Entering directory `/usr/src/kernels/2.6.32-220.el6.x86_64'
      CC [M]  /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/symev.o
      CC [M]  /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/syscalls.o
      CC [M]  /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/fileops.o
      CC [M]  /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/hnfs.o
    /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/hnfs.c: In function ‘symev_nfsd4_proc_compound’:
    /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/hnfs.c:1256: error: implicit declaration of function ‘fh_init’
    make[2]: *** [/tmp/rpm/ap-kernelmodule-1.0.12-8/symev/hnfs.o] Error 1
    make[1]: *** [_module_/tmp/rpm/ap-kernelmodule-1.0.12-8/symev] Error 2
    make[1]: Leaving directory `/usr/src/kernels/2.6.32-220.el6.x86_64'
    make: *** [custom] Error 2
    /tmp/rpm/ap-kernelmodule-1.0.12-8
    Build was stopped due to error.

    and this is my error.

    What's the problem?

    [root@localhost ap-kernelmodule-1.0.12-8]# rpm -qa kernel-devel
    kernel-devel-2.6.32-220.el6.x86_64
    [root@localhost ap-kernelmodule-1.0.12-8]# rpm -qa kernel-headers
    kernel-headers-2.6.32-220.el6.x86_64

    thanks

    Andrea



  • 2.  RE: sav savap antivirus for centos 6.2

    Posted Feb 17, 2012 08:37 AM

    Ironically, I was working on this same issue, and was able to come up with a solution, late yesterday.  I'm not that well-versed in Linux, so if there's a more elegant way to execute this solution, feel free to change/update.

    The SAVAP build fails because it calls a function "fh_init", which should exist in the /include/linux/nfsd/nfsfh.h header file.  When checking the one in CentOS 6.2, the file seems to only "half-exist"... the part that defines this function is missing.  Interestingly enough, when looking at the "ap-kernelmodule-1.0.12-8" build folder from Symantec, there is an /include/linux/nfsd/ folder, which contains several .h files--all of which don't exist in the CentOS 6.2 build folders--as well as a nfsfh1.h file.  This file contains the remainder of the complete nfsfh.h file.

    I copied all of the .h files from that folder into the CentOS build folder (/usr/src/kernels/2.6.32-220.el6.i686/include/linux/nfsd in my case--I will be testing x86_64 today, but I don't see a reason why this should be different), and copied the contents from the nfsfh1.h file (after the #include <linux/nfsd/nfsfh.h> line and before the final #endif line) into the nfsfh.h file, before the #endif /* __KERNEL__ */ line.  I used http://lxr.free-electrons.com/source/include/linux/nfsd/nfsfh.h?v=2.6.32 as a reference.

    After this modification, the build completed successfully, and I have AutoProtect working properly on CentOS 6.2, tested successfully with an EICAR test.

    I hope this information helps you in your build.

    Darrel