diff options
author | Michael Adam <obnox@samba.org> | 2008-05-26 12:05:21 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-05-26 16:42:24 +0200 |
commit | 4de01a909a0b632775866866ca0042a25cb5495e (patch) | |
tree | 97ce5078698ea0834d5d0f7719977d87e55cb7ee /source3 | |
parent | 09f55d0ef62391946b4f98737c788bce06f58a41 (diff) | |
download | samba-4de01a909a0b632775866866ca0042a25cb5495e.tar.gz samba-4de01a909a0b632775866866ca0042a25cb5495e.tar.bz2 samba-4de01a909a0b632775866866ca0042a25cb5495e.zip |
Add function is_dc_trusted_domain_situation().
This is like is_trusted_domain_situation() except that it does not
check for lp_allow_trusted_domains().
Michael
(This used to be commit a284c8843528972904d142b573f1170a08c97751)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/passdb/passdb.c | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 3d72022b9a..0c770d866c 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -6271,6 +6271,7 @@ bool pdb_copy_sam_account(struct samu *dst, struct samu *src ); bool pdb_update_bad_password_count(struct samu *sampass, bool *updated); bool pdb_update_autolock_flag(struct samu *sampass, bool *updated); bool pdb_increment_bad_password_count(struct samu *sampass); +bool is_dc_trusted_domain_situation(const char *domain_name); bool is_trusted_domain_situation(const char *domain_name); bool get_trust_pw_clear(const char *domain, char **ret_pwd, const char **account_name, uint32 *channel); diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index e3a3d3ca9e..2df2a9c3ce 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -1517,11 +1517,15 @@ bool pdb_increment_bad_password_count(struct samu *sampass) return True; } +bool is_dc_trusted_domain_situation(const char *domain_name) +{ + return IS_DC && !strequal(domain_name, lp_workgroup()); +} + bool is_trusted_domain_situation(const char *domain_name) { - return IS_DC && - lp_allow_trusted_domains() && - !strequal(domain_name, lp_workgroup()); + return is_dc_trusted_domain_situation(domain_name) && + lp_allow_trusted_domains(); } /******************************************************************* |