propertyList => {
type => { description => "Section type." },
section => {
- description => "Secion ID.",
+ description => "Section ID.",
type => 'string', format => 'pve-configid',
},
},
type => 'boolean',
default => 1,
},
+ custom_check => {
+ description => "Use Custom Check Script. The script has to take the defined arguments and can return Virus findings or a Spamscore.",
+ type => 'boolean',
+ default => 0,
+ },
+ custom_check_path => {
+ description => "Absolute Path to the Custom Check Script",
+ type => 'string', pattern => '^/([^/\0]+\/)+[^/\0]+$',
+ default => '/usr/local/bin/pmg-custom-check',
+ },
};
}
demo => { optional => 1 },
email => { optional => 1 },
http_proxy => { optional => 1 },
+ custom_check => { optional => 1 },
+ custom_check_path => { optional => 1 },
};
}
type => 'string',
},
clamav_heuristic_score => {
- description => "Score for ClamaAV heuristics (Google Safe Browsing database, PhishingScanURLs, ...).",
+ description => "Score for ClamAV heuristics (Google Safe Browsing database, PhishingScanURLs, ...).",
type => 'integer',
minimum => 0,
maximum => 1000,
default => 'database.clamav.net',
},
archiveblockencrypted => {
- description => "Wether to block encrypted archives. Mark encrypted archives as viruses.",
+ description => "Whether to block encrypted archives. Mark encrypted archives as viruses.",
type => 'boolean',
default => 0,
},
return $policy;
}
-sub pmg_verify_tls_policy_strict {
- my ($policy) = @_;
+PVE::JSONSchema::register_format(
+ 'tls-policy-strict', \&pmg_verify_tls_policy_strict);
- return $policy
- if ($policy =~ /^$VALID_TLS_POLICY_RE$/);
+sub pmg_verify_tls_policy_strict {
+ my ($policy, $noerr) = @_;
- return undef;
+ if ($policy !~ /^$VALID_TLS_POLICY_RE$/) {
+ return undef if $noerr;
+ die "value '$policy' does not look like a valid tls policy\n";
+ }
+ return $policy;
}
sub read_tls_policy {