X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=blobdiff_plain;f=PVE%2FAccessControl.pm;h=5ba3d3930fc24146402ac69e24851efb1b7f16d1;hp=3db2bff9e5dbaaf2e4cef014279fd9583d4543b5;hb=d8a56966bc59b873f861b2ad73e90b05afe7565a;hpb=af4a8a8522118cfd15b0c58f81d748a9184a0ef8 diff --git a/PVE/AccessControl.pm b/PVE/AccessControl.pm index 3db2bff..5ba3d39 100644 --- a/PVE/AccessControl.pm +++ b/PVE/AccessControl.pm @@ -899,7 +899,7 @@ sub write_domains { $wrote_default = 1; } elsif (defined($formats->{$k})) { if (!$formats->{$k}) { - $data .= "\t$k\n"; + $data .= "\t$k\n" if $v; } elsif ($v =~ m/^$formats->{$k}$/) { $v = PVE::Tools::encode_text($v) if $k eq 'comment'; $data .= "\t$k $v\n"; @@ -994,6 +994,8 @@ sub parse_domains { warn "ignoring domain '$realm' - missing user attribute\n"; } elsif (($entry->{type} eq "ldap") && !$entry->{base_dn}) { warn "ignoring domain '$realm' - missing base_dn attribute\n"; + } elsif (($entry->{type} eq "ad") && !$entry->{domain}) { + warn "ignoring domain '$realm' - missing domain attribute\n"; } else { $cfg->{$realm} = $entry; }