linux-pam (1.5.3)
1 /* $Id$ */
2
3 #ifndef __PAMMISC_H
4 #define __PAMMISC_H
5
6 #include <security/pam_appl.h>
7 #include <security/pam_client.h>
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif /* __cplusplus */
12
13 /* include some useful macros */
14
15 #include <security/_pam_macros.h>
16
17 /* functions defined in pam_misc.* libraries */
18
19 extern int misc_conv(int num_msg, const struct pam_message **msgm,
20 struct pam_response **response, void *appdata_ptr);
21
22 #include <time.h>
23
24 extern time_t pam_misc_conv_warn_time; /* time that we should warn user */
25 extern time_t pam_misc_conv_die_time; /* cut-off time for input */
26 extern const char *pam_misc_conv_warn_line; /* warning notice */
27 extern const char *pam_misc_conv_die_line; /* cut-off remark */
28 extern int pam_misc_conv_died; /* 1 = cut-off time reached (0 not) */
29 extern int (*pam_binary_handler_fn)(void *appdata, pamc_bp_t *prompt_p);
30 extern void (*pam_binary_handler_free)(void *appdata, pamc_bp_t *prompt_p);
31 /*
32 * Environment helper functions
33 */
34
35 /* transcribe given environment (to pam) */
36 extern int pam_misc_paste_env(pam_handle_t *pamh
37 , const char * const * user_env);
38
39 /* delete environment as obtained from (pam_getenvlist) */
40 extern char **pam_misc_drop_env(char **env);
41
42 /* provide something like the POSIX setenv function for the (Linux-)PAM
43 * environment. */
44
45 extern int pam_misc_setenv(pam_handle_t *pamh, const char *name
46 , const char *value, int readonly);
47
48 #ifdef __cplusplus
49 }
50 #endif /* def __cplusplus */
51
52 #endif /* ndef __PAMMISC_H */