diff options
author | Sumit Bose <sbose@redhat.com> | 2009-02-24 19:28:40 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-02-24 21:00:56 -0500 |
commit | 98531e56318b65eb1bb6883fdfe12e771d8a1efe (patch) | |
tree | a339a5948604ff62cfafd62a9682130f30df689e /server/responder/pam/pamsrv.h | |
parent | 4c6c0f77a505b6b0790cfa8eedd3133abebd4edb (diff) | |
download | sssd-98531e56318b65eb1bb6883fdfe12e771d8a1efe.tar.gz sssd-98531e56318b65eb1bb6883fdfe12e771d8a1efe.tar.xz sssd-98531e56318b65eb1bb6883fdfe12e771d8a1efe.zip |
Add PAM responder
Also move responders under server/responder with shared code
in server/responder/common
Signed-off-by: Simo Sorce <ssorce@redhat.com>
Diffstat (limited to 'server/responder/pam/pamsrv.h')
-rw-r--r-- | server/responder/pam/pamsrv.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/server/responder/pam/pamsrv.h b/server/responder/pam/pamsrv.h new file mode 100644 index 000000000..bb0082acc --- /dev/null +++ b/server/responder/pam/pamsrv.h @@ -0,0 +1,33 @@ +#include "sbus/sssd_dbus.h" +#include "responder/common/responder_cmd.h" + +#define PAM_DP_TIMEOUT 5000 + +#define DEBUG_PAM_DATA(level, pd) do { \ + if (level <= debug_level) pam_print_data(level, pd); \ +} while(0); + +struct pam_data { + int cmd; + uint32_t authtok_type; + uint32_t authtok_size; + uint32_t newauthtok_type; + uint32_t newauthtok_size; + char *domain; + char *user; + char *service; + char *tty; + char *ruser; + char *rhost; + uint8_t *authtok; + uint8_t *newauthtok; +}; + +void pam_print_data(int l, struct pam_data *pd); + +typedef void (*pam_dp_callback_t)(struct cli_ctx *cctx, int pam_status, char *domain); + +struct sbus_method *register_pam_dp_methods(void); +struct sss_cmd_table *register_sss_cmds(void); +int pam_dp_send_req(struct cli_ctx *cctx, pam_dp_callback_t callback, + int timeout, struct pam_data *pd); |