diff options
-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(); } /******************************************************************* |