Skip to content

Commit 794b271

Browse files
committed
CA-401274: Remove external auth limitation during set_hostname_live
Now we got winbind as the Active Direcotry backend, the joined netbios name is persisted in smb.conf, thus can be compatible with hostname change This commit just remove the set_hostname_live limitation Signed-off-by: Lin Liu <[email protected]>
1 parent cbdc58f commit 794b271

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

ocaml/xapi/xapi_host.ml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,21 +1337,7 @@ let serialize_host_enable_disable_extauth = Mutex.create ()
13371337

13381338
let set_hostname_live ~__context ~host ~hostname =
13391339
with_lock serialize_host_enable_disable_extauth (fun () ->
1340-
let current_auth_type =
1341-
Db.Host.get_external_auth_type ~__context ~self:host
1342-
in
1343-
(* the AD extauth plugin is incompatible with a hostname change *)
1344-
( if current_auth_type = Xapi_globs.auth_type_AD then
1345-
let current_service_name =
1346-
Db.Host.get_external_auth_service_name ~__context ~self:host
1347-
in
1348-
raise
1349-
(Api_errors.Server_error
1350-
( Api_errors.auth_already_enabled
1351-
, [current_auth_type; current_service_name]
1352-
)
1353-
)
1354-
) ;
1340+
13551341
(* hostname is valid if contains only alpha, decimals, and hyphen
13561342
(for hyphens, only in middle position) *)
13571343
let is_invalid_hostname hostname =

0 commit comments

Comments
 (0)