optional => 1,
},
port => {
- description => "Server port",
+ description => "Server port. Use '0' if you want to use default settings'",
type => 'integer',
- minimum => 1,
+ minimum => 0,
maximum => 65535,
optional => 1,
},
if (defined($param->{secure})) {
$cfg->{$realm}->{secure} = $param->{secure} ? 1 : 0;
}
-
+
if ($param->{default}) {
foreach my $r (keys %$cfg) {
delete $cfg->{$r}->{default};
$cfg->{$realm}->{$p} = $param->{$p};
}
+ # port 0 ==> use default
+ if (defined($param->{port}) && !$param->{port}) {
+ delete $cfg->{$realm}->{port};
+ }
+
cfs_write_file($domainconfigfile, $cfg);
}, "add auth server failed");
optional => 1,
},
port => {
- description => "Server port",
+ description => "Server port. Use '0' if you want to use default settings'",
type => 'integer',
- minimum => 1,
+ minimum => 0,
maximum => 65535,
optional => 1,
},
$cfg->{$realm}->{$p} = $param->{$p};
}
+ # port 0 ==> use default
+ if (defined($param->{port}) && !$param->{port}) {
+ delete $cfg->{$realm}->{port};
+ }
+
cfs_write_file($domainconfigfile, $cfg);
}, "update auth server failed");
server1 => '[\w\d]+(.[\w\d]+)*',
server2 => '[\w\d]+(.[\w\d]+)*',
domain => '\S+',
- port => '\d*',
+ port => '\d+',
secure => '',
comment => '.*',
},
base_dn => '\w+=[\w\s]+(,\s*\w+=[\w\s]+)*',
user_attr => '\S{2,}',
secure => '',
- port => '\d*',
+ port => '\d+',
comment => '.*',
}
};