Merge from vendor branch GCC:
[dragonfly.git] / contrib / libpam / libpam_misc / include / security / pam_misc.h
1 /* $Id: pam_misc.h,v 1.3 2001/01/20 22:29:47 agmorgan Exp $ */
2
3 #ifndef __PAMMISC_H
4 #define __PAMMISC_H
5
6 #include <security/pam_appl.h>
7 #include <security/pam_client.h>
8
9 /* include some useful macros */
10
11 #include <security/_pam_macros.h>
12
13 /* functions defined in pam_misc.* libraries */
14
15 extern int misc_conv(int num_msg, const struct pam_message **msgm,
16                      struct pam_response **response, void *appdata_ptr);
17
18 #include <time.h>
19
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);
27 /*
28  * Environment helper functions
29  */
30
31 /* transcribe given environment (to pam) */
32 extern int pam_misc_paste_env(pam_handle_t *pamh
33                               , const char * const * user_env);
34
35 /* char **pam_misc_copy_env(pam_handle_t *pamh);
36
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.
40
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 . */
44
45 /* delete environment as obtained from (pam_getenvlist) */
46 extern char **pam_misc_drop_env(char **env);
47
48 /* provide something like the POSIX setenv function for the (Linux-)PAM
49  * environment. */
50
51 extern int pam_misc_setenv(pam_handle_t *pamh, const char *name
52                            , const char *value, int readonly);
53
54 #endif
55
56  
57