mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-01-10 09:17:37 +03:00
add ldap-simple-attr from pmg
we also need it in pve Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
772038d440
commit
283ac2bae1
@ -265,6 +265,19 @@ sub pve_verify_ip {
|
||||
return $ip;
|
||||
}
|
||||
|
||||
PVE::JSONSchema::register_format('ldap-simple-attr', \&verify_ldap_simple_attr);
|
||||
sub verify_ldap_simple_attr {
|
||||
my ($attr, $noerr) = @_;
|
||||
|
||||
if ($attr =~ m/^[a-zA-Z0-9]+$/) {
|
||||
return $attr;
|
||||
}
|
||||
|
||||
die "value '$attr' does not look like a simple ldap attribute name\n" if !$noerr;
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
my $ipv4_mask_hash = {
|
||||
'0.0.0.0' => 0,
|
||||
'128.0.0.0' => 1,
|
||||
|
Loading…
Reference in New Issue
Block a user