From 658f84ab0ca38986fd772ab8db82047448744db3 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Sun, 1 Apr 2018 20:02:59 +0800 Subject: [PATCH] MDL-61818 antivirus: Implement core_privacy API --- .../clamav/classes/privacy/provider.php | 46 +++++++++++++++++++ .../clamav/lang/en/antivirus_clamav.php | 1 + 2 files changed, 47 insertions(+) create mode 100644 lib/antivirus/clamav/classes/privacy/provider.php diff --git a/lib/antivirus/clamav/classes/privacy/provider.php b/lib/antivirus/clamav/classes/privacy/provider.php new file mode 100644 index 0000000000000..61ccf03633018 --- /dev/null +++ b/lib/antivirus/clamav/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for antivirus_clamav. + * + * @package antivirus_clamav + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace antivirus_clamav\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for antivirus_clamav implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements \core_privacy\local\metadata\null_provider { + + /** + * Get the language string identifier with the component's language + * file to explain why this plugin stores no data. + * + * @return string + */ + public static function get_reason() : string { + return 'privacy:metadata'; + } +} \ No newline at end of file diff --git a/lib/antivirus/clamav/lang/en/antivirus_clamav.php b/lib/antivirus/clamav/lang/en/antivirus_clamav.php index 7fa0d6f639ce6..18a5b8fb8078a 100644 --- a/lib/antivirus/clamav/lang/en/antivirus_clamav.php +++ b/lib/antivirus/clamav/lang/en/antivirus_clamav.php @@ -36,6 +36,7 @@ $string['pathtounixsocket'] = 'Unix domain socket'; $string['pathtounixsocketdesc'] = 'If the running method is set to "Unix domain socket", enter the path to ClamAV Unix socket here. On Debian Linux this will be /var/run/clamav/clamd.ctl. Please make sure that clamav daemon has read access to uploaded files, the easiest way to ensure that is to add \'clamav\' user to your webserver group (\'www-data\' on Debian Linux).'; $string['pluginname'] = 'ClamAV antivirus'; +$string['privacy:metadata'] = 'The ClamAV Antivirus plugin does not store any personal data.'; $string['quarantinedir'] = 'Quarantine directory'; $string['runningmethod'] = 'Running method'; $string['runningmethoddesc'] = 'Method of running ClamAV. Command line is used by default, however on Unix systems better performance can be obtained by using system sockets.';