summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-04-18 13:22:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:25 -0500
commit4549efe6967cf8abeac3e275b37754e59d87af5c (patch)
treeb65c54ecbbe05f3e47b4cf51ea9492a5b61c44e3 /source3
parentbdbd173e8cbce94fbed217932e2c959d1ef4472d (diff)
downloadsamba-4549efe6967cf8abeac3e275b37754e59d87af5c.tar.gz
samba-4549efe6967cf8abeac3e275b37754e59d87af5c.tar.bz2
samba-4549efe6967cf8abeac3e275b37754e59d87af5c.zip
r15123: Don't even try to join with an inproper configuration.
Guenther (This used to be commit 22b687589785051eca16a868e3475f066b647ea7)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_ads.c7
-rw-r--r--source3/utils/net_rpc.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index dd53cc5289..6cd332fd3d 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -721,6 +721,13 @@ int net_ads_join(int argc, const char **argv)
const char *short_domain_name = NULL;
TALLOC_CTX *ctx = NULL;
+ if ((lp_server_role() != ROLE_DOMAIN_MEMBER) ||
+ (lp_server_role() != ROLE_DOMAIN_BDC)) {
+ d_printf("can only join as domain member or as BDC\n");
+ return -1;
+ }
+
+
if (argc > 0) {
org_unit = argv[0];
}
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 561be2a41e..efc9bfbfaf 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -389,6 +389,12 @@ static int rpc_join_usage(int argc, const char **argv)
int net_rpc_join(int argc, const char **argv)
{
+ if ((lp_server_role() != ROLE_DOMAIN_MEMBER) ||
+ (lp_server_role() != ROLE_DOMAIN_BDC)) {
+ d_printf("can only join as domain member or as BDC\n");
+ return -1;
+ }
+
if ((net_rpc_perform_oldjoin(argc, argv) == 0))
return 0;