summaryrefslogtreecommitdiffstats
path: root/server/responder/pam/pamsrv.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/responder/pam/pamsrv.h')
-rw-r--r--server/responder/pam/pamsrv.h33
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 0000000..bb0082a
--- /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);