~ubuntu-branches/ubuntu/raring/clamav/raring

« back to all changes in this revision

Viewing changes to docs/html/node39.html

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran
  • Date: 2008-09-05 17:25:34 UTC
  • mfrom: (0.35.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080905172534-yi3f8fkye1o7u1r3
* New upstream version (closes: #497662, #497773)
  - lots of new options for clamd.conf
  - fixes CVEs CVE-2008-3912, CVE-2008-3913, CVE-2008-3914, and
    CVE-2008-1389
* No longer supports --unzip option, so typo is gone (closes: #496276)
* Translations:
  - sv (thanks Martin Bagge <brother@bsnet.se>) (closes: #491760)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8
8
<HTML>
9
9
<HEAD>
10
 
<TITLE>Database loading</TITLE>
11
 
<META NAME="description" CONTENT="Database loading">
 
10
<TITLE>API</TITLE>
 
11
<META NAME="description" CONTENT="API">
12
12
<META NAME="keywords" CONTENT="clamdoc">
13
13
<META NAME="resource-type" CONTENT="document">
14
14
<META NAME="distribution" CONTENT="global">
18
18
 
19
19
<LINK REL="STYLESHEET" HREF="clamdoc.css">
20
20
 
21
 
<LINK REL="next" HREF="node40.html">
22
 
<LINK REL="previous" HREF="node38.html">
23
 
<LINK REL="up" HREF="node37.html">
 
21
<LINK REL="next" HREF="node44.html">
 
22
<LINK REL="previous" HREF="node33.html">
 
23
<LINK REL="up" HREF="node31.html">
24
24
<LINK REL="next" HREF="node40.html">
25
25
</HEAD>
26
26
 
27
27
<BODY >
28
28
 
29
29
<DIV CLASS="navigation"><!--Navigation Panel-->
30
 
<A NAME="tex2html702"
 
30
<A NAME="tex2html709"
31
31
  HREF="node40.html">
32
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
33
 
<A NAME="tex2html698"
34
 
  HREF="node37.html">
 
33
<A NAME="tex2html705"
 
34
  HREF="node31.html">
35
35
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
36
 
<A NAME="tex2html692"
 
36
<A NAME="tex2html699"
37
37
  HREF="node38.html">
38
38
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
39
 
<A NAME="tex2html700"
 
39
<A NAME="tex2html707"
40
40
  HREF="node1.html">
41
41
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
42
42
<BR>
43
 
<B> Next:</B> <A NAME="tex2html703"
44
 
  HREF="node40.html">Error handling</A>
45
 
<B> Up:</B> <A NAME="tex2html699"
46
 
  HREF="node37.html">API</A>
47
 
<B> Previous:</B> <A NAME="tex2html693"
48
 
  HREF="node38.html">Header file</A>
49
 
 &nbsp; <B>  <A NAME="tex2html701"
 
43
<B> Next:</B> <A NAME="tex2html710"
 
44
  HREF="node40.html">Header file</A>
 
45
<B> Up:</B> <A NAME="tex2html706"
 
46
  HREF="node31.html">LibClamAV</A>
 
47
<B> Previous:</B> <A NAME="tex2html700"
 
48
  HREF="node38.html">Others</A>
 
49
 &nbsp; <B>  <A NAME="tex2html708"
50
50
  HREF="node1.html">Contents</A></B> 
51
51
<BR>
52
52
<BR></DIV>
53
53
<!--End of Navigation Panel-->
54
54
 
55
 
<H3><A NAME="SECTION00073200000000000000">
56
 
Database loading</A>
57
 
</H3>
58
 
    The following set of functions provides an interface for loading
59
 
    the virus database:
60
 
    <PRE>
61
 
        const char *cl_retdbdir(void);
62
 
 
63
 
        int cl_load(const char *path, struct cl_engine **engine,
64
 
                    unsigned int *signo, unsigned int options);
65
 
</PRE>
66
 
    <code>cl_retdbdir</code> returns the default (hardcoded) path to the directory
67
 
    with ClamAV databases.
68
 
    <code>cl_load</code> loads a single database file or all databases from a
69
 
    directory (if <code>path</code> points to a directory). The second argument
70
 
    is used for passing in the engine structure which should be previously
71
 
    initialized with NULL. A number of loaded signatures will be <SPAN  CLASS="textbf">added</SPAN>
72
 
    to <code>signo</code> <A NAME="tex2html15"
73
 
  HREF="footnode.html#foot291"><SUP><SPAN CLASS="arabic">7</SPAN></SUP></A>. The last argument can pass the following flags:
74
 
    
75
 
<UL>
76
 
<LI><SPAN  CLASS="textbf">CL_DB_STDOPT</SPAN>
77
 
<BR>
78
 
This is an alias for a recommended set of scan options.
79
 
</LI>
80
 
<LI><SPAN  CLASS="textbf">CL_DB_PHISHING</SPAN>
81
 
<BR>
82
 
Load phishing signatures.
83
 
</LI>
84
 
<LI><SPAN  CLASS="textbf">CL_DB_PHISHING_URLS</SPAN>
85
 
<BR>
86
 
Initialize the phishing detection module and load .wdb and .pdb files.
87
 
</LI>
88
 
<LI><SPAN  CLASS="textbf">CL_DB_PUA</SPAN>
89
 
<BR>
90
 
Load signatures for Potentially Unwanted Applications.
91
 
</LI>
92
 
<LI><SPAN  CLASS="textbf">CL_DB_CVDNOTMP</SPAN>
93
 
<BR>
94
 
Load CVD files directly without unpacking them into a temporary
95
 
        directory.
96
 
    
97
 
</LI>
 
55
<H2><A NAME="SECTION00073000000000000000">
 
56
API</A>
 
57
</H2>
 
58
 
 
59
<P>
 
60
<BR><HR>
 
61
<!--Table of Child-Links-->
 
62
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
 
63
 
 
64
<UL CLASS="ChildLinks">
 
65
<LI><A NAME="tex2html711"
 
66
  HREF="node40.html">Header file</A>
 
67
<LI><A NAME="tex2html712"
 
68
  HREF="node41.html">Database loading</A>
 
69
<LI><A NAME="tex2html713"
 
70
  HREF="node42.html">Error handling</A>
 
71
<LI><A NAME="tex2html714"
 
72
  HREF="node43.html">Engine structure</A>
98
73
</UL>
99
 
    <code>cl_load</code> returns 0 (<code>CL_SUCCESS</code>) on success and a negative
100
 
    value on failure.
101
 
    <PRE>
102
 
            ...
103
 
            struct cl_engine *engine = NULL;
104
 
            unsigned int sigs = 0;
105
 
            int ret;
106
 
 
107
 
        ret = cl_load(cl_retdbdir(), &amp;engine, &amp;sigs, CL_DB_STDOPT);
108
 
</PRE>
109
 
 
110
 
<P>
 
74
<!--End of Table of Child-Links-->
111
75
<BR><HR>
112
76
<ADDRESS>
113
77
Tomasz Kojm
114
 
2008-07-07
 
78
2008-09-01
115
79
</ADDRESS>
116
80
</BODY>
117
81
</HTML>