| 56 | namespace impala { |
| 57 | |
| 58 | Status LdapSimpleBind::ValidateFlags() { |
| 59 | RETURN_IF_ERROR(ImpalaLdap::ValidateFlags()); |
| 60 | |
| 61 | const string excl_msg = "--$0 and --$1 are mutually exclusive and should not be set " |
| 62 | "together"; |
| 63 | |
| 64 | if (!FLAGS_ldap_domain.empty()) { |
| 65 | if (!FLAGS_ldap_baseDN.empty()) { |
| 66 | return Status(Substitute(excl_msg, "ldap_domain", "ldap_baseDN")); |
| 67 | } |
| 68 | if (!FLAGS_ldap_bind_pattern.empty()) { |
| 69 | return Status(Substitute(excl_msg, "ldap_domain", "ldap_bind_pattern")); |
| 70 | } |
| 71 | } else if (!FLAGS_ldap_baseDN.empty()) { |
| 72 | if (!FLAGS_ldap_bind_pattern.empty()) { |
| 73 | return Status(Substitute(excl_msg, "ldap_baseDN", "ldap_bind_pattern")); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | return Status::OK(); |
| 78 | } |
| 79 | |
| 80 | Status LdapSimpleBind::Init(const string& user_filter, const string& group_filter) { |
| 81 | RETURN_IF_ERROR(ImpalaLdap::Init(user_filter, group_filter)); |
nothing calls this directly
no test coverage detected