$func = $HOST_TYPE["$htype"]["getconfig"];
$logdets = unserialize(base64_decode($hconfig));
- $conf = $func($hip, $logdets["username"], $logdets["password"], $logdets["enable"]);
+ // now check enable, username and password bits for completeness
+ $need_user = false;
+ $need_pass = false;
+ $need_enable = false;
+
+ // this aint the right way.
+ if($logdets["username"] == "" && $_REQUEST["username"] == "") {
+ // we need a user
+ $need_user = true;
+ }
+ if($logdets["password"] == "" && $_REQUEST["password"] == "") {
+ // we need a user
+ $need_pass = true;
+ }
+ if($logdets["enable"] == "" && $_REQUEST["enable"] == "" && $HOST_TYPE["$htype"]["needsenable"]) {
+ $need_enable = true;
+ }
+
+ $conf = $func($hip, $act_user, $act_pass, $act_enable);
// function db_getMaxValue($tablename, $column, $columnsel="", $wheresel="")
$oldconf_rid = db_getMaxValue("configs", "configs_id", "hostip", "$hip");