ifp_groups.c revision 8fe171bf5a7a570591418e6548105f1d5a0097b3
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2015 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <talloc.h>
#include <tevent.h>
#include "util/strtonum.h"
#include "sbus/sssd_dbus_errors.h"
#include "responder/common/responder.h"
#include "responder/common/responder_cache_req.h"
#include "responder/ifp/ifp_groups.h"
#include "responder/ifp/ifp_users.h"
struct sss_domain_info *domain,
struct ldb_message *msg)
{
const char *gid;
return NULL;
}
}
const char *path,
struct sss_domain_info **_domain,
{
struct sss_domain_info *domain;
return ret;
}
goto done;
}
if (errno != 0) {
goto done;
}
done:
return ret;
}
void *data,
const char *name)
{
struct tevent_req *req;
return ERR_INTERNAL;
}
return ENOMEM;
}
return EOK;
}
static void
{
struct sbus_request *sbus_req;
struct sss_domain_info *domain;
struct ldb_result *result;
char *object_path;
"Group not found");
goto done;
goto done;
}
if (object_path == NULL) {
"Failed to compose object path");
goto done;
}
done:
return;
}
return;
}
void *data,
{
struct tevent_req *req;
return ERR_INTERNAL;
}
return ENOMEM;
}
return EOK;
}
static void
{
struct sbus_request *sbus_req;
struct sss_domain_info *domain;
struct ldb_result *result;
char *object_path;
"Group not found");
goto done;
goto done;
}
if (object_path == NULL) {
"Failed to compose object path");
goto done;
}
done:
return;
}
return;
}
void *data,
const char *filter,
{
return EOK;
}
void *data,
const char *domain,
const char *filter,
{
return EOK;
}
static errno_t
void *data,
struct sss_domain_info **_domain,
struct ldb_message **_group)
{
struct sss_domain_info *domain;
struct ldb_result *res;
return ERR_INTERNAL;
}
return ret;
}
}
} else {
}
}
}
}
}
return ret;
}
struct resolv_ghosts_state {
struct tevent_context *ev;
struct sbus_request *sbus_req;
void *data;
struct sss_domain_info *domain;
const char **ghosts;
int index;
};
struct tevent_context *ev,
struct sbus_request *sbus_req,
void *data)
{
struct resolv_ghosts_state *state;
struct sss_domain_info *domain;
struct tevent_req *req;
struct tevent_req *subreq;
struct ldb_message *group;
const char *name;
return NULL;
}
ret = ERR_INTERNAL;
goto immediately;
}
goto immediately;
}
ret = ERR_INTERNAL;
goto immediately;
}
goto immediately;
}
return req;
} else {
}
return req;
}
{
struct resolv_ghosts_state *state;
struct ldb_message_element *el;
struct ldb_message *group;
struct tevent_req *req;
goto done;
}
goto done;
}
if (el->num_values == 0) {
goto done;
}
goto done;
}
done:
}
}
{
struct resolv_ghosts_state *state;
struct tevent_req *subreq;
return EOK;
}
return ENOMEM;
}
return EAGAIN;
}
{
goto done;
}
done:
}
}
{
return EOK;
}
void *data)
{
struct tevent_req *subreq;
return ERR_INTERNAL;
}
return ENOMEM;
}
sbus_req);
return EOK;
}
{
struct sbus_request *sbus_req;
"Unable to resolve ghost members [%d]: %s\n",
return;
}
return;
}
void *data,
const char **_out)
{
struct ldb_message *msg;
struct sss_domain_info *domain;
return;
}
return;
}
void *data,
{
struct ldb_message *msg;
struct sss_domain_info *domain;
*_out = 0;
return;
}
return;
}
static errno_t
struct sbus_request *sbus_req,
void *data,
const char ***_users,
int *_num_users,
const char ***_groups,
int *_num_groups)
{
struct sss_domain_info *domain;
struct ldb_message *group;
struct ldb_message **members;
const char *class;
const char **users;
const char **groups;
int num_users;
int num_groups;
int i;
SYSDB_GIDNUM, NULL};
return ENOMEM;
}
goto done;
}
goto done;
}
if (num_members == 0) {
num_users = 0;
num_groups = 0;
goto done;
}
goto done;
}
goto done;
}
num_users = 0;
num_groups = 0;
for (i = 0; i < num_members; i++) {
NULL);
ret = ERR_INTERNAL;
goto done;
}
members[i]);
goto done;
}
num_users++;
goto done;
}
num_groups++;
} else {
ret = ERR_INTERNAL;
goto done;
}
}
done:
}
if (_num_users != NULL) {
*_num_users = num_users;
}
}
if (_num_groups != NULL) {
}
}
return ret;
}
void *data,
const char ***_out,
int *_size)
{
*_size = 0;
}
}
void *data,
const char ***_out,
int *_size)
{
*_size = 0;
}
}