mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
s3:winbindd:idmap: add domain_has_idmap_config() helper function.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11786 Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
e8918a1ae2
commit
9d56304e32
@ -120,6 +120,21 @@ static bool idmap_init(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool domain_has_idmap_config(const char *domname)
|
||||
{
|
||||
int i;
|
||||
|
||||
idmap_init();
|
||||
|
||||
for (i=0; i<num_domains; i++) {
|
||||
if (strequal(idmap_domains[i]->name, domname)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool idmap_found_domain_backend(
|
||||
const char *string, regmatch_t matches[], void *private_data)
|
||||
{
|
||||
|
@ -330,6 +330,7 @@ void init_idmap_child(void);
|
||||
struct winbindd_child *idmap_child(void);
|
||||
struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
|
||||
const struct dom_sid *sid);
|
||||
bool domain_has_idmap_config(const char *domname);
|
||||
|
||||
/* The following definitions come from winbindd/winbindd_locator.c */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user