Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+2
View File
@@ -0,0 +1,2 @@
This eCAP adapter checks HTTP request and response bodies using the ClamAV
antivirus library and denies access to messages with detected viruses.
+22
View File
@@ -0,0 +1,22 @@
# $NetBSD: Makefile,v 1.2 2016/06/23 15:17:28 prlw1 Exp $
DISTNAME= ecap_clamav_adapter-2.0.0
PKGREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.measurement-factory.com/tmp/ecap/
MAINTAINER= prlw1@cam.ac.uk
HOMEPAGE= http://www.e-cap.org/
COMMENT= eCAP ClamAV adapter
LICENSE= 2-clause-bsd
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config
CXXFLAGS+= -std=c++11
.include "../../security/clamav/buildlink3.mk"
.include "../../www/libecap/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+2
View File
@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST,v 1.1 2016/06/18 10:18:57 prlw1 Exp $
lib/ecap_clamav_adapter.la
+11
View File
@@ -0,0 +1,11 @@
$NetBSD: distinfo,v 1.2 2016/06/23 15:17:28 prlw1 Exp $
SHA1 (ecap_clamav_adapter-2.0.0.tar.gz) = 2aaf6c970db3622d1380d353c4c38b21b6aab769
RMD160 (ecap_clamav_adapter-2.0.0.tar.gz) = 1869b60b4de16ef0202fd86c47c053413948674d
SHA512 (ecap_clamav_adapter-2.0.0.tar.gz) = 882e66ad566220f68e59d41ea5c199af2745eaaa96610cdb7fe475811dbf87b01b5a6a97e6c9a729aecbf470aaae7082dbe502830aa88e86d32ae0d1acabde4b
Size (ecap_clamav_adapter-2.0.0.tar.gz) = 383682 bytes
SHA1 (patch-src_Pointers.h) = 9e9b562c12af401de15aeeddb595a9134d31e1d6
SHA1 (patch-src_Service.cc) = e14a4b29539c25f679b4f207cdd659ae752c0fac
SHA1 (patch-src_Service.h) = 5b4997278e7b67aa7ee4813ba5a7753e154cb2ae
SHA1 (patch-src_Xaction.cc) = bca8f15a1985b952f10c94a8c0c9953c91e4e310
SHA1 (patch-src_Xaction.h) = 59348fcc787fda5d0b80021526561faef44e285d
@@ -0,0 +1,25 @@
$NetBSD: patch-src_Pointers.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
https://bugs.launchpad.net/bugs/1595562
--- src/Pointers.h.orig 2015-11-08 18:07:35.000000000 +0000
+++ src/Pointers.h
@@ -5,15 +5,14 @@
#ifndef ECAP_CLAMAV_ADAPTER_POINTERS_H
#define ECAP_CLAMAV_ADAPTER_POINTERS_H
-#include <libecap/common/forward.h>
-#include <libecap/common/memory.h>
+#include <memory>
namespace Adapter {
class Xaction;
- typedef libecap::shared_ptr<Xaction> SharedXactionPointer;
- typedef libecap::weak_ptr<Xaction> XactionPointer;
+ typedef std::shared_ptr<Xaction> SharedXactionPointer;
+ typedef std::weak_ptr<Xaction> XactionPointer;
} // namespace Adapter
@@ -0,0 +1,33 @@
$NetBSD: patch-src_Service.cc,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
https://bugs.launchpad.net/bugs/1595562
--- src/Service.cc.orig 2015-11-09 01:12:46.000000000 +0000
+++ src/Service.cc
@@ -177,7 +177,7 @@ void Adapter::Service::setAll(const Opti
tmpFileNameTemplate = TmpFileNameTemplateDefault;
// TODO: convert to std::unique_ptr when we require C++11.
- const std::auto_ptr<TricklingConfig> oldTricklingConfig(tricklingConfig_);
+ const std::unique_ptr<TricklingConfig> oldTricklingConfig(tricklingConfig_);
tricklingConfig_ = new TricklingConfig();
Cfgtor cfgtor(*this);
@@ -339,7 +339,7 @@ Adapter::Service::MadeXactionPointer
Adapter::Service::makeXaction(libecap::host::Xaction *hostx)
{
checkpoint();
- const libecap::shared_ptr<Service> s = std::tr1::static_pointer_cast<Service>(self);
+ const std::shared_ptr<Service> s = std::static_pointer_cast<Service>(self);
SharedXactionPointer x(new Xaction(s, hostx));
x->self = x;
x->serviceRegistration = new Xactions::iterator(xactions->insert(xactions->end(), x));
@@ -385,7 +385,7 @@ Adapter::Service::tricklingConfig()
return *tricklingConfig_;
}
-void Adapter::Service::finalizeTricklingConfig(const std::auto_ptr<TricklingConfig> &oldConfig)
+void Adapter::Service::finalizeTricklingConfig(const std::unique_ptr<TricklingConfig> &oldConfig)
{
if (!tricklingConfig_->dropSize) {
// TODO: Warn if at least one other trickling option was explicitly configured.
@@ -0,0 +1,15 @@
$NetBSD: patch-src_Service.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
https://bugs.launchpad.net/bugs/1595562
--- src/Service.h.orig 2015-11-09 01:19:35.000000000 +0000
+++ src/Service.h
@@ -96,7 +96,7 @@ protected:
private:
void notifyTimeouts();
- void finalizeTricklingConfig(const std::auto_ptr<TricklingConfig> &oldConfig);
+ void finalizeTricklingConfig(const std::unique_ptr<TricklingConfig> &oldConfig);
void printTricklingConfig() const;
// either sets how long we can wait for resume() or returns false
@@ -0,0 +1,33 @@
$NetBSD: patch-src_Xaction.cc,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
https://bugs.launchpad.net/bugs/1595562
--- src/Xaction.cc.orig 2015-11-09 01:33:00.000000000 +0000
+++ src/Xaction.cc
@@ -89,7 +89,7 @@ void Adapter::MyAnswer::deliver()
DebugFun(flXaction) << "exiting " << this
-Adapter::Xaction::Xaction(libecap::shared_ptr<Service> aService,
+Adapter::Xaction::Xaction(std::shared_ptr<Service> aService,
libecap::host::Xaction *aHostX):
serviceRegistration(0),
service(aService),
@@ -347,7 +347,7 @@ void Adapter::Xaction::noteVbContentDone
vbFile->flush();
- libecap::shared_ptr<Antivirus> scanner = service->scanner;
+ std::shared_ptr<Antivirus> scanner = service->scanner;
Must(scanner);
if (service->makesAsyncXactions()) {
@@ -411,7 +411,7 @@ void Adapter::Xaction::useVirgin()
void Adapter::Xaction::useStored()
{
- libecap::shared_ptr<libecap::Message> adapted = hostx().virgin().clone();
+ std::shared_ptr<libecap::Message> adapted = hostx().virgin().clone();
Must(adapted != 0);
Must(adapted->body());
@@ -0,0 +1,32 @@
$NetBSD: patch-src_Xaction.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
https://bugs.launchpad.net/bugs/1595562
--- src/Xaction.h.orig 2015-11-09 01:18:50.000000000 +0000
+++ src/Xaction.h
@@ -13,7 +13,6 @@
#include <libecap/adapter/xaction.h>
#include <libecap/host/host.h>
#include <libecap/host/xaction.h>
-#include <libecap/common/memory.h>
#include <libecap/common/message.h>
#include <libecap/common/header.h>
#include <libecap/common/names.h>
@@ -47,7 +46,7 @@ private:
class Xaction: public libecap::adapter::Xaction, public Antivirus::User
{
public:
- Xaction(libecap::shared_ptr<Service> aService, libecap::host::Xaction *aHostX);
+ Xaction(std::shared_ptr<Service> aService, libecap::host::Xaction *aHostX);
virtual ~Xaction();
// meta-information for the host transaction
@@ -166,7 +165,7 @@ private:
void disconnect(); // expect no more notifications from Service or Host
- libecap::shared_ptr<const Service> service; // configuration access
+ std::shared_ptr<const Service> service; // configuration access
libecap::host::Xaction *hostx_; // host transaction representative
libecap::Area uri; // Request-URI from headers, for logging