support for CTDB functionality to join AD Domain (fate#312706)

Same patch as for SP3