ipa_netgroups.c revision 0368c4b1a1341889bb86a80887d4c91d224f339c
3382N/A along with this program. If not, see <http://www.gnu.org/licenses/>.
2046N/A#include "providers/ldap/sdap_async_private.h"
2046N/Astruct ipa_get_netgroups_state {
2731N/A const char *base_filter;
2537N/A int current_entity;
2537N/A int entities_found;
2537N/A int netgroups_count;
int ret;
size_t c;
&el);
goto fail;
if (!netgroup_attrs) {
goto fail;
if (ret) {
goto fail;
if (ret) {
goto fail;
if (ret) {
goto fail;
if (ret) {
goto fail;
&el);
goto fail;
if (ret) {
goto fail;
goto fail;
if (ret) {
goto fail;
return EOK;
fail:
return ret;
const char **attrs,
const char *filter,
int timeout)
int ret;
done:
return req;
return ENOMEM;
if (!subreq) {
return ENOMEM;
return EOK;
struct tevent_req);
struct ipa_get_netgroups_state);
int i, ret;
const char *orig_dn;
char *dn;
char *filter;
bool fetch_members = false;
if (ret) {
goto done;
if (netgroups_count == 0) {
goto done;
goto done;
for (i = 0; i < netgroups_count; i++) {
&ng_found);
&user_found);
&host_found);
goto done;
goto done;
goto done;
dn);
goto done;
fetch_members = true;
if (!fetch_members) {
goto done;
done:
char *filter;
const char *base_filter;
return ENOENT;
return ENOMEM;
return ENOMEM;
return EOK;
char *filter;
const char *base_filter;
return ENOENT;
return ENOMEM;
return ENOMEM;
return EOK;
const char **attrs;
char *filter;
const char *base_filter;
int ret;
return ENOENT;
return ENOMEM;
return ret;
return ENOMEM;
return EOK;
struct tevent_req);
struct ipa_get_netgroups_state);
int ret, i;
const char *orig_dn;
char *orig_dn_lower;
struct tevent_req *);
bool next_batch_scheduled = false;
if (ret) {
goto fail;
goto fail;
next_batch_scheduled = true;
goto fail;
for (i = 0; i < count; i++) {
goto fail;
goto fail;
goto fail;
if (next_batch_scheduled) {
if (next_call) {
fail:
struct sysdb_attrs);
struct extract_state {
const char *group;
const char **entries;
int entries_count;
int i, ret;
const char *member_type,
const char ***_ret_array,
int *_ret_count)
int process_count = 0;
int ret_count = 0;
int ret, i;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
ret_count++;
for (i = 0; i < process_count; i++) {
goto done;
done:
return ret;
int i, j, k, ret;
const char **members;
const char *member_name;
int uids_count = 0;
int hosts_count = 0;
const char *domain;
char *triple;
return ENOMEM;
goto done;
goto done;
for (j = 0; members[j]; j++) {
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
hosts_count++;
&domain);
goto done;
if (uids_count == 0) {
if (hosts_count == 0) {
for (j = 0; j < uids_count; j++) {
for (k = 0; k < hosts_count; k++) {
domain);
goto done;
goto done;
goto done;
done:
return ret;
struct ipa_get_netgroups_state);
if (reply_count) {
if (reply) {
return EOK;