1 /* $Id: pam_misc.h,v 1.3 2001/01/20 22:29:47 agmorgan Exp $ */
6 #include <security/pam_appl.h>
7 #include <security/pam_client.h>
9 /* include some useful macros */
11 #include <security/_pam_macros.h>
13 /* functions defined in pam_misc.* libraries */
15 extern int misc_conv(int num_msg, const struct pam_message **msgm,
16 struct pam_response **response, void *appdata_ptr);
20 extern time_t pam_misc_conv_warn_time; /* time that we should warn user */
21 extern time_t pam_misc_conv_die_time; /* cut-off time for input */
22 extern const char *pam_misc_conv_warn_line; /* warning notice */
23 extern const char *pam_misc_conv_die_line; /* cut-off remark */
24 extern int pam_misc_conv_died; /* 1 = cut-off time reached (0 not) */
25 extern int (*pam_binary_handler_fn)(void *appdata, pamc_bp_t *prompt_p);
26 extern void (*pam_binary_handler_free)(void *appdata, pamc_bp_t *prompt_p);
28 * Environment helper functions
31 /* transcribe given environment (to pam) */
32 extern int pam_misc_paste_env(pam_handle_t *pamh
33 , const char * const * user_env);
35 /* char **pam_misc_copy_env(pam_handle_t *pamh);
37 This is no longer defined as a prototype because the X/Open XSSO
38 spec makes it clear that PAM's pam_getenvlist() does exactly
39 what this was needed for.
41 A wrapper is still provided in the pam_misc library - so that
42 legacy applications will still work. But _BE_WARNED_ it will
43 disappear by the release of libpam 1.0 . */
45 /* delete environment as obtained from (pam_getenvlist) */
46 extern char **pam_misc_drop_env(char **env);
48 /* provide something like the POSIX setenv function for the (Linux-)PAM
51 extern int pam_misc_setenv(pam_handle_t *pamh, const char *name
52 , const char *value, int readonly);