diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-12-13 11:19:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:29:15 -0500 |
commit | d471e52d23bf89e472c34c58dd9f113e669323a4 (patch) | |
tree | 45368b84653c14680c856cf54469e7e99ebb1720 /source4/nbt_server/register.c | |
parent | 5cc44027dc34812153831bd559e8fb7205d09328 (diff) | |
download | samba-d471e52d23bf89e472c34c58dd9f113e669323a4.tar.gz samba-d471e52d23bf89e472c34c58dd9f113e669323a4.tar.bz2 samba-d471e52d23bf89e472c34c58dd9f113e669323a4.zip |
r20149: Remove the smb.conf distinction between PDC and BDC. Now the correct
way to setup a Samba4 DC is to set 'server role = domain controller'.
We use the fSMORoleOwner attribute in the base DN to determine the PDC.
This patch is quite large, as I have corrected a number of places that
assumed taht we are always the PDC, or that used the smb.conf
lp_server_role() to determine that.
Also included is a warning fix in the SAMR code, where the IDL has
seperated a couple of types for group display enumeration.
We also now use the ldb database to determine if we should run the
global catalog service.
In the near future, I will complete the DRSUAPI
DsGetDomainControllerInfo server-side on the same basis.
Andrew Bartlett
(This used to be commit 67d8365e831adf3eaecd8b34dcc481fc82565893)
Diffstat (limited to 'source4/nbt_server/register.c')
-rw-r--r-- | source4/nbt_server/register.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/nbt_server/register.c b/source4/nbt_server/register.c index 64ceaffd9c..6e65b753b1 100644 --- a/source4/nbt_server/register.c +++ b/source4/nbt_server/register.c @@ -29,6 +29,7 @@ #include "librpc/gen_ndr/ndr_samr.h" #include "nbt_server/wins/winsserver.h" #include "librpc/gen_ndr/ndr_nbt.h" +#include "dsdb/samdb/samdb.h" static void nbtd_start_refresh_timer(struct nbtd_iface_name *iname); @@ -271,15 +272,14 @@ void nbtd_register_names(struct nbtd_server *nbtsrv) aliases++; } - switch (lp_server_role()) { - case ROLE_DOMAIN_PDC: - nbtd_register_name(nbtsrv, lp_workgroup(), NBT_NAME_PDC, nb_flags); - nbtd_register_name(nbtsrv, lp_workgroup(), NBT_NAME_LOGON, nb_flags | NBT_NM_GROUP); - break; - case ROLE_DOMAIN_BDC: - nbtd_register_name(nbtsrv, lp_workgroup(), NBT_NAME_LOGON, nb_flags | NBT_NM_GROUP); - default: - break; + if (lp_server_role() == ROLE_DOMAIN_CONTROLLER) { + BOOL is_pdc = samdb_is_pdc(nbtsrv->sam_ctx); + if (is_pdc) { + nbtd_register_name(nbtsrv, lp_workgroup(), + NBT_NAME_PDC, nb_flags); + } + nbtd_register_name(nbtsrv, lp_workgroup(), + NBT_NAME_LOGON, nb_flags | NBT_NM_GROUP); } nb_flags |= NBT_NM_GROUP; |