From: Andreas Schneider Date: Wed, 28 Apr 2021 10:25:42 +0000 (+0200) Subject: s3:winbind: For 'security = ADS' require realm/workgroup to be set X-Git-Tag: tevent-0.11.0~956 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=757c49f6dc52afd6ee39c0b282e9a787b6df7a12;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Thu Apr 29 04:48:37 UTC 2021 on sn-devel-184 --- diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 02da60cb9fa..406aaaf4ecb 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -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); }