1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

s3:winbind: For 'security = ADS' require realm/workgroup to be set

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14695

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Apr 29 04:48:37 UTC 2021 on sn-devel-184
This commit is contained in:
Andreas Schneider 2021-04-28 12:25:42 +02:00 committed by Andrew Bartlett
parent 3286828609
commit 757c49f6dc

View File

@ -1781,6 +1781,23 @@ int main(int argc, const char **argv)
daemon_sd_notifications(false);
}
if (lp_security() == SEC_ADS) {
const char *realm = lp_realm();
const char *workgroup = lp_workgroup();
if (workgroup == NULL || strlen(workgroup) == 0) {
DBG_ERR("For 'secuirity = ADS' mode, the 'workgroup' "
"parameter is required to be set!\n");
exit(1);
}
if (realm == NULL || strlen(realm) == 0) {
DBG_ERR("For 'secuirity = ADS' mode, the 'realm' "
"parameter is required to be set!\n");
exit(1);
}
}
if (!cluster_probe_ok()) {
exit(1);
}