xref: /netbsd-src/external/bsd/openpam/dist/doc/man/openpam_get_feature.3 (revision 0d9d0fd8a30be9a1924e715bbcf67a4a83efd262)
1.\"	$NetBSD: openpam_get_feature.3,v 1.8 2023/06/30 21:46:20 christos Exp $
2.\"
3.\" Generated from openpam_get_feature.c by gendoc.pl
4.Dd June 27, 2023
5.Dt OPENPAM_GET_FEATURE 3
6.Os
7.Sh NAME
8.Nm openpam_get_feature
9.Nd query the state of an optional feature
10.Sh SYNOPSIS
11.In sys/types.h
12.In security/pam_appl.h
13.In security/openpam.h
14.Ft "int"
15.Fn openpam_get_feature "int feature" "int *onoff"
16.Sh DESCRIPTION
17.Bf Sy
18This function is experimental and may be modified or removed in a future release without prior warning.
19.Ef
20.Pp
21The
22.Fn openpam_get_feature
23function stores the current state of the
24specified feature in the variable pointed to by its
25.Fa onoff
26argument.
27.Pp
28The following features are recognized:
29.Bl -tag -width 18n
30.It Dv OPENPAM_RESTRICT_SERVICE_NAME
31Disallow path separators in service names.
32This feature is enabled by default.
33Disabling it allows the application to specify the path to
34the desired policy file directly.
35.It Dv OPENPAM_VERIFY_POLICY_FILE
36Verify the ownership and permissions of the policy file
37and the path leading up to it.
38This feature is enabled by default.
39.It Dv OPENPAM_RESTRICT_MODULE_NAME
40Disallow path separators in module names.
41This feature is disabled by default.
42Enabling it prevents the use of modules in non-standard
43locations.
44.It Dv OPENPAM_VERIFY_MODULE_FILE
45Verify the ownership and permissions of each loadable
46module and the path leading up to it.
47This feature is enabled by default.
48.El
49.Sh RETURN VALUES
50The
51.Fn openpam_get_feature
52function returns one of the following values:
53.Bl -tag -width 18n
54.It Bq Er PAM_SUCCESS
55Success.
56.It Bq Er PAM_BAD_FEATURE
57Unrecognized or restricted feature.
58.El
59.Sh SEE ALSO
60.Xr openpam_set_feature 3 ,
61.Xr pam 3 ,
62.Xr pam_strerror 3
63.Sh STANDARDS
64The
65.Fn openpam_get_feature
66function is an OpenPAM extension.
67.Sh AUTHORS
68The
69.Fn openpam_get_feature
70function and this manual page were
71developed by
72.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no .
73