nsssrv_private.h revision f7257ab0bcea6c41fab5a4677787f3075ecdcb64
/*
SSSD
Authors:
Stephen Gallagher <sgallagh@redhat.com>
Copyright (C) 2010 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/>.
*/
#ifndef NSSSRV_PRIVATE_H_
#define NSSSRV_PRIVATE_H_
#include <dhash.h>
struct nss_cmd_ctx {
enum sss_cli_command cmd;
char *name;
char *secid;
bool immediate;
bool check_next;
bool enum_cached;
int saved_dom_idx;
int saved_cur;
};
struct dom_ctx {
struct sss_domain_info *domain;
struct ldb_result *res;
};
struct getent_ctx {
int num;
bool ready;
struct setent_req_list *reqs;
/* Netgroup-specific */
struct sysdb_netgroup_ctx **entries;
char *name;
char *domain;
bool found;
};
struct nss_dom_ctx {
struct nss_cmd_ctx *cmdctx;
struct sss_domain_info *domain;
/* For a case when we are discovering subdomains */
const char *rawname;
bool check_provider;
/* cache results */
struct ldb_result *res;
/* Netgroup-specific */
struct getent_ctx *netgr;
/* Service-specific */
const char *protocol;
};
struct setent_step_ctx {
struct nss_dom_ctx *dctx;
struct getent_ctx *getent_ctx;
bool check_next;
bool returned_to_mainloop;
/* Netgroup-specific */
char *name;
};
#define NSS_CMD_FATAL_ERROR(cctx) do { \
talloc_free(cctx); \
return; \
} while(0)
talloc_free(cctx); \
return ret; \
} while(0)
/* Finish the request */
struct getent_ctx *getent_ctx,
struct tevent_req *req);
struct ldb_result *res,
int req_type,
const char *opt_name,
void *pvt);
#endif /* NSSSRV_PRIVATE_H_ */