diff options
author | Fernando J V da Silva <fernandojvsilva@yahoo.com.br> | 2010-04-15 17:37:40 -0300 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-22 19:36:15 +1000 |
commit | 57bcdf008fa44d4c550819cbceada968b11be63c (patch) | |
tree | c404018cef84c2e07b26a48f7618cfa31b76c622 /source4/rpc_server/lsa | |
parent | c023fc217ed370e5c890c1984da533e0133060d9 (diff) | |
download | samba-57bcdf008fa44d4c550819cbceada968b11be63c.tar.gz samba-57bcdf008fa44d4c550819cbceada968b11be63c.tar.bz2 samba-57bcdf008fa44d4c550819cbceada968b11be63c.zip |
s4-drs: samdb_is_rodc() function and new samdb_rodc() function
This patch creates the samdb_is_rodc() function, which looks for
the NTDSDSA object for a DC that has a specific invocationId
and if msDS-isRODC is present on such object and it is TRUE, then
consider the DC as a RODC.
The new samdb_rodc() function uses the samdb_is_rodc() function
for the local server.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/rpc_server/lsa')
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index 792b016e93..e683348140 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -1636,6 +1636,7 @@ static NTSTATUS setInfoTrustedDomain_base(struct dcesrv_call_state *dce_call, bool del_incoming = false; bool in_transaction = false; int ret; + bool am_rodc; switch (level) { case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: @@ -1697,7 +1698,8 @@ static NTSTATUS setInfoTrustedDomain_base(struct dcesrv_call_state *dce_call, } } - if (samdb_rodc(p_state->sam_ldb)) { + ret = samdb_rodc(p_state->sam_ldb, &am_rodc); + if (ret == LDB_SUCCESS && am_rodc) { return NT_STATUS_NO_SUCH_DOMAIN; } |