proxy.h revision ac3a1f3da772cf101101c31675c63dc3549b21b5
/*
SSSD
Proxy provider, private header file
Authors:
Sumit Bose <sbose@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 __PROXY_H__
#define __PROXY_H__
#include <nss.h>
#include <errno.h>
#include <pwd.h>
#include <grp.h>
#include <dlfcn.h>
#include <security/pam_appl.h>
#include <security/pam_modules.h>
#include "providers/dp_backend.h"
#include "proxy.h"
#include "sss_client/nss_compat.h"
#include <dhash.h>
struct proxy_nss_ops {
enum nss_status (*setpwent)(void);
enum nss_status (*endpwent)(void);
enum nss_status (*setgrent)(void);
enum nss_status (*endgrent)(void);
int *errnop);
struct __netgrent *result);
};
struct authtok_conv {
bool sent_old;
};
struct proxy_id_ctx {
int entry_cache_timeout;
struct proxy_nss_ops ops;
void *handle;
};
struct proxy_auth_ctx {
char *pam_target;
struct sbus_connection *sbus_srv;
int timeout_ms;
};
struct proxy_child_ctx {
struct proxy_auth_ctx *auth_ctx;
bool running;
struct sbus_connection *conn;
struct tevent_timer *timer;
struct tevent_req *init_req;
};
struct pc_init_ctx {
char *command;
struct tevent_timer *timeout;
struct tevent_signal *sige;
struct proxy_child_ctx *child_ctx;
struct sbus_connection *conn;
};
#define PROXY_CHILD_PIPE "private/proxy_child"
#define DEFAULT_BUFSIZE 4096
/* From proxy_common.c */
/* From proxy_id.c */
/* From proxy_auth.c */
/* From proxy_netgroup.c */
const char *name);
#endif /* __PROXY_H__ */