Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.0 KiB

  1. .\" $OpenBSD: check_expire.3,v 1.11 2019/01/25 00:19:26 millert Exp $
  2. .\"
  3. .\" Copyright (c) 2000 Todd C. Miller <millert@openbsd.org>
  4. .\"
  5. .\" Permission to use, copy, modify, and distribute this software for any
  6. .\" purpose with or without fee is hereby granted, provided that the above
  7. .\" copyright notice and this permission notice appear in all copies.
  8. .\"
  9. .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. .\"
  17. .Dd $Mdocdate: January 25 2019 $
  18. .Dt LOGIN_CHECK_EXPIRE 3
  19. .Os
  20. .Sh NAME
  21. .Nm login_check_expire
  22. .Nd check for password expiration
  23. .Sh SYNOPSIS
  24. .In stdio.h
  25. .In util.h
  26. .Ft int
  27. .Fn login_check_expire "FILE *back" "struct passwd *pwd" "char *class" "int lastchance"
  28. .Sh DESCRIPTION
  29. The
  30. .Fn login_check_expire
  31. function is called by a
  32. .Bx
  33. Authentication login script to
  34. check whether the user's password entry, as described by
  35. .Fa pwd ,
  36. has expired.
  37. .Pp
  38. If a
  39. .Fa class
  40. is specified, it is used instead of the class specified in the user's
  41. password database entry.
  42. If the
  43. .Fa lastchance
  44. argument is non-zero, the user's password has expired, and it has not been
  45. expired longer than
  46. .Dq password-dead
  47. seconds (see
  48. .Xr login.conf 5 ) ,
  49. the user will be able to log in one last time to change the password.
  50. .Sh RETURN VALUES
  51. The
  52. .Fn login_check_expire
  53. function returns 0 if the user's password has not expired, and 1 if it has
  54. expired or if an error occurred.
  55. .br
  56. Status and error messages are passed
  57. back to the login script caller via the back channel,
  58. .Fa back .
  59. .Sh SEE ALSO
  60. .Xr auth_subr 3 ,
  61. .Xr authenticate 3 ,
  62. .Xr login.conf 5