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