Add function is_dc_trusted_domain_situation().
authorMichael Adam <obnox@samba.org>
Mon, 26 May 2008 10:05:21 +0000 (12:05 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 26 May 2008 14:42:24 +0000 (16:42 +0200)
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)

source3/include/proto.h
source3/passdb/passdb.c

index 3d72022b9a8cbc026abdcd44929228e9067bf4d4..0c770d866c2e9dfdd8d90da5f38f1e82cda31dce 100644 (file)
@@ -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);
index e3a3d3ca9e54c9ff89db8d02d3e4d391b57b4836..2df2a9c3ce99eb3b5fcf0ea49784d9414931172b 100644 (file)
@@ -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();
 }
 
 /*******************************************************************