pam_modules.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: pam_modules.h /main/5 1996/05/09 04:25:54 drk $ */
  24. /*
  25. * Copyright (c) 1992-1995, by Sun Microsystems, Inc.
  26. * All rights reserved.
  27. */
  28. #ifndef _PAM_MODULES_H
  29. #define _PAM_MODULES_H
  30. #pragma ident "@(#)pam_modules.h 1.20 96/02/02 SMI" /* PAM 2.6 */
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. extern int
  35. pam_sm_authenticate(
  36. pam_handle_t *pamh,
  37. int flags,
  38. int argc,
  39. const char **argv);
  40. extern int
  41. pam_sm_setcred(
  42. pam_handle_t *pamh,
  43. int flags,
  44. int argc,
  45. const char **argv);
  46. extern int
  47. pam_sm_acct_mgmt(
  48. pam_handle_t *pamh,
  49. int flags,
  50. int argc,
  51. const char **argv);
  52. extern int
  53. pam_sm_open_session(
  54. pam_handle_t *pamh,
  55. int flags,
  56. int argc,
  57. const char **argv);
  58. extern int
  59. pam_sm_close_session(
  60. pam_handle_t *pamh,
  61. int flags,
  62. int argc,
  63. const char **argv);
  64. /*
  65. * Be careful - there are flags defined for pam_chauthtok() in
  66. * pam_appl.h also.
  67. */
  68. #define PAM_PRELIM_CHECK 1
  69. #define PAM_UPDATE_AUTHTOK 2
  70. #define PAM_REP_DEFAULT 0x0
  71. #define PAM_REP_FILES 0x01
  72. #define PAM_REP_NIS 0x02
  73. #define PAM_REP_NISPLUS 0x04
  74. #define PAM_OPWCMD 0x08 /* for nispasswd, yppasswd */
  75. #define IS_FILES(x) ((x & PAM_REP_FILES) == PAM_REP_FILES)
  76. #define IS_NIS(x) ((x & PAM_REP_NIS) == PAM_REP_NIS)
  77. #define IS_NISPLUS(x) ((x & PAM_REP_NISPLUS) == PAM_REP_NISPLUS)
  78. #define IS_OPWCMD(x) ((x & PAM_OPWCMD) == PAM_OPWCMD)
  79. extern int
  80. pam_sm_chauthtok(
  81. pam_handle_t *pamh,
  82. int flags,
  83. int argc,
  84. const char **argv);
  85. #ifdef __cplusplus
  86. }
  87. #endif
  88. #endif /* _PAM_MODULES_H */