1.\" Generated from pam_close_session.c by gendoc.pl
2.Dd June 27, 2023
3.Dt PAM_CLOSE_SESSION 3
4.Os
5.Sh NAME
6.Nm pam_close_session
7.Nd close an existing user session
8.Sh SYNOPSIS
9.In sys/types.h
10.In security/pam_appl.h
11.Ft "int"
12.Fn pam_close_session "pam_handle_t *pamh" "int flags"
13.Sh DESCRIPTION
14The
15.Fn pam_close_session
16function tears down the user session previously
17set up by
18.Xr pam_open_session 3 .
19.Pp
20The
21.Fa flags
22argument is the binary or of zero or more of the following
23values:
24.Bl -tag -width 18n
25.It Dv PAM_SILENT
26Do not emit any messages.
27.El
28.Pp
29If any other bits are set,
30.Fn pam_close_session
31will return
32.Dv PAM_BAD_CONSTANT .
33.Sh RETURN VALUES
34The
35.Fn pam_close_session
36function returns one of the following values:
37.Bl -tag -width 18n
38.It Bq Er PAM_SUCCESS
39Success.
40.It Bq Er PAM_ABORT
41General failure.
42.It Bq Er PAM_BAD_CONSTANT
43Bad constant.
44.It Bq Er PAM_BUF_ERR
45Memory buffer error.
46.It Bq Er PAM_CONV_ERR
47Conversation failure.
48.It Bq Er PAM_PERM_DENIED
49Permission denied.
50.It Bq Er PAM_SERVICE_ERR
51Error in service module.
52.It Bq Er PAM_SESSION_ERR
53Session failure.
54.It Bq Er PAM_SYSTEM_ERR
55System error.
56.El
57.Sh SEE ALSO
58.Xr pam 3 ,
59.Xr pam_open_session 3 ,
60.Xr pam_strerror 3
61.Sh STANDARDS
62.Rs
63.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
64.%D "June 1997"
65.Re
66.Sh AUTHORS
67The
68.Fn pam_close_session
69function and this manual page were
70developed for the
71.Fx
72Project by ThinkSec AS and Network Associates Laboratories, the
73Security Research Division of Network Associates, Inc.\& under
74DARPA/SPAWAR contract N66001-01-C-8035
75.Pq Dq CBOSS ,
76as part of the DARPA CHATS research program.
77.Pp
78The OpenPAM library is maintained by
79.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no .
80