pam_misc.h 1.5 KB

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