1*bf198cc6Smillert.\" $OpenBSD: check_expire.3,v 1.11 2019/01/25 00:19:26 millert Exp $ 25f3d0916Smillert.\" 3*bf198cc6Smillert.\" Copyright (c) 2000 Todd C. Miller <millert@openbsd.org> 45f3d0916Smillert.\" 506f01696Smillert.\" Permission to use, copy, modify, and distribute this software for any 606f01696Smillert.\" purpose with or without fee is hereby granted, provided that the above 706f01696Smillert.\" copyright notice and this permission notice appear in all copies. 85f3d0916Smillert.\" 9328f1f07Smillert.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10328f1f07Smillert.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11328f1f07Smillert.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12328f1f07Smillert.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13328f1f07Smillert.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14328f1f07Smillert.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15328f1f07Smillert.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 165f3d0916Smillert.\" 17*bf198cc6Smillert.Dd $Mdocdate: January 25 2019 $ 18b2df95eeSschwarze.Dt LOGIN_CHECK_EXPIRE 3 195f3d0916Smillert.Os 205f3d0916Smillert.Sh NAME 21b2df95eeSschwarze.Nm login_check_expire 225f3d0916Smillert.Nd check for password expiration 235f3d0916Smillert.Sh SYNOPSIS 2486f9d4cdStedu.In stdio.h 2586f9d4cdStedu.In util.h 265f3d0916Smillert.Ft int 275f3d0916Smillert.Fn login_check_expire "FILE *back" "struct passwd *pwd" "char *class" "int lastchance" 285f3d0916Smillert.Sh DESCRIPTION 295f3d0916SmillertThe 305f3d0916Smillert.Fn login_check_expire 31720a7a94Sjmcfunction is called by a 32720a7a94Sjmc.Bx 33720a7a94SjmcAuthentication login script to 345f3d0916Smillertcheck whether the user's password entry, as described by 355f3d0916Smillert.Fa pwd , 365f3d0916Smillerthas expired. 375f3d0916Smillert.Pp 385f3d0916SmillertIf a 395f3d0916Smillert.Fa class 405f3d0916Smillertis specified, it is used instead of the class specified in the user's 415f3d0916Smillertpassword database entry. 425f3d0916SmillertIf the 435f3d0916Smillert.Fa lastchance 445f3d0916Smillertargument is non-zero, the user's password has expired, and it has not been 455f3d0916Smillertexpired longer than 465f3d0916Smillert.Dq password-dead 475f3d0916Smillertseconds (see 485f3d0916Smillert.Xr login.conf 5 ) , 495f3d0916Smillertthe user will be able to log in one last time to change the password. 5054e98653Smillert.Sh RETURN VALUES 515f3d0916SmillertThe 525f3d0916Smillert.Fn login_check_expire 535f3d0916Smillertfunction returns 0 if the user's password has not expired, and 1 if it has 545f3d0916Smillertexpired or if an error occurred. 555f3d0916Smillert.br 565f3d0916SmillertStatus and error messages are passed 575f3d0916Smillertback to the login script caller via the back channel, 585f3d0916Smillert.Fa back . 595f3d0916Smillert.Sh SEE ALSO 605f3d0916Smillert.Xr auth_subr 3 , 616b9dd65bSjmc.Xr authenticate 3 , 625f3d0916Smillert.Xr login.conf 5 63