Commit graph

18 commits

Author SHA1 Message Date
Micah Snyder
efd8ac5244 Manpages: Add environment variables to the docs
The CURL_CA_BUNDLE environment variable used by freshclam & clamsubmit to
specify a custom path to a CA bundle is undocumented.

Feature was added here: https://bugzilla.clamav.net/show_bug.cgi?id=12504

Resolves: https://github.com/Cisco-Talos/clamav/issues/175

Also document:
- clamd/clamscan: using LD_LIBRARY_PATH to find libclamunrar_iface.so/dylib
- sigtool: using SIGNDUSER, SIGNDPASS for auth creds when building CVD

This info also needs to be added to the online documentation.
2021-08-17 10:33:15 -07:00
Micah Snyder
854d38de54 Fix clamdscan, clamonacc --ping & --wait bugs
Default --wait timeout adjusted from 29 to 30 seconds.

--ping and --wait should exit with CL_ETIMEOUT (21) on timeout.

--ping should only return exit code 0 if clamd responds.

Silenced a couple switch fall-through warnings.

Added proc_fd_fname stack buffer to use with readlink, because the
pointers are restricted and using the same buffer with readlink could
result in undefined behavior.

Relocated clamonacc log verbosity initialization so early verbose log
messages will be printed.

Added a new status code for clamonacc startup checks so the --ping
feature can exit the process early with exit code 0.
2020-08-16 18:48:16 -07:00
Micah Snyder
9e08216c1a Update NEWS. Change 0.103.0-devel -> 0.104.0-rc
Update the NEWS to add and correct content prior to the release
candidate.

Changed the version string to have the -rc suffix.

Also fixed a couple of --help and manpage issues.
2020-08-13 13:34:47 -07:00
Micah Snyder (micasnyd)
9e20cdf6ea Add CMake build tooling
This patch adds experimental-quality CMake build tooling.

The libmspack build required a modification to use "" instead of <> for
header #includes. This will hopefully be included in the libmspack
upstream project when adding CMake build tooling to libmspack.

Removed use of libltdl when using CMake.

Flex & Bison are now required to build.

If -DMAINTAINER_MODE, then GPERF is also required, though it currently
doesn't actually do anything.  TODO!

I found that the autotools build system was generating the lexer output
but not actually compiling it, instead using previously generated (and
manually renamed) lexer c source. As a consequence, changes to the .l
and .y files weren't making it into the build. To resolve this, I
removed generated flex/bison files and fixed the tooling to use the
freshly generated files. Flex and bison are now required build tools.
On Windows, this adds a dependency on the winflexbison package,
which can be obtained using Chocolatey or may be manually installed.

CMake tooling only has partial support for building with external LLVM
library, and no support for the internal LLVM (to be removed in the
future). I.e. The CMake build currently only supports the bytecode
interpreter.

Many files used include paths relative to the top source directory or
relative to the current project, rather than relative to each build
target. Modern CMake support requires including internal dependency
headers the same way you would external dependency headers (albeit
with "" instead of <>). This meant correcting all header includes to
be relative to the build targets and not relative to the workspace.

For example, ...

```c
include "../libclamav/clamav.h"
include "clamd/clamd_others.h"
```

... becomes:

```c
// libclamav
include "clamav.h"

// clamd
include "clamd_others.h"
```

Fixes header name conflicts by renaming a few of the files.

Converted the "shared" code into a static library, which depends on
libclamav. The ironically named "shared" static library provides
features common to the ClamAV apps which are not required in
libclamav itself and are not intended for use by downstream projects.
This change was required for correct modern CMake practices but was
also required to use the automake "subdir-objects" option.
This eliminates warnings when running autoreconf which, in the next
version of autoconf & automake are likely to break the build.

libclamav used to build in multiple stages where an earlier stage is
a static library containing utils required by the "shared" code.
Linking clamdscan and clamdtop with this libclamav utils static lib
allowed these two apps to function without libclamav. While this is
nice in theory, the practical gains are minimal and it complicates
the build system. As such, the autotools and CMake tooling was
simplified for improved maintainability and this feature was thrown
out. clamdtop and clamdscan now require libclamav to function.

Removed the nopthreads version of the autotools
libclamav_internal_utils static library and added pthread linking to
a couple apps that may have issues building on some platforms without
it, with the intention of removing needless complexity from the
source. Kept the regular version of libclamav_internal_utils.la
though it is no longer used anywhere but in libclamav.

Added an experimental doxygen build option which attempts to build
clamav.h and libfreshclam doxygen html docs.

The CMake build tooling also may build the example program(s), which
isn't a feature in the Autotools build system.

Changed C standard to C90+ due to inline linking issues with socket.h
when linking libfreshclam.so on Linux.

Generate common.rc for win32.

Fix tabs/spaces in shared Makefile.am, and remove vestigial ifndef
from misc.c.

Add CMake files to the automake dist, so users can try the new
CMake tooling w/out having to build from a git clone.

clamonacc changes:
- Renamed FANOTIFY macro to HAVE_SYS_FANOTIFY_H to better match other
  similar macros.
- Added a new clamav-clamonacc.service systemd unit file, based on
  the work of ChadDevOps & Aaron Brighton.
- Added missing clamonacc man page.

Updates to clamdscan man page, add missing options.

Remove vestigial CL_NOLIBCLAMAV definitions (all apps now use
libclamav).

Rename Windows mspack.dll to libmspack.dll so all ClamAV-built
libraries have the lib-prefix with Visual Studio as with CMake.
2020-08-13 00:25:34 -07:00
Steven Morgan
166174bcf0 pull request #53(1/4): Spelling fix by klemens(ka7). 2016-10-19 12:26:33 -04:00
Steve Morgan
1feaa72a34 for allscan mode, update usage messages and man pages 2012-11-27 14:48:50 -08:00
Tomasz Kojm
2456a2bff4 fix manpage formatting 2012-05-07 14:11:12 +02:00
Tomasz Kojm
021b6720f5 update 'SEE ALSO' (bb#2006) 2010-05-06 17:02:53 +02:00
Tomasz Kojm
3295bc7a23 be more precise about --multiscan (bb#1869) 2010-03-18 16:26:56 +01:00
Tomasz Kojm
c2b6681b79 clamscan, clamdscan: add support for --file-list/-f
git-svn: trunk@5069
2009-05-21 13:43:05 +00:00
Török Edvin
8442a56d6f escape some more hyphens.
git-svn: trunk@4943
2009-03-13 15:44:53 +00:00
Török Edvin
394a3b00fd fix hyphen-used-as-minus-sign (bb #1471, thanks Michael Tautschnig <mt*debian.org>)
git-svn: trunk@4942
2009-03-13 15:36:30 +00:00
aCaB
408be01ffe add --stream
git-svn: trunk@4801
2009-02-17 00:08:17 +00:00
aCaB
ba2cf44051 updated clamd proto documentation
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4741 77e5149b-7576-45b1-b177-96237e5ba77b
2009-02-11 17:57:58 +00:00
aCaB
f17400cf3c docs updated
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4740 77e5149b-7576-45b1-b177-96237e5ba77b
2009-02-11 16:40:05 +00:00
Tomasz Kojm
c1c9d9f928 clamdscan: add support for --reload (bb#1098)
git-svn: trunk@4185
2008-09-18 08:17:47 +00:00
Török Edvin
c1a133a07b add file descriptor passing support to clamdscan (from contrib/clamd_fdscan)
git-svn: trunk@4080
2008-08-04 14:01:21 +00:00
Tomasz Kojm
a39ae4686d use actual version and user names in man pages (bb#408)
git-svn: trunk@2963
2007-03-21 02:12:51 +00:00
Renamed from docs/man/clamdscan.1 (Browse further)