1 /* $Id: pam_misc.h,v 1.1 2000/09/12 20:19:41 will Exp $ */
2 
3 /* $Log: pam_misc.h,v $
4  * Revision 1.1  2000/09/12 20:19:41  will
5  * Initial revision
6  *
7  * Revision 1.1.1.1  1998/07/12 05:17:15  morgan
8  * Linux PAM sources pre-0.66
9  *
10  * Revision 1.3  1997/01/04 20:15:52  morgan
11  * added timeout to misc_conv
12  *
13  * Revision 1.2  1996/12/01 03:27:00  morgan
14  * add env prototypes
15  *
16  * Revision 1.1  1996/07/06 19:31:38  morgan
17  * Initial revision
18  *
19  * Revision 1.1  1996/07/06 19:16:30  morgan
20  * Initial revision
21  */
22 
23 #ifndef __PAMMISC_H
24 #define __PAMMISC_H
25 
26 #include <security/pam_appl.h>
27 
28 /* functions defined in pam_misc.* libraries */
29 
30 extern int misc_conv(int num_msg, const struct pam_message **msgm,
31 		     struct pam_response **response, void *appdata_ptr);
32 
33 #include <time.h>
34 
35 extern time_t pam_misc_conv_warn_time; /* time that we should warn user */
36 extern time_t pam_misc_conv_die_time;         /* cut-off time for input */
37 extern const char *pam_misc_conv_warn_line;           /* warning notice */
38 extern const char *pam_misc_conv_die_line;            /* cut-off remark */
39 extern int pam_misc_conv_died;      /* 1 = cut-off time reached (0 not) */
40 extern int (*pam_binary_handler_fn)(const void *send, void **receive);
41 
42 /*
43  * Environment helper functions
44  */
45 
46 /* transcribe given environment (to pam) */
47 extern int pam_misc_paste_env(pam_handle_t *pamh
48 			      , const char * const * user_env);
49 
50 /* char **pam_misc_copy_env(pam_handle_t *pamh);
51 
52    This is no longer defined as a prototype because the X/Open XSSO
53    spec makes it clear that PAM's pam_getenvlist() does exactly
54    what this was needed for.
55 
56    A wrapper is still provided in the pam_misc library - so that
57    legacy applications will still work.  But _BE_WARNED_ it will
58    disappear by the release of libpam 1.0 . */
59 
60 /* delete environment as obtained from (pam_getenvlist) */
61 extern char **pam_misc_drop_env(char **env);
62 
63 /* provide something like the POSIX setenv function for the (Linux-)PAM
64  * environment. */
65 
66 extern int pam_misc_setenv(pam_handle_t *pamh, const char *name
67 			   , const char *value, int readonly);
68 
69 #endif
70 
71 
72 
73