ipa_subdomains_ext_groups.c revision 1412a7655c53452721d19813b0ab4a1afd2b0744
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa IPA Identity Backend Module for sub-domains - evaluate external group
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa Sumit Bose <sbose@redhat.com>
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa Copyright (C) 2013 Red Hat
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa This program is free software; you can redistribute it and/or modify
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa it under the terms of the GNU General Public License as published by
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa the Free Software Foundation; either version 3 of the License, or
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa (at your option) any later version.
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa This program is distributed in the hope that it will be useful,
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa but WITHOUT ANY WARRANTY; without even the implied warranty of
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa GNU General Public License for more details.
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa You should have received a copy of the GNU General Public License
e4d81151f4841a6354d043551a970418b32be02aEugen Kuksa along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "providers/ldap/ldap_common.h"
#include "providers/ldap/sdap_async.h"
#include "providers/ipa/ipa_subdomains.h"
struct ipa_ext_groups {
int ret;
size_t g;
size_t s;
size_t m;
const char **ext_sids;
const char **mof;
goto done;
goto done;
for (g = 0; g < reply_count; g++) {
goto done;
goto done;
/* hash_lookup does not modify key.str. */
goto done;
/* hash_enter does not modify m_key.str. */
goto done;
goto done;
goto done;
/* hash_enter does not modify m_key.str. */
goto done;
goto done;
done:
return ret;
const char *user_name,
char ***_groups)
int ret;
size_t c;
const char *sid;
return ENOMEM;
&result);
goto done;
user_name));
goto done;
goto done;
NULL);
sid));
goto done;
sid));
if (g_count == 0) {
goto done;
goto done;
goto done;
goto done;
goto done;
done:
return ret;
char **groups,
bool *missing_groups)
size_t c;
char *subfilter;
int ret;
*missing_groups = false;
return ENOMEM;
goto done;
groups[c]));
*missing_groups = true;
goto done;
goto done;
goto done;
groups[c]);
goto done;
goto done;
done:
return ret;
char **groups,
struct get_ad_membership_state {
char *user_name;
int dp_error;
const char *domain;
int *dp_error_out);
const char *domain)
int ret;
return NULL;
goto done;
goto done;
goto done;
struct ipa_ext_groups);
goto done;
goto done;
return req;
goto done;
goto done;
return req;
done:
return req;
struct tevent_req);
struct get_ad_membership_state);
int ret;
char *basedn;
goto fail;
goto fail;
goto fail;
fail:
struct tevent_req);
struct get_ad_membership_state);
int ret;
goto fail;
goto fail;
fail:
struct get_ad_membership_state);
int ret;
goto fail;
return EOK;
goto fail;
return EAGAIN;
fail:
return ret;
struct tevent_req);
struct get_ad_membership_state);
int ret;
struct get_ad_membership_state);
if (dp_error_out) {
return EOK;
struct add_ad_membership_state {
char **groups;
int dp_error;
char **groups,
int ret;
bool missing_groups = false;
return NULL;
goto done;
goto done;
if (!missing_groups) {
goto done;
goto done;
goto done;
return req;
done:
return req;
struct tevent_req);
struct add_ad_membership_state);
int ret;
struct add_ad_membership_state);
int ret;
bool missing_groups;
goto fail;
if (missing_groups) {
goto fail;
goto fail;
fail:
struct tevent_req);
struct add_ad_membership_state);
int ret;
int *dp_error_out)
struct add_ad_membership_state);
if (dp_error_out) {
return EOK;