Skip to content

Commit

Permalink
Merge pull request #5642 from xapi-project/private/linl/yangtze
Browse files Browse the repository at this point in the history
CA-393199: Disable external auth should clean pbis cache
  • Loading branch information
robhoes authored Jun 5, 2024
2 parents dc0c046 + c932279 commit d26cf25
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ocaml/xapi/extauth_plugin_ADpbis.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,14 @@ module AuthADlw : Auth_signature.AUTH_MODULE = struct
let on_disable config_params =
(* but in the ldap plugin, we should 'leave the AD/kerberos domain', i.e. we should *)
(* (1) remove the machine account from the kerberos realm, (2) remove the keytab locally *)

(* Clean pbis cache as we are disabling external auth and will leave domain *)
( try pbis_common "/opt/pbis/bin/ad-cache" ["--delete-all"] |> ignore
with e ->
Printexc.to_string e
|> debug "Got error cleaning pbis cache, ignore the error %s"
) ;

let pbis_failure =
try
( if
Expand Down

0 comments on commit d26cf25

Please sign in to comment.